Package io.ebean.enhance.common
Class ClassMeta
java.lang.Object
io.ebean.enhance.common.ClassMeta
public class ClassMeta extends Object
Holds the meta data for an entity bean class that is being enhanced.
-
Constructor Summary
Constructors Constructor Description ClassMeta(EnhanceContext enhanceContext, int logLevel, MessageOutput logout) -
Method Summary
Modifier and Type Method Description intaccPrivate()ACC_PRIVATE with maybe ACC_SYNTHETIC.intaccProtected()ACC_PROTECTED with maybe ACC_SYNTHETIC.intaccPublic()ACC_PUBLIC with maybe ACC_SYNTHETIC.voidaddClassAnnotation(String desc)Add a class annotation.voidaddFieldGetSetMethods(ClassVisitor cv)Add field level get set methods for each field.FieldVisitorcreateLocalFieldVisitor(FieldVisitor fv, String name, String desc)Create and return a new fieldVisitor for use when enhancing a class.List<FieldMeta>getAllFields()Return the list of all fields including ones inherited from entity super types and mappedSuperclasses.AnnotationInfogetAnnotationInfo()Return the AnnotationInfo collected on methods.StringgetClassName()Return the className of this entity class.StringgetDescription()EnhanceContextgetEnhanceContext()Return the enhance context which has options for enhancement.FieldMetagetFieldPersistent(String fieldName)Return the field - null when not found.AnnotationInfogetInterfaceTransactionalInfo(String methodName, String methodDesc)Return the transactional annotation information for a matching interface method.StringgetSuperClassName()booleanhasDefaultConstructor()booleanhasEntityBeanInterface()booleanhasEqualsOrHashCode()Return true if Equals/hashCode is implemented on this class or a super class.booleanhasPersistentFields()Return true if the class contains persistent fields.booleanhasStaticInit()booleanisAlreadyEnhanced()Return true if the bean is already enhanced.booleanisCheckSuperClassForEntity()booleanisConsumeInitMany(String fieldName)Return true if the field is a persistent many field that we want to consume the init on.booleanisEntity()Return true if the class has an Entity, Embeddable, MappedSuperclass (with persistent fields).booleanisEntityEnhancementRequired()Return true for classes not already enhanced and yet annotated with entity, embeddable or mappedSuperclass.booleanisFieldPersistent(String fieldName)Return true if the field is a persistent field.booleanisLog(int level)booleanisQueryBean()Return true if this is a query bean.booleanisSuperClassEntity()Return true if this entity bean has a super class that is an entity.booleanisToManyGetField()booleanisTransactional()voidlog(String msg)voidlogEnhanced()voidsetAlreadyEnhanced(boolean alreadyEnhanced)voidsetClassName(String className, String superClassName)voidsetEntityBeanInterface(boolean hasEntityBeanInterface)voidsetGroovyInterface(boolean hasGroovyInterface)voidsetHasDefaultConstructor(boolean hasDefaultConstructor)voidsetHasEqualsOrHashcode(boolean hasEqualsOrHashcode)Set to true if the class has an existing equals() or hashcode() method.voidsetHasStaticInit(boolean hasStaticInit)voidsetScalaInterface(boolean hasScalaInterface)voidsetSuperMeta(ClassMeta superMeta)StringtoString()
-
Constructor Details
-
ClassMeta
-
-
Method Details
-
getEnhanceContext
Return the enhance context which has options for enhancement. -
getAnnotationInfo
Return the AnnotationInfo collected on methods. Used to determine Transactional method enhancement. -
getInterfaceTransactionalInfo
Return the transactional annotation information for a matching interface method. -
isCheckSuperClassForEntity
-
toString
-
isTransactional
-
setClassName
-
getSuperClassName
-
isLog
-
log
-
logEnhanced
-
setSuperMeta
-
setHasEqualsOrHashcode
Set to true if the class has an existing equals() or hashcode() method. -
hasEqualsOrHashCode
Return true if Equals/hashCode is implemented on this class or a super class. -
isFieldPersistent
Return true if the field is a persistent field. -
isConsumeInitMany
Return true if the field is a persistent many field that we want to consume the init on. -
getFieldPersistent
Return the field - null when not found. -
hasPersistentFields
Return true if the class contains persistent fields. -
getAllFields
Return the list of all fields including ones inherited from entity super types and mappedSuperclasses. -
addFieldGetSetMethods
Add field level get set methods for each field. -
isQueryBean
Return true if this is a query bean. -
isEntity
Return true if the class has an Entity, Embeddable, MappedSuperclass (with persistent fields). -
isEntityEnhancementRequired
Return true for classes not already enhanced and yet annotated with entity, embeddable or mappedSuperclass. -
isAlreadyEnhanced
Return true if the bean is already enhanced. -
getClassName
Return the className of this entity class. -
isSuperClassEntity
Return true if this entity bean has a super class that is an entity. -
addClassAnnotation
Add a class annotation. -
accPublic
ACC_PUBLIC with maybe ACC_SYNTHETIC. -
accProtected
ACC_PROTECTED with maybe ACC_SYNTHETIC. -
accPrivate
ACC_PRIVATE with maybe ACC_SYNTHETIC. -
isToManyGetField
-
createLocalFieldVisitor
Create and return a new fieldVisitor for use when enhancing a class. -
setAlreadyEnhanced
-
hasDefaultConstructor
-
setHasDefaultConstructor
-
setHasStaticInit
-
hasStaticInit
-
getDescription
-
setScalaInterface
-
hasEntityBeanInterface
-
setEntityBeanInterface
-
setGroovyInterface
-