Name

ClassDefinition

Synopsis

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( );  
}

Passed To

Instrumentation.redefineClasses( )

Get Java in a Nutshell, 5th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.