Package io.ebean.enhance.common
Class ClassMeta
java.lang.Object
io.ebean.enhance.common.ClassMeta
Holds the meta-data for an entity bean class that is being enhanced.
-
Constructor Summary
ConstructorsConstructorDescriptionClassMeta(EnhanceContext enhanceContext, int logLevel, MessageOutput logout) -
Method Summary
Modifier and TypeMethodDescriptionintIf field access use public rather than protected plus usually with synthetic.intACC_PRIVATE with maybe ACC_SYNTHETIC.intACC_PROTECTED with maybe ACC_SYNTHETIC.intACC_PUBLIC with maybe ACC_SYNTHETIC.voidaddClassAnnotation(String desc) Add a class annotation.voidAdd field level get set methods for each field.voidaddTransientInit(CapturedInitCode deferredInitCode) voidReturn the list of all fields including ones inherited from entity super types and mappedSuperclasses.Return the AnnotationInfo collected on methods.Return the className of this entity class.context()Return the enhance context which has options for enhancement.createLocalFieldVisitor(FieldVisitor fv, String name, String desc) Create and return a new fieldVisitor for use when enhancing a class.Return the field - null when not found.booleanbooleanbooleanReturn true if Equals/hashCode is implemented on this class or a super class.booleanReturn true if the class contains persistent fields.booleanbooleanbooleanbooleanIf 141+ Add InterceptReadOnly support.Return the EntityBeanIntercept type that will be new'ed up for the EntityBean.interfaceTransactionalInfo(String methodName, String methodDesc) Return the transactional annotation information for a matching interface method.booleanbooleanReturn true if the bean is already enhanced.booleanbooleanisConsumeInitMany(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 or MappedSuperclass.booleanReturn 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.booleanisInitTransient(String fieldName) booleanisLog(int level) booleanReturn true if this is a query bean.booleanbooleanReturn true if this entity bean has a super class that is an entity.booleanbooleanbooleanisTransient(String fieldName) voidvoidvoidsetAlreadyEnhanced(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) voidvoidsetScalaInterface(boolean hasScalaInterface) voidsetSuperMeta(ClassMeta superMeta) toString()voidvisitMethodInsnIntercept(MethodVisitor mv, String name, String desc) Invoke a method on EntityBeanIntercept.
-
Constructor Details
-
ClassMeta
-
-
Method Details
-
context
Return the enhance context which has options for enhancement. -
annotationInfo
Return the AnnotationInfo collected on methods. Used to determine Transactional method enhancement. -
isAllowNullableDbArray
-
interfaceTransactionalInfo
Return the transactional annotation information for a matching interface method. -
isCheckSuperClassForEntity
-
toString
-
isTransactional
-
setClassName
-
superClassName
-
isLog
-
log
-
logEnhanced
-
setSuperMeta
-
setHasEqualsOrHashcode
Set to true if the class has an existing equals() or hashcode() method. -
setHasToString
-
hasEqualsOrHashCode
Return true if Equals/hashCode is implemented on this class or a super class. -
hasToString
-
isFieldPersistent
Return true if the field is a persistent field. -
isTransient
-
isInitTransient
-
isConsumeInitMany
Return true if the field is a persistent many field that we want to consume the init on. -
field
Return the field - null when not found. -
hasPersistentFields
Return true if the class contains persistent fields. -
allFields
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 or MappedSuperclass. -
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. -
className
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. -
accAccessor
If field access use public rather than protected plus usually with synthetic. -
accPrivate
ACC_PRIVATE with maybe ACC_SYNTHETIC. -
isToManyGetField
-
interceptNew
Return the EntityBeanIntercept type that will be new'ed up for the EntityBean. For version 140+ EntityBeanIntercept is an interface and instead we new up InterceptReadWrite. -
visitMethodInsnIntercept
Invoke a method on EntityBeanIntercept. For version 140+ EntityBeanIntercept is an interface and this uses INVOKEINTERFACE. -
interceptAddReadOnly
If 141+ Add InterceptReadOnly support. -
isRecordType
-
addTransientInit
-
transientInit
-
addUnsupportedTransientInit
-
hasTransientFieldErrors
-
transientFieldErrorMessage
-
createLocalFieldVisitor
Create and return a new fieldVisitor for use when enhancing a class. -
setAlreadyEnhanced
-
hasDefaultConstructor
-
setHasDefaultConstructor
-
setHasStaticInit
-
hasStaticInit
-
description
-
setScalaInterface
-
hasEntityBeanInterface
-
setEntityBeanInterface
-
setGroovyInterface
-