|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface LoadtimeInstrumentationPlugin
Plugins that implement this interface are allowed to modify types as they are loaded - this can be necessary sometimes to ensure,
for example, that a particular field is accessible later when a reload event occurs or that some factory method returns a wrapper
rather than the original object it intended to. For information on how to register plugins with the agent, see Plugin
| Method Summary | |
|---|---|
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. |
| Method Detail |
|---|
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 - bytes - the classfile contents for the type
byte[] modify(java.lang.String slashedClassName,
java.lang.ClassLoader classLoader,
byte[] bytes)
slashedTypeName - the type name, slashed form (e.g. java/lang/String)classLoader - the classloader loading the typebytes - the classfile contents for the type
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||