javassist |
The Javassist Core API.
Javassist (Java programming assistant) makes bytecode
engineering simple. It is a class library for editing
bytecode in Java; it enables Java programs to define a new class at
runtime and to modify a given class file when the JVM loads it.
The most significant class of this package is CtClass .
See the description of this class first.
To know the version number of this package, type the following command:
java -jar javassist.jar
It prints the version number on the console.
|
Java Source File Name | Type | Comment |
ByteArrayClassPath.java | Class | A ByteArrayClassPath contains bytes that is served as
a class file to a ClassPool . |
CannotCompileException.java | Class | Thrown when bytecode transformation has failed. |
ClassClassPath.java | Class | A search-path for obtaining a class file
by getResourceAsStream() in java.lang.Class .
Try adding a ClassClassPath when a program is running
with a user-defined class loader and any class files are not found with
the default ClassPool . |
ClassMap.java | Class | A hash table associating class names with different names.
This hashtable is used for replacing class names in a class
definition or a method body. |
ClassPath.java | Interface | ClassPath is an interface implemented by objects
representing a class search path. |
ClassPool.java | Class | A container of CtClass objects.
A CtClass object must be obtained from this object.
If get() is called on this object,
it searches various sources represented by ClassPath
to find a class file and then it creates a CtClass object
representing that class file. |
ClassPoolTail.java | Class | |
CodeConverter.java | Class | Simple translator of method bodies
(also see the javassist.expr package).
Instances of this class specifies how to instrument of the
bytecodes representing a method body. |
CtArray.java | Class | Array types. |
CtBehavior.java | Class | CtBehavior represents a method, a constructor,
or a static constructor (class initializer). |
CtClass.java | Class | An instance of CtClass represents a class. |
CtClassType.java | Class | Class types. |
CtConstructor.java | Class | An instance of CtConstructor represents a constructor.
It may represent a static constructor
(class initializer). |
CtField.java | Class | An instance of CtField represents a field. |
CtMember.java | Class | An instance of CtMember represents a field, a constructor,
or a method. |
CtMethod.java | Class | An instance of CtMethod represents a method. |
CtNewClass.java | Class | |
CtNewConstructor.java | Class | A collection of static methods for creating a CtConstructor .
An instance of this class does not make any sense.
A class initializer (static constructor) cannot be created by the
methods in this class. |
CtNewMethod.java | Class | A collection of static methods for creating a CtMethod . |
CtNewNestedClass.java | Class | A newly created public nested class. |
CtNewWrappedConstructor.java | Class | |
CtNewWrappedMethod.java | Class | |
CtPrimitiveType.java | Class | An instance of CtPrimitiveType represents a primitive type. |
Loader.java | Class | The class loader for Javassist.
This is a sample class loader using ClassPool .
Unlike a regular class loader, this class loader obtains bytecode
from a ClassPool .
Note that Javassist can be used without this class loader; programmers
can define their own versions of class loader. |
LoaderClassPath.java | Class | A class search-path representing a class loader.
It is used for obtaining a class file from the given
class loader by getResourceAsStream() .
The LoaderClassPath refers to the class loader through
WeakReference . |
Modifier.java | Class | The Modifier class provides static methods and constants to decode
class and member access modifiers. |
NotFoundException.java | Class | Signals that something could not be found. |
SerialVersionUID.java | Class | Utility for calculating serialVersionUIDs for Serializable classes. |
Translator.java | Interface | An observer of Loader . |
URLClassPath.java | Class | A class search-path specified with URL (http). |