| Package | Description | 
|---|---|
| javassist | The Javassist Core API. | 
| javassist.bytecode | Bytecode-level API. | 
| javassist.bytecode.analysis | Bytecode Analysis API. | 
| javassist.bytecode.annotation | Bytecode-level Annotations API. | 
| javassist.bytecode.stackmap | |
| javassist.compiler | |
| javassist.convert | |
| javassist.expr | This package contains the classes for modifying a method body. | 
| javassist.scopedpool | A custom class pool for several JBoss products. | 
| javassist.tools.reflect | Runtime Behavioral Reflection. | 
| Modifier and Type | Class and Description | 
|---|---|
| class  | CtPrimitiveTypeAn instance of  CtPrimitiveTyperepresents a primitive type. | 
| Modifier and Type | Field and Description | 
|---|---|
| static CtClass | CtClass. booleanTypeThe  CtClassobject representing
 thebooleantype. | 
| static CtClass | CtClass. byteTypeThe  CtClassobject representing
 thebytetype. | 
| static CtClass | CtClass. charTypeThe  CtClassobject representing
 thechartype. | 
| protected CtClass | CtMember. declaringClass | 
| static CtClass | CtClass. doubleTypeThe  CtClassobject representing
 thedoubletype. | 
| static CtClass | CtClass. floatTypeThe  CtClassobject representing
 thefloattype. | 
| static CtClass | CtClass. intTypeThe  CtClassobject representing
 theinttype. | 
| static CtClass | CtClass. longTypeThe  CtClassobject representing
 thelongtype. | 
| static CtClass | CtClass. shortTypeThe  CtClassobject representing
 theshorttype. | 
| static CtClass | CtClass. voidTypeThe  CtClassobject representing
 thevoidtype. | 
| Modifier and Type | Method and Description | 
|---|---|
| protected CtClass | ClassPool. createCtClass(String classname,
             boolean useCache)Creates a CtClass object representing the specified class. | 
| CtClass | ClassPool. get(String classname)Reads a class file from the source and returns a reference
 to the  CtClassobject representing that class file. | 
| CtClass[] | ClassPool. get(String[] classnames)Reads class files from the source and returns an array of
  CtClassobjects representing those class files. | 
| protected CtClass | ClassPool. get0(String classname,
    boolean useCache) | 
| CtClass | ClassPool. getAndRename(String orgName,
            String newName)Reads a class file and constructs a  CtClassobject with a new name. | 
| protected CtClass | ClassPool. getCached(String classname)Provide a hook so that subclasses can do their own
 caching of classes. | 
| CtClass | CtClass. getComponentType()If this object represents an array, this method returns the component
 type of the array. | 
| CtClass | ClassPool. getCtClass(String classname)Returns a  CtClassobject with the given name. | 
| CtClass[] | CtClass. getDeclaredClasses()Returns an array of nested classes declared in the class. | 
| CtClass | CtClass. getDeclaringClass()If this class is a member class or interface of another class,
 then the class enclosing this class is returned. | 
| CtClass | CtMember. getDeclaringClass()Returns the class that declares this member. | 
| CtClass | CtField. getDeclaringClass()Returns the class declaring the field. | 
| CtClass[] | CtBehavior. getExceptionTypes()Obtains exceptions that this method/constructor may throw. | 
| CtClass[] | CtClass. getInterfaces()Obtains the class objects representing the interfaces implemented
 by the class or, if this object represents an interface, the interfaces
 extended by that interface. | 
| CtClass[] | CtClass. getNestedClasses()Returns an array of nested classes declared in the class. | 
| CtClass | ClassPool. getOrNull(String classname)Reads a class file from the source and returns a reference
 to the  CtClassobject representing that class file. | 
| CtClass[] | CtBehavior. getParameterTypes()Obtains parameter types of this method/constructor. | 
| CtClass | CtMethod. getReturnType()Obtains the type of the returned value. | 
| CtClass | CtClass. getSuperclass()Obtains the class object representing the superclass of the
 class. | 
| CtClass | CtField. getType()Returns the type of the field. | 
| CtClass | ClassPool. makeAnnotation(String name)Creates a new annotation. | 
| CtClass | ClassPool. makeClass(ClassFile classfile)Creates a new class (or interface) from the given class file. | 
| CtClass | ClassPool. makeClass(ClassFile classfile,
         boolean ifNotFrozen)Creates a new class (or interface) from the given class file. | 
| CtClass | ClassPool. makeClass(InputStream classfile)Creates a new class (or interface) from the given class file. | 
| CtClass | ClassPool. makeClass(InputStream classfile,
         boolean ifNotFrozen)Creates a new class (or interface) from the given class file. | 
| CtClass | ClassPool. makeClass(String classname)Creates a new public class. | 
| CtClass | ClassPool. makeClass(String classname,
         CtClass superclass)Creates a new public class. | 
