Package 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.
-
Interface Summary Interface Description ClassPath ClassPath
is an interface implemented by objects representing a class search path.CodeConverter.ArrayAccessReplacementMethodNames Interface containing the method names to be used as array access replacements.Translator An observer ofLoader
. -
Class Summary Class Description ByteArrayClassPath AByteArrayClassPath
contains bytes that is served as a class file to aClassPool
.ClassClassPath A search-path for obtaining a class file bygetResourceAsStream()
injava.lang.Class
.ClassMap A hash table associating class names with different names.ClassPathList ClassPool A container ofCtClass
objects.ClassPoolTail CodeConverter Simple translator of method bodies (also see thejavassist.expr
package).CodeConverter.DefaultArrayAccessReplacementMethodNames Default implementation of theArrayAccessReplacementMethodNames
interface giving default values for method names to be used for replacing accesses to array elements.CtArray Array types.CtBehavior CtBehavior
represents a method, a constructor, or a static constructor (class initializer).CtClass An instance ofCtClass
represents a class.CtClass.DelayedFileOutputStream CtClassType Class types.CtConstructor An instance of CtConstructor represents a constructor.CtField An instance of CtField represents a field.CtField.ArrayInitializer CtField.CodeInitializer CtField.CodeInitializer0 CtField.DoubleInitializer CtField.FloatInitializer CtField.Initializer Instances of this class specify how to initialize a field.CtField.IntInitializer CtField.LongInitializer CtField.MethodInitializer A field initialized with the result of a static method call.CtField.MultiArrayInitializer CtField.NewInitializer A field initialized with an object created by the new operator.CtField.ParamInitializer A field initialized with a parameter passed to the constructor of the class containing that field.CtField.PtreeInitializer CtField.StringInitializer CtMember An instance ofCtMember
represents a field, a constructor, or a method.CtMember.Cache CtMethod An instance ofCtMethod
represents a method.CtMethod.ConstParameter Instances of this class represent a constant parameter.CtMethod.IntConstParameter CtMethod.LongConstParameter CtMethod.StringConstParameter CtNewClass CtNewConstructor A collection of static methods for creating aCtConstructor
.CtNewMethod A collection of static methods for creating aCtMethod
.CtNewNestedClass A newly created public nested class.CtNewWrappedConstructor CtNewWrappedMethod CtPrimitiveType An instance ofCtPrimitiveType
represents a primitive type.DirClassPath FieldInitLink JarClassPath JarDirClassPath Loader The class loader for Javassist.LoaderClassPath A class search-path representing a class loader.Modifier The Modifier class provides static methods and constants to decode class and member access modifiers.SerialVersionUID Utility for calculating serialVersionUIDs for Serializable classes.URLClassPath A class search-path specified with URL (http). -
Exception Summary Exception Description CannotCompileException Thrown when bytecode transformation has failed.NotFoundException Signals that something could not be found.