public interface LoadtimeInstrumentationPlugin extends Plugin
Plugin
Modifier and Type | Method and Description |
---|---|
boolean |
accept(java.lang.String slashedTypeName,
java.lang.ClassLoader classLoader,
java.security.ProtectionDomain protectionDomain,
byte[] bytes)
Called by the agent to determine if this plugin is interested in changing the specified type at load time.
|
byte[] |
modify(java.lang.String slashedClassName,
java.lang.ClassLoader classLoader,
byte[] bytes)
Once accept has returned true for a type, the modify method will be called to make the actual change to the classfile bytes.
|
boolean accept(java.lang.String slashedTypeName, java.lang.ClassLoader classLoader, java.security.ProtectionDomain protectionDomain, byte[] bytes)
slashedTypeName
- the type name, slashed form (e.g. java/lang/String)classLoader
- the classloader loading the typeprotectionDomain
- the ProtectionDomain for the class represented by the bytesbytes
- the classfile contents for the typebyte[] modify(java.lang.String slashedClassName, java.lang.ClassLoader classLoader, byte[] bytes)
slashedClassName
- the class name, slashed form (e.g. java/lang/String)classLoader
- the classloader loading the typebytes
- the classfile contents for the type