| CtClass | ClassPool. makeClassIfNew(InputStream classfile)Creates a new class (or interface) from the given class file. | 
| CtClass | ClassPool. makeInterface(String name)Creates a new public interface. | 
| CtClass | ClassPool. makeInterface(String name,
             CtClass superclass)Creates a new public interface. | 
| CtClass | CtClass. makeNestedClass(String name,
               boolean isStatic)Makes a new public nested class. | 
| protected CtClass | ClassPool. removeCached(String classname)Provide a hook so that subclasses can do their own
 caching of classes. | 
| Modifier and Type | Method and Description | 
|---|---|
| static CtMethod | CtNewMethod. abstractMethod(CtClass returnType,
              String mname,
              CtClass[] parameters,
              CtClass[] exceptions,
              CtClass declaring)Creates a public abstract method. | 
| static CtMethod | CtNewMethod. abstractMethod(CtClass returnType,
              String mname,
              CtClass[] parameters,
              CtClass[] exceptions,
              CtClass declaring)Creates a public abstract method. | 
| static CtMethod | CtNewMethod. abstractMethod(CtClass returnType,
              String mname,
              CtClass[] parameters,
              CtClass[] exceptions,
              CtClass declaring)Creates a public abstract method. | 
| void | CtBehavior. addCatch(String src,
        CtClass exceptionType)Adds a catch clause that handles an exception thrown in the
 body. | 
| void | CtBehavior. addCatch(String src,
        CtClass exceptionType,
        String exceptionName)Adds a catch clause that handles an exception thrown in the
 body. | 
| void | CtClass. addInterface(CtClass anInterface)Adds an interface. | 
| void | CtBehavior. addLocalVariable(String name,
                CtClass type)Declares a new local variable. | 
| void | CtBehavior. addParameter(CtClass type)Appends a new parameter, which becomes the last parameter. | 
| static CtField.Initializer | CtField.Initializer. byCall(CtClass methodClass,
      String methodName)Makes an initializer calling a static method. | 
| static CtField.Initializer | CtField.Initializer. byCall(CtClass methodClass,
      String methodName,
      String[] stringParams)Makes an initializer calling a static method. | 
| static CtField.Initializer | CtField.Initializer. byCallWithParams(CtClass methodClass,
                String methodName)Makes an initializer calling a static method. | 
| static CtField.Initializer | CtField.Initializer. byCallWithParams(CtClass methodClass,
                String methodName,
                String[] stringParams)Makes an initializer calling a static method. | 
| static CtField.Initializer | CtField.Initializer. byNew(CtClass objectType)Makes an initializer creating a new object. | 
| static CtField.Initializer | CtField.Initializer. byNew(CtClass objectType,
     String[] stringParams)Makes an initializer creating a new object. | 
| static CtField.Initializer | CtField.Initializer. byNewArray(CtClass type,
          int size)Makes an initializer creating a new array. | 
| static CtField.Initializer | CtField.Initializer. byNewArray(CtClass type,
          int[] sizes)Makes an initializer creating a new multi-dimensional array. | 
| static CtField.Initializer | CtField.Initializer. byNewWithParams(CtClass objectType)Makes an initializer creating a new object. | 
| static CtField.Initializer | CtField.Initializer. byNewWithParams(CtClass objectType,
               String[] stringParams)Makes an initializer creating a new object. | 
| protected void | ClassPool. cacheCtClass(String classname,
            CtClass c,
            boolean dynamic)Provides a hook so that subclasses can do their own
 caching of classes. | 
| static long | SerialVersionUID. calculateDefault(CtClass clazz)Calculate default value. | 
| static CtConstructor | CtNewConstructor. copy(CtConstructor c,
    CtClass declaring,
    ClassMap map)Creates a copy of a constructor. | 
| static CtMethod | CtNewMethod. copy(CtMethod src,
    CtClass declaring,
    ClassMap map)Creates a copy of a method. | 
| static CtMethod | CtNewMethod. copy(CtMethod src,
    String name,
    CtClass declaring,
    ClassMap map)Creates a copy of a method with a new name. | 
| static CtConstructor | CtNewConstructor. defaultConstructor(CtClass declaring)Creates a default (public) constructor. | 
| static CtMethod | CtNewMethod. delegator(CtMethod delegate,
         CtClass declaring)Creates a method forwarding to a delegate in
 a super class. | 
| protected void | CodeConverter. doit(CtClass clazz,
    MethodInfo minfo,
    ConstPool cp)Performs code conversion. | 
| void | ClassMap. fix(CtClass clazz)Prevents a mapping from the specified class name to another name. | 
| CtConstructor | CtClass. getDeclaredConstructor(CtClass[] params)Returns a constructor receiving the specified parameters. | 
| CtMethod | CtClass. getDeclaredMethod(String name,
                 CtClass[] params)Retrieves the method with the specified name and parameter types
 among the methods declared in the class. | 
| void | CtBehavior. insertParameter(CtClass type)Inserts a new parameter, which becomes the first parameter. | 
| static CtConstructor | CtNewConstructor. make(CtClass[] parameters,
    CtClass[] exceptions,
    CtClass declaring)Creates a public constructor that only calls a constructor
 in the super class. | 
