public class ClassMeta extends Object
| Constructor and Description |
|---|
ClassMeta(EnhanceContext enhanceContext,
int logLevel,
MessageOutput logout) |
| Modifier and Type | Method and Description |
|---|---|
void |
addClassAnnotation(String desc)
Add a class annotation.
|
void |
addExistingMethod(String methodName,
String methodDesc)
Add an existing method.
|
void |
addFieldGetSetMethods(ClassVisitor cv)
Add field level get set methods for each field.
|
FieldVisitor |
createLocalFieldVisitor(FieldVisitor fv,
String name,
String desc)
Create and return a new fieldVisitor for use when enhancing a class.
|
FieldVisitor |
createLocalFieldVisitor(String name,
String desc)
Create and return a read only fieldVisitor for subclassing option.
|
MethodVisitor |
createMethodVisitor(MethodVisitor mv,
int access,
String name,
String desc) |
List<FieldMeta> |
getAllFields()
Return the list of all fields including ones inherited from entity super
types and mappedSuperclasses.
|
AnnotationInfo |
getAnnotationInfo()
Return the AnnotationInfo collected on methods.
|
String |
getClassName()
Return the className of this entity class.
|
String |
getDescription() |
EnhanceContext |
getEnhanceContext()
Return the enhance context which has options for enhancement.
|
FieldMeta |
getFieldPersistent(String fieldName)
Return the field - null when not found.
|
AnnotationInfo |
getInterfaceTransactionalInfo(String methodName,
String methodDesc)
Return the transactional annotation information for a matching interface method.
|
List<FieldMeta> |
getLocalFields()
Return the list of fields local to this type (not inherited).
|
String |
getSuperClassName() |
boolean |
hasDefaultConstructor() |
boolean |
hasEntityBeanInterface() |
boolean |
hasEqualsOrHashCode()
Return true if Equals/hashCode is implemented on this class or a super class.
|
boolean |
hasGroovyInterface() |
boolean |
hasPersistentFields()
Return true if the class contains persistent fields.
|
boolean |
hasScalaInterface() |
boolean |
hasStaticInit() |
boolean |
isAlreadyEnhanced()
Return true if the bean is already enhanced.
|
boolean |
isCheckSuperClassForEntity() |
boolean |
isEntity()
Return true if the class has an Entity, Embeddable, MappedSuperclass (with persistent fields).
|
boolean |
isEntityEnhancementRequired()
Return true for classes not already enhanced and yet annotated with entity, embeddable or mappedSuperclass.
|
boolean |
isExistingMethod(String methodName,
String methodDesc)
Return true if the method already exists on the bean.
|
boolean |
isFieldPersistent(String fieldName)
Return true if the field is a persistent field.
|
boolean |
isFieldPersistentMany(String fieldName)
Return true if the field is a persistent many field.
|
boolean |
isLog(int level) |
boolean |
isSuperClassEntity()
Return true if this entity bean has a super class that is an entity.
|
boolean |
isTransactional() |
void |
log(String msg) |
void |
logEnhanced() |
void |
setAlreadyEnhanced(boolean alreadyEnhanced) |
void |
setClassName(String className,
String superClassName) |
void |
setEntityBeanInterface(boolean hasEntityBeanInterface) |
void |
setGroovyInterface(boolean hasGroovyInterface) |
void |
setHasDefaultConstructor(boolean hasDefaultConstructor) |
void |
setHasEqualsOrHashcode(boolean hasEqualsOrHashcode)
Set to true if the class has an existing equals() or hashcode() method.
|
void |
setHasStaticInit(boolean hasStaticInit) |
void |
setScalaInterface(boolean hasScalaInterface) |
void |
setSuperMeta(ClassMeta superMeta) |
String |
toString() |
public ClassMeta(EnhanceContext enhanceContext, int logLevel, MessageOutput logout)
public EnhanceContext getEnhanceContext()
public AnnotationInfo getAnnotationInfo()
public AnnotationInfo getInterfaceTransactionalInfo(String methodName, String methodDesc)
public boolean isCheckSuperClassForEntity()
public boolean isTransactional()
public String getSuperClassName()
public boolean isLog(int level)
public void log(String msg)
public void logEnhanced()
public void setSuperMeta(ClassMeta superMeta)
public void setHasEqualsOrHashcode(boolean hasEqualsOrHashcode)
public boolean hasEqualsOrHashCode()
public boolean isFieldPersistent(String fieldName)
public boolean isFieldPersistentMany(String fieldName)
public FieldMeta getFieldPersistent(String fieldName)
public List<FieldMeta> getLocalFields()
public boolean hasPersistentFields()
public List<FieldMeta> getAllFields()
public void addFieldGetSetMethods(ClassVisitor cv)
public boolean isEntity()
public boolean isEntityEnhancementRequired()
public boolean isAlreadyEnhanced()
public String getClassName()
public boolean isSuperClassEntity()
public void addClassAnnotation(String desc)
public void addExistingMethod(String methodName, String methodDesc)
public boolean isExistingMethod(String methodName, String methodDesc)
public MethodVisitor createMethodVisitor(MethodVisitor mv, int access, String name, String desc)
public FieldVisitor createLocalFieldVisitor(String name, String desc)
public FieldVisitor createLocalFieldVisitor(FieldVisitor fv, String name, String desc)
public void setAlreadyEnhanced(boolean alreadyEnhanced)
public boolean hasDefaultConstructor()
public void setHasDefaultConstructor(boolean hasDefaultConstructor)
public void setHasStaticInit(boolean hasStaticInit)
public boolean hasStaticInit()
public String getDescription()
public boolean hasScalaInterface()
public void setScalaInterface(boolean hasScalaInterface)
public boolean hasEntityBeanInterface()
public void setEntityBeanInterface(boolean hasEntityBeanInterface)
public boolean hasGroovyInterface()
public void setGroovyInterface(boolean hasGroovyInterface)
Copyright © 2016. All rights reserved.