|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Translator
An implementation of this interface in order to transform class files. The transformation occurs before the class is defined by the JVM.
ClassFileTransformer| Method Summary | |
|---|---|
byte[] |
transform(DomainClassLoader loader,
String className,
Class<?> classBeingRedefined,
ProtectionDomain protectionDomain,
byte[] classfileBuffer)
The implementation of this method may transform the supplied class file and return a new replacement class file. |
void |
unregisterClassLoader(DomainClassLoader loader)
Called to indicate that the ClassLoader is being discarded by the server. |
| Method Detail |
|---|
byte[] transform(DomainClassLoader loader,
String className,
Class<?> classBeingRedefined,
ProtectionDomain protectionDomain,
byte[] classfileBuffer)
throws IllegalClassFormatException
loader - - the DomainClassLoader owning the defining loader of the
class to be transformed, may be null if the bootstrap loaderclassName - - the name of the class in the internal form of fully
qualified class and interface names.classBeingRedefined - - if this is a redefine, the class being redefined,
otherwise nullprotectionDomain - - the protection domain of the class being defined or redefinedclassfileBuffer - - the input byte buffer in class file format - must not be modified
null if no transform is performed.
IllegalClassFormatException - if the input does not represent a well-formed class fileInstrumentation.redefineClasses(java.lang.instrument.ClassDefinition[])void unregisterClassLoader(DomainClassLoader loader)
loader - - a class loader that has possibly been used previously
as an argument to transform.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||