| java.lang.Object sun.misc.ClassFileTransformer
ClassFileTransformer | abstract public class ClassFileTransformer (Code) | | This is an abstract base class which is called by java.lang.ClassLoader
when ClassFormatError is thrown inside defineClass().
The purpose of this class is to allow applications (e.g. Java Plug-in)
to have a chance to transform the byte code from one form to another
if necessary.
One application of this class is used by Java Plug-in to transform
malformed JDK 1.1 class file into a well-formed Java 2 class file
on-the-fly, so JDK 1.1 applets with malformed class file in the
Internet may run in Java 2 after transformation.
author: Stanley Man-Kit Ho |
Method Summary | |
public static void | add(ClassFileTransformer t) Add the class file transformer object. | public static Object[] | getTransformers() Get the array of ClassFileTransformer object. | abstract public byte[] | transform(byte[] b, int off, int len) Transform a byte array from one to the other. |
add | public static void add(ClassFileTransformer t)(Code) | | Add the class file transformer object.
Parameters: t - Class file transformer instance |
getTransformers | public static Object[] getTransformers()(Code) | | Get the array of ClassFileTransformer object.
ClassFileTransformer object array |
transform | abstract public byte[] transform(byte[] b, int off, int len) throws ClassFormatError(Code) | | Transform a byte array from one to the other.
Parameters: b - Byte array Parameters: off - Offset Parameters: len - Length of byte array Transformed byte array |
|
|