List of usage examples for java.lang.reflect Modifier PRIVATE
int PRIVATE
To view the source code for java.lang.reflect Modifier PRIVATE.
Click Source Link
From source file:org.codehaus.groovy.grails.compiler.injection.GrailsASTUtils.java
public static FieldNode addFieldIfNonExistent(ClassNode classNode, ClassNode fieldType, String fieldName) { if (classNode != null && classNode.getField(fieldName) == null) { return classNode.addField(fieldName, Modifier.PRIVATE, fieldType, new ConstructorCallExpression(fieldType, new ArgumentListExpression())); }//from ww w. j a v a 2 s . c o m return null; }
From source file:org.gvnix.addon.jpa.addon.audit.JpaAuditMetadata.java
/** * @return auditLastUpdatedBy field/*w w w. j a v a 2 s . co m*/ */ private FieldMetadata getFieldAuditLastUpdatedBy() { List<AnnotationMetadataBuilder> annotations = null; if (userTypeEntity) { annotations = generateManyToOneFieldAnnotation(); } return helper.getField(LAST_UPDATED_BY_FIELD, Modifier.PRIVATE, userType, annotations, GET_FIELD_EXISTS_ACTION.RETURN_EXISTING); }
From source file:org.gvnix.addon.jpa.addon.audit.JpaAuditMetadata.java
/** * @return auditLastUpdate field//from www .ja v a 2s. co m */ private FieldMetadata getFieldAuditLastUpdate() { return helper.getField(LAST_UPDATE_FIELD, Modifier.PRIVATE, JdkJavaType.CALENDAR, getDateFormatAnnotations(), GET_FIELD_EXISTS_ACTION.RETURN_EXISTING); }
From source file:org.gvnix.addon.jpa.addon.audit.JpaAuditMetadata.java
/** * @return auditCreatedBy field//from w ww.j a va 2 s. co m */ private FieldMetadata getFieldAuditCreatedBy() { List<AnnotationMetadataBuilder> annotations = null; if (userTypeEntity) { annotations = generateManyToOneFieldAnnotation(); } return helper.getField(CREATED_BY_FIELD, Modifier.PRIVATE, userType, annotations, GET_FIELD_EXISTS_ACTION.RETURN_EXISTING); }
From source file:org.gvnix.addon.jpa.addon.audit.JpaAuditMetadata.java
/** * @return auditCreation field// w ww. j a v a2 s . com */ public FieldMetadata getFieldAuditCreation() { return helper.getField(CREATION_FIELD, Modifier.PRIVATE, JdkJavaType.CALENDAR, getDateFormatAnnotations(), GET_FIELD_EXISTS_ACTION.RETURN_EXISTING); }
From source file:org.gvnix.addon.jpa.addon.audit.providers.envers.EnversRevisionLogMetadataBuilder.java
/** * @return creates XXXRevsion.item field *//*from www .j a v a 2 s. c o m*/ private FieldMetadata createRevisionItemField() { List<AnnotationMetadataBuilder> annotations = new ArrayList<AnnotationMetadataBuilder>(0); return new FieldMetadataBuilder(context.getMetadataId(), Modifier.PRIVATE, annotations, getRevisionItemFieldName(), context.getEntity()).build(); }
From source file:org.gvnix.addon.jpa.addon.audit.providers.envers.EnversRevisionLogMetadataBuilder.java
/** * @return creates XXXRevision.revision field *//* w w w.j av a2 s . co m*/ private FieldMetadata createRevisionEntityRevisionField() { List<AnnotationMetadataBuilder> annotations = new ArrayList<AnnotationMetadataBuilder>(0); return new FieldMetadataBuilder(context.getMetadataId(), Modifier.PRIVATE, annotations, REV_ITEM_REVISON_ENTITY_FIELD, revisionEntityMetadata.getType()).build(); }
From source file:org.gvnix.addon.jpa.addon.audit.providers.envers.EnversRevisionLogMetadataBuilder.java
/** * @return creates XXXRevsion.type field *///from w w w. j a va2s. c o m private FieldMetadata createRevisionTypeField() { List<AnnotationMetadataBuilder> annotations = new ArrayList<AnnotationMetadataBuilder>(0); return new FieldMetadataBuilder(context.getMetadataId(), Modifier.PRIVATE, annotations, REV_ITEM_REVISON_TYPE_FIELD, REVISON_TYPE).build(); }
From source file:org.gvnix.addon.datatables.addon.DatatablesMetadata.java
private FieldMetadata getEntityManagerProvider() { if (entityManagerProvider == null) { JavaSymbolName curName = DATATABLES_MANAGER_PROVIDER_NAME; // Check if field exist FieldMetadata currentField = governorTypeDetails.getDeclaredField(curName); if (currentField != null && !isEntityManagerProviderField(currentField)) { // No compatible field: look for new name currentField = null;/*from ww w . jav a 2 s . co m*/ JavaSymbolName newName = new JavaSymbolName("entityManagerProv"); currentField = governorTypeDetails.getDeclaredField(newName); while (currentField != null && !isConversionServiceField(currentField)) { newName = new JavaSymbolName(newName.getSymbolName().concat("_")); currentField = governorTypeDetails.getDeclaredField(newName); } curName = newName; } if (currentField != null) { entityManagerProvider = currentField; } else { // create field JavaType backingType = new JavaType(DATATABLES_MANAGER_PROVIDER); // AutoWired List<AnnotationMetadataBuilder> annotations = new ArrayList<AnnotationMetadataBuilder>(); annotations.add(new AnnotationMetadataBuilder(AUTOWIRED)); // Using the FieldMetadataBuilder to create the field // definition. final FieldMetadataBuilder fieldBuilder = new FieldMetadataBuilder(getId(), Modifier.PRIVATE, annotations, curName, backingType); entityManagerProvider = fieldBuilder.build(); } } return entityManagerProvider; }