English | Site Directory

Android - An Open Handset Alliance Project

java.lang.instrument
public final class

java.lang.instrument.ClassDefinition

java.lang.Object
java.lang.instrument.ClassDefinition

Wraps a Class that is to be redefined together with the byte array which constitutes the updated version of the class.

Summary

Public Constructors

          ClassDefinition(Class theClass, byte[] theClassFile)
Constructs a new instance of ClassDefinition with the supplied Class object and byte array representing the new class file bytes.

Public Methods

        Class  getDefinitionClass()
Returns the Class object for the class to be redefined.
        byte[]  getDefinitionClassFile()
Returns a reference to the byte array containing the re-engineered version of the class.
Methods inherited from class java.lang.Object

Details

Public Constructors

public ClassDefinition(Class theClass, byte[] theClassFile)

Constructs a new instance of ClassDefinition with the supplied Class object and byte array representing the new class file bytes.

Parameters

theClass the Class object for the class to be redefined
theClassFile an array of bytes containing the updated version of the class to be redefined.

Throws

NullPointerException if either theClass or theClassFile are null.

Public Methods

public Class getDefinitionClass()

Returns the Class object for the class to be redefined.

Returns

  • the Class object

public byte[] getDefinitionClassFile()

Returns a reference to the byte array containing the re-engineered version of the class.

Returns

  • byte array containing the new version of the class
Build m5-rc15g - 14 May 2008 12:50