| static CtConstructor | CtNewConstructor. make(CtClass[] parameters,
    CtClass[] exceptions,
    CtClass declaring)Creates a public constructor that only calls a constructor
 in the super class. | 
| static CtConstructor | CtNewConstructor. make(CtClass[] parameters,
    CtClass[] exceptions,
    CtClass declaring)Creates a public constructor that only calls a constructor
 in the super class. | 
| static CtConstructor | CtNewConstructor. make(CtClass[] parameters,
    CtClass[] exceptions,
    int howto,
    CtMethod body,
    CtMethod.ConstParameter cparam,
    CtClass declaring)Creates a public constructor. | 
| static CtConstructor | CtNewConstructor. make(CtClass[] parameters,
    CtClass[] exceptions,
    int howto,
    CtMethod body,
    CtMethod.ConstParameter cparam,
    CtClass declaring)Creates a public constructor. | 
| static CtConstructor | CtNewConstructor. make(CtClass[] parameters,
    CtClass[] exceptions,
    int howto,
    CtMethod body,
    CtMethod.ConstParameter cparam,
    CtClass declaring)Creates a public constructor. | 
| static CtConstructor | CtNewConstructor. make(CtClass[] parameters,
    CtClass[] exceptions,
    String body,
    CtClass declaring)Creates a public constructor. | 
| static CtConstructor | CtNewConstructor. make(CtClass[] parameters,
    CtClass[] exceptions,
    String body,
    CtClass declaring)Creates a public constructor. | 
| static CtConstructor | CtNewConstructor. make(CtClass[] parameters,
    CtClass[] exceptions,
    String body,
    CtClass declaring)Creates a public constructor. | 
| static CtMethod | CtNewMethod. make(CtClass returnType,
    String mname,
    CtClass[] parameters,
    CtClass[] exceptions,
    String body,
    CtClass declaring)Creates a public (non-static) method. | 
| static CtMethod | CtNewMethod. make(CtClass returnType,
    String mname,
    CtClass[] parameters,
    CtClass[] exceptions,
    String body,
    CtClass declaring)Creates a public (non-static) method. | 
| static CtMethod | CtNewMethod. make(CtClass returnType,
    String mname,
    CtClass[] parameters,
    CtClass[] exceptions,
    String body,
    CtClass declaring)Creates a public (non-static) method. | 
| static CtMethod | CtNewMethod. make(int modifiers,
    CtClass returnType,
    String mname,
    CtClass[] parameters,
    CtClass[] exceptions,
    String body,
    CtClass declaring)Creates a method. | 
| static CtMethod | CtNewMethod. make(int modifiers,
    CtClass returnType,
    String mname,
    CtClass[] parameters,
    CtClass[] exceptions,
    String body,
    CtClass declaring)Creates a method. | 
| static CtMethod | CtNewMethod. make(int modifiers,
    CtClass returnType,
    String mname,
    CtClass[] parameters,
    CtClass[] exceptions,
    String body,
    CtClass declaring)Creates a method. | 
| static CtMethod | CtMethod. make(MethodInfo minfo,
    CtClass declaring)Creates a method from a  MethodInfoobject. | 
| static CtMethod | CtMethod. make(String src,
    CtClass declaring)Compiles the given source code and creates a method. | 
| static CtMethod | CtNewMethod. make(String src,
    CtClass declaring)Compiles the given source code and creates a method. | 
| static CtConstructor | CtNewConstructor. make(String src,
    CtClass declaring)Compiles the given source code and creates a constructor. | 
| static CtField | CtField. make(String src,
    CtClass declaring)Compiles the given source code and creates a field. | 
| static CtMethod | CtNewMethod. make(String src,
    CtClass declaring,
    String delegateObj,
    String delegateMethod)Compiles the given source code and creates a method. | 
| CtClass | ClassPool. makeClass(String classname,
         CtClass superclass)Creates a new public class. | 
| CtClass | ClassPool. makeInterface(String name,
             CtClass superclass)Creates a new public interface. | 
| void | ClassMap. put(CtClass oldname,
   CtClass newname)Maps a class name to another name in this hashtable. | 
| void | CodeConverter. redirectFieldAccess(CtField field,
                   CtClass newClass,
                   String newFieldname)Modify a method body so that field read/write expressions access
 a different field from the original one. | 
| void | CodeConverter. replaceArrayAccess(CtClass calledClass,
                  CodeConverter.ArrayAccessReplacementMethodNames names)Modify a method body, so that ALL accesses to an array are replaced with 
 calls to static methods within another class. | 
| void | CodeConverter. replaceFieldRead(CtField field,
                CtClass calledClass,
                String calledMethod)Modify a method body so that an expression reading the specified
 field is replaced with a call to the specified static method. | 
