public class EnhanceContext extends Object
| Constructor and Description |
|---|
EnhanceContext(ClassBytesReader classBytesReader,
String agentArgs,
AgentManifest manifest) |
EnhanceContext(ClassBytesReader classBytesReader,
String agentArgs,
AgentManifest manifest,
ClassMetaCache metaCache)
Construct a context for enhancement.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addClassMeta(ClassMeta meta) |
ClassMeta |
createClassMeta()
Create a new meta object for enhancing a class.
|
TransactionalMethodKey |
createMethodKey(String className,
String methodName,
String methodDesc,
int profileId)
Create a TransactionalMethodKey with (maybe) a profileId.
|
boolean |
detectEntityTransactionalEnhancement(String className)
Return true if this class should be scanned for transactional enhancement.
|
boolean |
detectQueryBeanEnhancement(String className)
Return true if this class should be scanned for query bean enhancement.
|
ClassMeta |
get(String className) |
byte[] |
getClassBytes(String className,
ClassLoader classLoader) |
ClassMeta |
getInterfaceMeta(String interfaceClassName,
ClassLoader classLoader)
Read the class meta data for an interface.
|
int |
getLogLevel()
Return the log level.
|
ClassMeta |
getSuperMeta(String superClassName,
ClassLoader classLoader)
Read the class meta data for a super class.
|
List<TransactionalMethodKey> |
getTransactionProfilingKeys()
Return the profiling transaction keys.
|
boolean |
isCheckNullManyFields()
Return true if we should add null checking on *ToMany fields.
|
boolean |
isEnableProfileLocation()
Return true if profile location enhancement is on.
|
boolean |
isEnableQueryAutoLabel()
Return true if enhancement should automatically set labels on queries.
|
boolean |
isIgnoreClass(String className)
Return true if this class should be ignored.
|
boolean |
isLog(int level) |
boolean |
isQueryBean(String owner)
Return true if the owner class is a type query bean.
|
boolean |
isThrowOnError()
Return true if transform should throw exception rather than log and return null.
|
boolean |
isTransientInternalFields()
Return true if internal ebean fields in entity classes should be transient.
|
void |
log(int level,
String className,
String msg)
Log some debug output.
|
void |
log(String className,
String msg) |
void |
log(Throwable e)
Log an error.
|
void |
setLogout(MessageOutput logout)
Change the logout to something other than system out.
|
void |
setThrowOnError(boolean throwOnError)
Set to true if you want transform to throw exceptions rather than return null.
|
public EnhanceContext(ClassBytesReader classBytesReader, String agentArgs, AgentManifest manifest)
public EnhanceContext(ClassBytesReader classBytesReader, String agentArgs, AgentManifest manifest, ClassMetaCache metaCache)
public byte[] getClassBytes(String className, ClassLoader classLoader)
public boolean isQueryBean(String owner)
If true typically means the caller needs to change GETFIELD calls to instead invoke the generated 'property access' methods.
public boolean isEnableProfileLocation()
public boolean isEnableQueryAutoLabel()
public boolean detectEntityTransactionalEnhancement(String className)
public boolean detectQueryBeanEnhancement(String className)
public boolean isIgnoreClass(String className)
public void setLogout(MessageOutput logout)
public ClassMeta createClassMeta()
public ClassMeta getSuperMeta(String superClassName, ClassLoader classLoader)
Typically used to read meta data for inheritance hierarchy.
public ClassMeta getInterfaceMeta(String interfaceClassName, ClassLoader classLoader)
Typically used to check the interface to see if it is transactional.
public void addClassMeta(ClassMeta meta)
public boolean isLog(int level)
public int getLogLevel()
public boolean isTransientInternalFields()
public boolean isCheckNullManyFields()
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.
public TransactionalMethodKey createMethodKey(String className, String methodName, String methodDesc, int profileId)
public List<TransactionalMethodKey> getTransactionProfilingKeys()
public boolean isThrowOnError()
public void setThrowOnError(boolean throwOnError)
Copyright © 2019. All rights reserved.