Package io.ebean.enhance.common
Class EnhanceContext
java.lang.Object
io.ebean.enhance.common.EnhanceContext
Used to hold metadata, arguments and log levels for the enhancement.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionEnhanceContext(ClassBytesReader classBytesReader, String agentArgs, AgentManifest manifest) EnhanceContext(ClassBytesReader classBytesReader, String agentArgs, AgentManifest manifest, ClassMetaCache metaCache) Construct a context for enhancement. -
Method Summary
Modifier and TypeMethodDescriptionintintintvoidaddClassMeta(ClassMeta meta) byte[]classBytes(String className, ClassLoader classLoader) voidTurn on the summary collection of the enhancement.Create a new meta object for enhancing a class.booleandetectEntityTransactionalEnhancement(String className) Return true if this class should be scanned for transactional enhancement.booleandetectQueryBeanEnhancement(String className) Return true if this class should be scanned for query bean enhancement.Deprecated.Deprecated.booleaninterfaceMeta(String interfaceClassName, ClassLoader classLoader) Read the class metadata for an interface.booleanbooleanReturn true if we should add null checking on *ToMany fields.booleanbooleanReturn true if profile location enhancement is on.booleanbooleanisEntityBean(String owner) booleanisIgnoreClass(String className) Return true if this class should be ignored.booleanisLog(int level) booleanisQueryBean(String owner, ClassLoader classLoader) Return true if the owner class is a type query bean.booleanReturn true if transform should throw exception rather than log and return null.booleanbooleanbooleanbooleanReturn true if internal ebean fields in entity classes should be transient.voidLog some debug output.voidvoidLog an error.intlogLevel()Return the log level.Return the summary of the packages controlling enhancement.voidsetLogLevel(int logLevel) voidsetLogout(MessageOutput logout) Change the logout to something other than system out.voidsetThrowOnError(boolean throwOnError) Set to true if you want transform to throw exceptions rather than return null.voidsummaryEntity(String className) Add the entity enhanced class to summary information.voidsummaryFieldAccessUser(String className) Add the enhanced class with field access replacement to summary information.Return the summary of the enhancement.voidsummaryQueryBean(String className) Add the query bean enhanced class to summary information.voidsummaryQueryBeanCaller(String className) Add the query bean caller enhanced class to summary information.voidsummaryTransactional(String className) Add the transactional enhanced class to summary information.superMeta(String superClassName, ClassLoader classLoader) Read the class metadata for a super class.booleanvoidvisitMethodInsnIntercept(MethodVisitor mv, String name, String desc) voidwithClassLoader(ClassLoader loader)
-
Constructor Details
-
EnhanceContext
-
EnhanceContext
public EnhanceContext(ClassBytesReader classBytesReader, String agentArgs, AgentManifest manifest, ClassMetaCache metaCache) Construct a context for enhancement.
-
-
Method Details
-
withClassLoader
-
setLogLevel
-
getPackagesSummary
Deprecated. -
packagesSummary
Return the summary of the packages controlling enhancement. -
entityPackages
-
transactionalPackages
-
querybeanPackages
-
classBytes
-
isEntityBean
-
isQueryBean
Return true if the owner class is a type query bean.If true typically means the caller needs to change GETFIELD calls to instead invoke the generated 'property access' methods.
-
isEnableEntityFieldAccess
-
isEnableProfileLocation
Return true if profile location enhancement is on. -
detectEntityTransactionalEnhancement
Return true if this class should be scanned for transactional enhancement. -
detectQueryBeanEnhancement
Return true if this class should be scanned for query bean enhancement. -
isIgnoreClass
Return true if this class should be ignored. That is JDK classes and known libraries JDBC drivers etc can be skipped. -
setLogout
Change the logout to something other than system out. -
createClassMeta
Create a new meta object for enhancing a class. -
superMeta
Read the class metadata for a super class.Typically used to read meta data for inheritance hierarchy.
-
interfaceMeta
Read the class metadata for an interface.Typically used to check the interface to see if it is transactional.
-
addClassMeta
-
get
-
log
Log some debug output. -
log
-
isLog
-
log
Log an error. -
logLevel
Return the log level. -
isTransientInit
-
isTransientInitThrowError
-
isTransientInternalFields
Return true if internal ebean fields in entity classes should be transient. -
isCheckNullManyFields
Return true if we should add null checking on *ToMany fields.On getting a many that is null Ebean will create an empty List, Set or Map. If it is a ManyToMany it will turn on Modify listening.
-
isAllowNullableDbArray
-
isThrowOnError
Return true if transform should throw exception rather than log and return null. -
setThrowOnError
Set to true if you want transform to throw exceptions rather than return null. -
collectSummary
Turn on the summary collection of the enhancement. -
summaryTransactional
Add the transactional enhanced class to summary information. -
summaryEntity
Add the entity enhanced class to summary information. -
summaryQueryBean
Add the query bean enhanced class to summary information. -
summaryQueryBeanCaller
Add the query bean caller enhanced class to summary information. -
summaryFieldAccessUser
Add the enhanced class with field access replacement to summary information. -
getSummaryInfo
Deprecated. -
summaryInfo
Return the summary of the enhancement.Note that
collectSummary()must be called in order for summary information to be collected and returned here. -
accPublic
-
accProtected
-
accPrivate
-
isToManyGetField
-
isEnhancedToString
-
interceptNew
-
visitMethodInsnIntercept
-
interceptAddReadOnly
-
supportsProfileWithLine
-
profileLineMode
-