public interface Translator
ClassFileTransformer| Modifier and Type | Method and Description |
|---|---|
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.
|
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 modifiednull 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.Copyright © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.