public class EnhanceContext extends Object
| Constructor and Description |
|---|
EnhanceContext(ClassBytesReader classBytesReader,
String agentArgs,
AgentManifest manifest)
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.
|
String |
getProperty(String key)
Return a value from the entity arguments using its key.
|
boolean |
getPropertyBoolean(String key,
boolean defaultValue) |
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 |
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 |
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.
|
public EnhanceContext(ClassBytesReader classBytesReader, String agentArgs, AgentManifest manifest)
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 String getProperty(String key)
public boolean getPropertyBoolean(String key, boolean defaultValue)
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()
Copyright © 2017. All rights reserved.