| void | CodeConverter. replaceFieldWrite(CtField field,
                 CtClass calledClass,
                 String calledMethod)Modify a method body so that an expression writing the specified
 field is replaced with a call to the specified static method. | 
| void | CodeConverter. replaceNew(CtClass oldClass,
          CtClass newClass)Modify a method body so that instantiation of the class
 specified by  oldClassis replaced with instantiation of another classnewClass. | 
| void | CodeConverter. replaceNew(CtClass newClass,
          CtClass calledClass,
          String calledMethod)Modify a method body so that instantiation of the specified class
 is replaced with a call to the specified static method. | 
| void | CtBehavior. setExceptionTypes(CtClass[] types)Sets exceptions that this method/constructor may throw. | 
| void | CtClass. setInterfaces(CtClass[] list)Sets implemented interfaces. | 
| static void | SerialVersionUID. setSerialVersionUID(CtClass clazz)Adds serialVersionUID if one does not already exist. | 
| void | CtClass. setSuperclass(CtClass clazz)Changes a super class unless this object represents an interface. | 
| void | CtField. setType(CtClass clazz)Sets the type of the field. | 
| static CtConstructor | CtNewConstructor. skeleton(CtClass[] parameters,
        CtClass[] exceptions,
        CtClass declaring)Creates a public constructor that only calls a constructor
 in the super class. | 
| static CtConstructor | CtNewConstructor. skeleton(CtClass[] parameters,
        CtClass[] exceptions,
        CtClass declaring)Creates a public constructor that only calls a constructor
 in the super class. | 
| static CtConstructor | CtNewConstructor. skeleton(CtClass[] parameters,
        CtClass[] exceptions,
        CtClass declaring)Creates a public constructor that only calls a constructor
 in the super class. | 
| boolean | CtClass. subclassOf(CtClass superclass)Determines whether the class directly or indirectly extends
 the given class. | 
| boolean | CtClass. subtypeOf(CtClass clazz)Returns  trueif this class extends or implementsclazz. | 
| Class | ClassPool. toClass(CtClass clazz)Converts the given class to a  java.lang.Classobject. | 
| Class | ClassPool. toClass(CtClass ct,
       ClassLoader loader)Deprecated. 
 Replaced by  ClassPool.toClass(CtClass,ClassLoader,ProtectionDomain).
 A subclass ofClassPoolthat has been
 overriding this method should be modified.  It should overrideClassPool.toClass(CtClass,ClassLoader,ProtectionDomain). | 
| Class | ClassPool. toClass(CtClass ct,
       ClassLoader loader,
       ProtectionDomain domain)Converts the class to a  java.lang.Classobject. | 
| CtMethod | CtConstructor. toMethod(String name,
        CtClass declaring)Makes a copy of this constructor and converts it into a method. | 
| CtMethod | CtConstructor. toMethod(String name,
        CtClass declaring,
        ClassMap map)Makes a copy of this constructor and converts it into a method. | 
| boolean | CtMember. visibleFrom(CtClass clazz)Returns true if this member is accessible from the given class. | 
| static CtMethod | CtNewMethod. wrapped(CtClass returnType,
       String mname,
       CtClass[] parameterTypes,
       CtClass[] exceptionTypes,
       CtMethod body,
       CtMethod.ConstParameter constParam,
       CtClass declaring)Creates a wrapped method. | 
| static CtMethod | CtNewMethod. wrapped(CtClass returnType,
       String mname,
       CtClass[] parameterTypes,
       CtClass[] exceptionTypes,
       CtMethod body,
       CtMethod.ConstParameter constParam,
       CtClass declaring)Creates a wrapped method. | 
| static CtMethod | CtNewMethod. wrapped(CtClass returnType,
       String mname,
       CtClass[] parameterTypes,
       CtClass[] exceptionTypes,
       CtMethod body,
       CtMethod.ConstParameter constParam,
       CtClass declaring)Creates a wrapped method. | 
| Constructor and Description | 
|---|
| CtBehavior(CtClass clazz,
          MethodInfo minfo) | 
| CtConstructor(CtClass[] parameters,
             CtClass declaring)Creates a constructor with no constructor body. | 
| CtConstructor(CtClass[] parameters,
             CtClass declaring)Creates a constructor with no constructor body. | 
| CtConstructor(CtConstructor src,
             CtClass declaring,
             ClassMap map)Creates a copy of a  CtConstructorobject. | 
| CtConstructor(MethodInfo minfo,
             CtClass declaring) | 
| CtField(CtClass type,
       String name,
       CtClass declaring)Creates a  CtFieldobject. | 
| CtField(CtField src,
       CtClass declaring)Creates a copy of the given field. | 
| CtMember(CtClass clazz) | 
| CtMethod(CtClass returnType,
        String mname,
        CtClass[] parameters,
        CtClass declaring)Creates a public abstract method. | 
| CtMethod(CtClass returnType,
        String mname,
        CtClass[] parameters,
        CtClass declaring)Creates a public abstract method. | 
