private void generatePrimaryConstructorProperties() { boolean isAnnotation = descriptor.getKind() == ClassKind.ANNOTATION_CLASS; for (KtParameter p : getPrimaryConstructorParameters()) { if (p.hasValOrVar()) { PropertyDescriptor propertyDescriptor = bindingContext.get(BindingContext.PRIMARY_CONSTRUCTOR_PARAMETER, p); if (propertyDescriptor != null) { if (!isAnnotation) { propertyCodegen.generatePrimaryConstructorProperty(p, propertyDescriptor); } else { propertyCodegen.generateConstructorPropertyAsMethodForAnnotationClass( p, propertyDescriptor); } } } } }