Package io.ebean.enhance
Class Transformer
java.lang.Object
io.ebean.enhance.Transformer
- All Implemented Interfaces:
ClassFileTransformer
A Class file Transformer that performs Ebean enhancement of entity beans,
transactional methods and query bean enhancement.
This is used as both a java agent or via Maven and Gradle plugins etc.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionTransformer(ClassBytesReader bytesReader, String agentArgs, AgentManifest manifest) Create a transformer for entity bean enhancement and transactional method enhancement.Transformer(EnhanceContext enhanceContext) Create with an EnhancementContext (for IDE Plugins mainly)Transformer(ClassLoader classLoader, String agentArgs) -
Method Summary
Modifier and TypeMethodDescriptionstatic voidagentmain(String agentArgs, Instrumentation inst) static Transformerget()Return the Transformer instance.intReturn the list of unresolved common superclass issues.static StringReturn the version of the ebean-agent or "unknown" if the version can not be determined.static InstrumentationReturn the Instrumentation instance.voidstatic URL[]parseClassPaths(String extraClassPath) Helper method to split semi-colon separated class paths into a URL array.static voidpremain(String agentArgs, Instrumentation inst) voidSet this to keep and report unresolved explicitly.voidsetLogout(MessageOutput logout) Change the logout to something other than system out.byte[]transform(ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) static voidUse agent loader if necessary to initialise the transformer.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.instrument.ClassFileTransformer
transform
-
Field Details
-
EBEAN_ASM_VERSION
- See Also:
-
-
Constructor Details
-
Transformer
-
Transformer
Create with an EnhancementContext (for IDE Plugins mainly) -
Transformer
Create a transformer for entity bean enhancement and transactional method enhancement.- Parameters:
bytesReader- reads resources from class path for related inheritance and interfacesagentArgs- command line arguments for debug level etc
-
-
Method Details
-
getVersion
Return the version of the ebean-agent or "unknown" if the version can not be determined. -
agentmain
-
premain
-
instrumentation
Return the Instrumentation instance. -
get
Return the Transformer instance. -
verifyInitialization
Use agent loader if necessary to initialise the transformer. -
setKeepUnresolved
Set this to keep and report unresolved explicitly. -
setLogout
Change the logout to something other than system out. -
log
-
getLogLevel
-
getEnhanceContext
-
transform
public byte[] transform(ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws IllegalClassFormatException - Specified by:
transformin interfaceClassFileTransformer- Throws:
IllegalClassFormatException
-
getUnresolved
Return the list of unresolved common superclass issues. This should be cleared after each use and can only be used withsetKeepUnresolved(). -
parseClassPaths
Helper method to split semi-colon separated class paths into a URL array.
-