| CtMethod(CtMethod src,
        CtClass declaring,
        ClassMap map)Creates a copy of a  CtMethodobject. | 
| Modifier and Type | Field and Description | 
|---|---|
| static CtClass | Bytecode. THISRepresents the  CtClassfile using the
 constant pool table given to thisBytecodeobject. | 
| static CtClass | ConstPool. THISRepresents the class using this constant pool table. | 
| Modifier and Type | Method and Description | 
|---|---|
| CtClass | SignatureAttribute.BaseType. getCtlass()Returns the  CtClassrepresenting this
 primitive type. | 
| static CtClass[] | Descriptor. getParameterTypes(String desc,
                 ClassPool cp)Returns the  CtClassobjects representing the parameter
 types specified by the given descriptor. | 
| static CtClass | Descriptor. getReturnType(String desc,
             ClassPool cp)Returns the  CtClassobject representing the return
 type specified by the given descriptor. | 
| static CtClass | Descriptor. toCtClass(String desc,
         ClassPool cp)Returns a  CtClassobject representing the type
 specified by the given descriptor. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | Bytecode. addAnewarray(CtClass clazz,
            int length)Appends ICONST and ANEWARRAY. | 
| void | Bytecode. addCheckcast(CtClass c)Appends CHECKCAST. | 
| int | ConstPool. addClassInfo(CtClass c)Adds a new  CONSTANT_Class_infostructure. | 
| void | Bytecode. addConstZero(CtClass type)Appends an instruction for pushing zero or null on the stack. | 
| void | Bytecode. addExceptionHandler(int start,
                   int end,
                   int handler,
                   CtClass type)Adds a new entry of  exception_table. | 
| void | Bytecode. addGetfield(CtClass c,
           String name,
           String type)Appends GETFIELD. | 
| void | Bytecode. addGetstatic(CtClass c,
            String name,
            String type)Appends GETSTATIC. | 
| void | Bytecode. addInvokeinterface(CtClass clazz,
                  String name,
                  CtClass returnType,
                  CtClass[] paramTypes,
                  int count)Appends INVOKEINTERFACE. | 
| void | Bytecode. addInvokeinterface(CtClass clazz,
                  String name,
                  CtClass returnType,
                  CtClass[] paramTypes,
                  int count)Appends INVOKEINTERFACE. | 
| void | Bytecode. addInvokeinterface(CtClass clazz,
                  String name,
                  String desc,
                  int count)Appends INVOKEINTERFACE. | 
| void | Bytecode. addInvokespecial(CtClass clazz,
                String name,
                CtClass returnType,
                CtClass[] paramTypes)Appends INVOKESPECIAL. | 
| void | Bytecode. addInvokespecial(CtClass clazz,
                String name,
                CtClass returnType,
                CtClass[] paramTypes)Appends INVOKESPECIAL. | 
| void | Bytecode. addInvokespecial(CtClass clazz,
                String name,
                String desc)Appends INVOKESPECIAL. | 
| void | Bytecode. addInvokestatic(CtClass clazz,
               String name,
               CtClass returnType,
               CtClass[] paramTypes)Appends INVOKESTATIC. | 
| void | Bytecode. addInvokestatic(CtClass clazz,
               String name,
               CtClass returnType,
               CtClass[] paramTypes)Appends INVOKESTATIC. | 
| void | Bytecode. addInvokestatic(CtClass clazz,
               String name,
               String desc)Appends INVOKESTATIC. | 
| void | Bytecode. addInvokevirtual(CtClass clazz,
                String name,
                CtClass returnType,
                CtClass[] paramTypes)Appends INVOKEVIRTUAL. | 
| void | Bytecode. addInvokevirtual(CtClass clazz,
                String name,
                CtClass returnType,
                CtClass[] paramTypes)Appends INVOKEVIRTUAL. | 
| void | Bytecode. addInvokevirtual(CtClass clazz,
                String name,
                String desc)Appends INVOKEVIRTUAL. | 
| int | Bytecode. addLoad(int n,
       CtClass type)Appends an instruction for loading a value from the
 local variable at the index  n. | 
| int | Bytecode. addLoadParameters(CtClass[] params,
                 int offset)Appends instructions for loading all the parameters onto the
 operand stack. | 
| int | Bytecode. addMultiNewarray(CtClass clazz,
                int dim)Appends MULTINEWARRAY. | 
| int | Bytecode. addMultiNewarray(CtClass clazz,
                int[] dimensions)Appends MULTINEWARRAY. | 
| void | Bytecode. addNew(CtClass clazz)Appends NEW. | 
| void | Bytecode. addPutfield(CtClass c,
           String name,
           String desc)Appends PUTFIELD. | 
| void | Bytecode. addPutstatic(CtClass c,
            String name,
            String desc)Appends PUTSTATIC. | 
| void | Bytecode. addReturn(CtClass type)Appends ARETURN, IRETURN, .., or RETURN. | 
| int | Bytecode. addStore(int n,
        CtClass type)Appends an instruction for storing a value into the
 local variable at the index  n. | 
