March 2005
Intermediate to advanced
1254 pages
104h 21m
English
ClassDefinition
This class is a simple wrapper around a
Class object and an array of bytes that represents
a class file for that class. An array of
ClassDefinition objects is passed to the
redefineClasses( ) method of the
Instrumentation class. Class redefinitions are
allowed to change method implementations, but not the members or
inheritance of a class or the signature of the methods.
public final class ClassDefinition { // Public Constructors public ClassDefinition(Class<?> theClass, byte[ ] theClassFile); // Public Instance Methods public Class<?> getDefinitionClass( ); public byte[ ] getDefinitionClassFile( ); }
Instrumentation.redefineClasses( )