| static String | Descriptor. appendParameter(CtClass type,
               String descriptor)Appends a parameter type to the parameter list represented
 by the given descriptor. | 
| static String | Descriptor. insertParameter(CtClass type,
               String descriptor)Inserts a parameter type at the beginning of the parameter
 list represented
 by the given descriptor. | 
| static String | Descriptor. of(CtClass type)Returns the descriptor representing the given type. | 
| static String | Descriptor. ofConstructor(CtClass[] paramTypes)Returns the descriptor representing a constructor receiving
 the given parameter types. | 
| static String | Descriptor. ofMethod(CtClass returnType,
        CtClass[] paramTypes)Returns the descriptor representing a method that receives
 the given parameter types and returns the given type. | 
| static String | Descriptor. ofMethod(CtClass returnType,
        CtClass[] paramTypes)Returns the descriptor representing a method that receives
 the given parameter types and returns the given type. | 
| static String | Descriptor. ofParameters(CtClass[] paramTypes)Returns the descriptor representing a list of parameter types. | 
| void | Bytecode. setMaxLocals(boolean isStatic,
            CtClass[] params,
            int locals)Sets  max_locals. | 
| static String | Descriptor. toJvmName(CtClass clazz)Returns the internal representation of the class name in the
 JVM. | 
| Modifier and Type | Method and Description | 
|---|---|
| CtClass | Type. getCtClass()Returns the class this type represents. | 
| CtClass | MultiType. getCtClass()Gets the class that corresponds with this type. | 
| CtClass | MultiArrayType. getCtClass() | 
| Modifier and Type | Method and Description | 
|---|---|
| Frame[] | Analyzer. analyze(CtClass clazz,
       MethodInfo method)Performs data-flow analysis on a method and returns an array, indexed by
 instruction position, containing the starting frame state of all reachable
 instructions. | 
| static Type | Type. get(CtClass clazz)Obtain the Type for a given class. | 
| void | FramePrinter. print(CtClass clazz)Prints all the methods declared in the given class. | 
| static void | FramePrinter. print(CtClass clazz,
     PrintStream stream)Prints all the methods declared in the given class. | 
| Constructor and Description | 
|---|
| ControlFlow(CtClass ctclazz,
           MethodInfo minfo)Constructs a control-flow analyzer. | 
| Modifier and Type | Method and Description | 
|---|---|
| static MemberValue | Annotation. createMemberValue(ConstPool cp,
                 CtClass type)Makes an instance of  MemberValue. | 
| Constructor and Description | 
|---|
| Annotation(ConstPool cp,
          CtClass clazz)Constructs an annotation that can be accessed through the interface
 represented by  clazz. | 
| Modifier and Type | Method and Description | 
|---|---|
| static CtClass | TypeData. commonSuperClass(CtClass one,
                CtClass two)Finds the most specific common super class of the given classes. | 
| static CtClass | TypeData. commonSuperClassEx(CtClass one,
                  CtClass two)Finds the most specific common super class of the given classes
 by considering array types. | 
| Modifier and Type | Method and Description | 
|---|---|
| static CtClass | TypeData. commonSuperClass(CtClass one,
                CtClass two)Finds the most specific common super class of the given classes. | 
| static CtClass | TypeData. commonSuperClassEx(CtClass one,
                  CtClass two)Finds the most specific common super class of the given classes
 by considering array types. | 
| Modifier and Type | Field and Description | 
|---|---|
| CtClass | MemberResolver.Method. declaring | 
| protected CtClass | MemberCodeGen. thisClass | 
| protected CtClass | TypeChecker. thisClass | 
| Modifier and Type | Method and Description | 
|---|---|
| static CtClass | MemberResolver. getSuperclass(CtClass c) | 
| static CtClass | MemberResolver. getSuperInterface(CtClass c,
                 String interfaceName) | 
| CtClass | MemberCodeGen. getThisClass() | 
| CtClass | MemberResolver. lookupClass(Declarator decl) | 
| CtClass | MemberResolver. lookupClass(int type,
           int dim,
           String classname) | 
| CtClass | MemberResolver. lookupClass(String name,
           boolean notCheckInner) | 
| CtClass | MemberResolver. lookupClassByJvmName(String jvmName) | 
| CtClass | MemberResolver. lookupClassByName(ASTList name) | 
| CtClass[] | MemberCodeGen. makeParamList(MethodDecl md) | 
| CtClass[] | MemberCodeGen. makeThrowsList(MethodDecl md) | 
| Modifier and Type | Method and Description | 
|---|---|
| protected void | JvstCodeGen. atAssignParamList(CtClass[] params,
                 Bytecode code) | 
| MemberResolver.Method | TypeChecker. atMethodCallCore(CtClass targetClass,
                String mname,
                ASTList args) | 
| void | MemberCodeGen. atMethodCallCore(CtClass targetClass,
                String mname,
                ASTList args,
                boolean isStatic,
                boolean isSpecial,
                int aload0pos,
                MemberResolver.Method found) | 
| static int | JvstCodeGen. compileParameterList(Bytecode code,
                    CtClass[] params,
                    int regno) | 
| protected void | JvstTypeChecker. compileUnwrapValue(CtClass type) | 
| protected void | JvstCodeGen. compileUnwrapValue(CtClass type,
                  Bytecode code) | 
| void | JvstCodeGen. doNumCast(CtClass type) | 
| protected String | MemberCodeGen. getAccessibleConstructor(String desc,
                        CtClass declClass,
                        MethodInfo minfo) | 
| protected String | MemberCodeGen. getAccessiblePrivate(String methodName,
                    String desc,
                    String newDesc,
                    MethodInfo minfo,
                    CtClass declClass) | 
| String | AccessorMaker. getConstructor(CtClass c,
              String desc,
              MethodInfo orig) | 
| static CtClass | MemberResolver. getSuperclass(CtClass c) | 
| static CtClass | MemberResolver. getSuperInterface(CtClass c,
                 String interfaceName) | 
| MemberResolver.Method | MemberResolver. lookupMethod(CtClass clazz,
            CtClass currentClass,
            MethodInfo current,
            String methodName,
            int[] argTypes,
            int[] argDims,
            String[] argClassNames) | 
| int | Javac. recordParams(CtClass[] params,
            boolean isStatic)Makes variables $0 (this), $1, $2, ..., and $args represent method
 parameters. | 
| int | JvstCodeGen. recordParams(CtClass[] params,
            boolean isStatic,
            String prefix,
            String paramVarName,
            String paramsName,
            boolean use0,
            int paramBase,
            String target,
            SymbolTable tbl)Makes method parameters $0, $1, ..., $args, $$, and $class available. | 
| int | JvstCodeGen. recordParams(CtClass[] params,
            boolean isStatic,
            String prefix,
            String paramVarName,
            String paramsName,
            SymbolTable tbl)Makes method parameters $0, $1, ..., $args, $$, and $class available. | 
| int | Javac. recordParams(String target,
            CtClass[] params,
            boolean use0,
            int varNo,
            boolean isStatic)Makes variables $0, $1, $2, ..., and $args represent method
 parameters. | 
| int | Javac. recordReturnType(CtClass type,
                boolean useResultVar)Prepares to use cast $r, $w, $_, and $type. | 
| int | JvstCodeGen. recordReturnType(CtClass type,
                String castName,
                String resultName,
                SymbolTable tbl)Makes a cast to the return type ($r) available. | 
| void | Javac. recordType(CtClass t)Prepares to use $type. | 
| void | JvstCodeGen. recordType(CtClass t)Makes $type available. | 
| int | Javac. recordVariable(CtClass type,
              String name)Makes the given variable available. | 
| int | JvstCodeGen. recordVariable(CtClass type,
              String varName,
              SymbolTable tbl)Makes the given variable name available. | 
| void | JvstTypeChecker. setType(CtClass type) | 
| void | JvstCodeGen. setType(CtClass type) | 
| Constructor and Description | 
|---|
| AccessorMaker(CtClass c) | 
| Javac(Bytecode b,
     CtClass thisClass)Constructs a compiler. | 
| Javac(CtClass thisClass)Constructs a compiler. | 
| JvstCodeGen(Bytecode b,
           CtClass cc,
           ClassPool cp) | 
| JvstTypeChecker(CtClass cc,
               ClassPool cp,
               JvstCodeGen gen) | 
| MemberCodeGen(Bytecode b,
             CtClass cc,
             ClassPool cp) | 
| Method(CtClass c,
      MethodInfo i,
      int n) | 
| TypeChecker(CtClass cc,
           ClassPool cp) | 
| Modifier and Type | Field and Description | 
|---|---|
| protected CtClass | TransformReadField. fieldClass | 
| protected CtClass[] | TransformBefore. parameterTypes | 
| Modifier and Type | Method and Description | 
|---|---|
| void | Transformer. initialize(ConstPool cp,
          CtClass clazz,
          MethodInfo minfo) | 
| void | TransformAccessArrayField. initialize(ConstPool cp,
          CtClass clazz,
          MethodInfo minfo) | 
| protected void | TransformBefore. makeCode(CtClass[] paramTypes,
        ConstPool cp) | 
| abstract int | Transformer. transform(CtClass clazz,
         int pos,
         CodeIterator it,
         ConstPool cp) | 
| int | TransformNew. transform(CtClass clazz,
         int pos,
         CodeIterator iterator,
         ConstPool cp)Replace a sequence of
    NEW classname
    DUP
    ... | 
| int | TransformReadField. transform(CtClass tclazz,
         int pos,
         CodeIterator iterator,
         ConstPool cp) | 
| int | TransformFieldAccess. transform(CtClass clazz,
         int pos,
         CodeIterator iterator,
         ConstPool cp)Modify GETFIELD, GETSTATIC, PUTFIELD, and PUTSTATIC so that
 a different field is accessed. | 
| int | TransformWriteField. transform(CtClass tclazz,
         int pos,
         CodeIterator iterator,
         ConstPool cp) | 
| int | TransformAccessArrayField. transform(CtClass tclazz,
         int pos,
         CodeIterator iterator,
         ConstPool cp) | 
| int | TransformCall. transform(CtClass clazz,
         int pos,
         CodeIterator iterator,
         ConstPool cp)Modify INVOKEINTERFACE, INVOKESPECIAL, INVOKESTATIC and INVOKEVIRTUAL
 so that a different method is invoked. | 
| int | TransformNewClass. transform(CtClass clazz,
         int pos,
         CodeIterator iterator,
         ConstPool cp)Modifies a sequence of
    NEW classname
    DUP
    ... | 
| Modifier and Type | Method and Description | 
|---|---|
| CtClass | NewArray. getComponentType()Returns the type of array components. | 
| protected CtClass | MethodCall. getCtClass()Returns the class of the target object,
 which the method is called on. | 
| CtClass | Expr. getEnclosingClass()Returns the class that declares the method enclosing
 this expression. | 
| CtClass | Cast. getType()Returns the  CtClassobject representing
 the type specified by the cast. | 
| CtClass | Handler. getType()Returns the type handled by the catch clause. | 
| CtClass | Instanceof. getType()Returns the  CtClassobject representing
 the type name on the right hand side
 of the instanceof operator. | 
| CtClass[] | Expr. mayThrow()Returns the list of exceptions that the expression may throw. | 
| CtClass[] | NewExpr. mayThrow()Returns the list of exceptions that the expression may throw. | 
| CtClass[] | MethodCall. mayThrow()Returns the list of exceptions that the expression may throw. | 
| CtClass[] | NewArray. mayThrow()Returns the list of exceptions that the expression may throw. | 
| CtClass[] | Cast. mayThrow()Returns the list of exceptions that the expression may throw. | 
| CtClass[] | Handler. mayThrow()Returns the list of exceptions that the catch clause may throw. | 
| CtClass[] | Instanceof. mayThrow()Returns the list of exceptions that the expression may throw. | 
| CtClass[] | FieldAccess. mayThrow()Returns the list of exceptions that the expression may throw. | 
| Modifier and Type | Method and Description | 
|---|---|
| boolean | ExprEditor. doit(CtClass clazz,
    MethodInfo minfo)Undocumented method. | 
| Constructor and Description | 
|---|
| Cast(int pos,
    CodeIterator i,
    CtClass declaring,
    MethodInfo m)Undocumented constructor. | 
| ConstructorCall(int pos,
               CodeIterator i,
               CtClass decl,
               MethodInfo m)Undocumented constructor. | 
| Expr(int pos,
    CodeIterator i,
    CtClass declaring,
    MethodInfo m)Undocumented constructor. | 
| FieldAccess(int pos,
           CodeIterator i,
           CtClass declaring,
           MethodInfo m,
           int op) | 
| Handler(ExceptionTable et,
       int nth,
       CodeIterator it,
       CtClass declaring,
       MethodInfo m)Undocumented constructor. | 
| Instanceof(int pos,
          CodeIterator i,
          CtClass declaring,
          MethodInfo m)Undocumented constructor. | 
| MethodCall(int pos,
          CodeIterator i,
          CtClass declaring,
          MethodInfo m)Undocumented constructor. | 
| NewArray(int pos,
        CodeIterator i,
        CtClass declaring,
        MethodInfo m,
        int op) | 
| NewExpr(int pos,
       CodeIterator i,
       CtClass declaring,
       MethodInfo m,
       String type,
       int np)Undocumented constructor. | 
| Modifier and Type | Method and Description | 
|---|---|
| protected CtClass | ScopedClassPool. getCached(String classname)Get the cached class | 
| protected CtClass | ScopedClassPool. getCachedLocally(String classname)Whether the class is cached in this pooled | 
| CtClass | ScopedClassPool. getLocally(String classname)Get any local copy of the class | 
| Modifier and Type | Method and Description | 
|---|---|
| protected void | ScopedClassPool. cacheCtClass(String classname,
            CtClass c,
            boolean dynamic)Cache a class | 
| void | ScopedClassPool. lockInCache(CtClass c)Lock a class into the cache | 
| void | ScopedClassPool. soften(CtClass clazz)Soften a class | 
| Class | ScopedClassPool. toClass(CtClass ct,
       ClassLoader loader,
       ProtectionDomain domain)Convert a javassist class to a java class | 
| Modifier and Type | Field and Description | 
|---|---|
| protected CtClass[] | Reflection. readParam | 
| Modifier and Type | Method and Description | 
|---|---|
| boolean | Reflection. makeReflective(CtClass clazz,
              CtClass metaobject,
              CtClass metaclass)Produces a reflective class. | 
Copyright © 2016 Shigeru Chiba, www.javassist.org. All Rights Reserved.