Uses of Class
javassist.CtClass
Packages that use CtClass
Package
Description
The Javassist Core API.
Bytecode-level API.
Bytecode Analysis API.
Bytecode-level Annotations API.
This package contains the classes for modifying a method body.
A custom class pool for several JBoss products.
Runtime Behavioral Reflection.
Sample implementation of remote method invocation.
Utility classes.
-
Uses of CtClass in javassist
Modifier and TypeClassDescription(package private) final class
Array types.(package private) class
Classinvalid input: '<'?> types.(package private) class
final class
An instance ofCtPrimitiveType
represents a primitive type.Modifier and TypeFieldDescriptionstatic CtClass
CtClass.booleanType
TheCtClass
object representing theboolean
type.static CtClass
CtClass.byteType
TheCtClass
object representing thebyte
type.static CtClass
CtClass.charType
TheCtClass
object representing thechar
type.protected CtClass
CtMember.declaringClass
static CtClass
CtClass.doubleType
TheCtClass
object representing thedouble
type.static CtClass
CtClass.floatType
TheCtClass
object representing thefloat
type.private CtClass[]
CtArray.interfaces
static CtClass
CtClass.intType
TheCtClass
object representing theint
type.static CtClass
CtClass.longType
TheCtClass
object representing thelong
type.(package private) CtClass
CtField.NewInitializer.objectType
(package private) static CtClass[]
CtClass.primitiveTypes
static CtClass
CtClass.shortType
TheCtClass
object representing theshort
type.(package private) CtClass
CtField.ArrayInitializer.type
(package private) CtClass
CtField.MultiArrayInitializer.type
static CtClass
CtClass.voidType
TheCtClass
object representing thevoid
type.Modifier and TypeMethodDescription(package private) CtClass
ClassPool.checkNotExists
(String classname) protected CtClass
ClassPool.createCtClass
(String classname, boolean useCache) Creates a CtClass object representing the specified class.Reads a class file from the source and returns a reference to theCtClass
object representing that class file.CtClass[]
Reads class files from the source and returns an array ofCtClass
objects representing those class files.protected CtClass
ClassPool.getAndRename
(String orgName, String newName) Reads a class file and constructs aCtClass
object with a new name.protected CtClass
Provide a hook so that subclasses can do their own caching of classes.CtArray.getComponentType()
CtClass.getComponentType()
If this object represents an array, this method returns the component type of the array.ClassPool.getCtClass
(String classname) Returns aCtClass
object with the given name.CtClass[]
CtClass.getDeclaredClasses()
Returns an array of nested classes declared in the class.CtClass.getDeclaringClass()
If this class is a member class or interface of another class, then the class enclosing this class is returned.CtClassType.getDeclaringClass()
CtField.getDeclaringClass()
Returns the class declaring the field.CtMember.getDeclaringClass()
Returns the class that declares this member.CtClass[]
CtBehavior.getExceptionTypes()
Obtains exceptions that this method/constructor may throw.CtClass[]
CtArray.getInterfaces()
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[]
CtClassType.getInterfaces()
CtClass[]
CtClass.getNestedClasses()
Returns an array of nested classes declared in the class.CtClass[]
CtClassType.getNestedClasses()
Reads a class file from the source and returns a reference to theCtClass
object representing that class file.CtClass[]
CtBehavior.getParameterTypes()
Obtains parameter types of this method/constructor.CtMethod.getReturnType()
Obtains the type of the returned value.(package private) CtClass
CtBehavior.getReturnType0()
Obtains the type of the returned value.CtArray.getSuperclass()
CtClass.getSuperclass()
Obtains the class object representing the superclass of the class.CtClassType.getSuperclass()
CtField.getType()
Returns the type of the field.ClassPool.makeAnnotation
(String name) Creates a new annotation.ClassPool.makeClass
(InputStream classfile) Creates a new class (or interface) from the given class file.ClassPool.makeClass
(InputStream classfile, boolean ifNotFrozen) Creates a new class (or interface) from the given class file.Creates a new public class.Creates a new public class.Creates a new class (or interface) from the given class file.Creates a new class (or interface) from the given class file.ClassPool.makeClassIfNew
(InputStream classfile) Creates a new class (or interface) from the given class file.ClassPool.makeInterface
(String name) Creates a new public interface.ClassPool.makeInterface
(String name, CtClass superclass) Creates a new public interface.(package private) CtClass
ClassPool.makeNestedClass
(String classname) Creates a new public nested class.CtClass.makeNestedClass
(String name, boolean isStatic) Makes a new public nested class.CtClassType.makeNestedClass
(String name, boolean isStatic) protected CtClass
ClassPool.removeCached
(String classname) Provide a hook so that subclasses can do their own caching of classes.Modifier and TypeMethodDescriptionstatic CtMethod
CtNewMethod.abstractMethod
(CtClass returnType, String mname, CtClass[] parameters, CtClass[] exceptions, CtClass declaring) Creates a public abstract method.void
Adds a catch clause that handles an exception thrown in the body.void
Adds a catch clause that handles an exception thrown in the body.void
CtClass.addInterface
(CtClass anInterface) Adds an interface.void
CtClassType.addInterface
(CtClass anInterface) 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.private void
CtBehavior.addParameter2
(int where, CtClass type, String desc) static CtField.Initializer
Makes an initializer calling a static method.static CtField.Initializer
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
Makes an initializer creating a new object.static CtField.Initializer
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.(package private) void
ClassPool.classNameChanged
(String oldname, CtClass clazz) (package private) int
CtField.ArrayInitializer.compile
(CtClass type, String name, Bytecode code, CtClass[] parameters, Javac drv) (package private) int
CtField.CodeInitializer0.compile
(CtClass type, String name, Bytecode code, CtClass[] parameters, Javac drv) (package private) int
CtField.DoubleInitializer.compile
(CtClass type, String name, Bytecode code, CtClass[] parameters, Javac drv) (package private) int
CtField.FloatInitializer.compile
(CtClass type, String name, Bytecode code, CtClass[] parameters, Javac drv) (package private) abstract int
CtField.Initializer.compile
(CtClass type, String name, Bytecode code, CtClass[] parameters, Javac drv) (package private) int
CtField.IntInitializer.compile
(CtClass type, String name, Bytecode code, CtClass[] parameters, Javac drv) (package private) int
CtField.LongInitializer.compile
(CtClass type, String name, Bytecode code, CtClass[] parameters, Javac drv) (package private) int
CtField.MethodInitializer.compile
(CtClass type, String name, Bytecode code, CtClass[] parameters, Javac drv) Produces codes in which a new object is created and assigned to the field as the initial value.(package private) int
CtField.MultiArrayInitializer.compile
(CtClass type, String name, Bytecode code, CtClass[] parameters, Javac drv) (package private) int
CtField.NewInitializer.compile
(CtClass type, String name, Bytecode code, CtClass[] parameters, Javac drv) Produces codes in which a new object is created and assigned to the field as the initial value.(package private) int
CtField.ParamInitializer.compile
(CtClass type, String name, Bytecode code, CtClass[] parameters, Javac drv) (package private) int
CtField.StringInitializer.compile
(CtClass type, String name, Bytecode code, CtClass[] parameters, Javac drv) (package private) int
CtField.ArrayInitializer.compileIfStatic
(CtClass type, String name, Bytecode code, Javac drv) (package private) int
CtField.CodeInitializer0.compileIfStatic
(CtClass type, String name, Bytecode code, Javac drv) (package private) int
CtField.DoubleInitializer.compileIfStatic
(CtClass type, String name, Bytecode code, Javac drv) (package private) int
CtField.FloatInitializer.compileIfStatic
(CtClass type, String name, Bytecode code, Javac drv) (package private) abstract int
CtField.Initializer.compileIfStatic
(CtClass type, String name, Bytecode code, Javac drv) (package private) int
CtField.IntInitializer.compileIfStatic
(CtClass type, String name, Bytecode code, Javac drv) (package private) int
CtField.LongInitializer.compileIfStatic
(CtClass type, String name, Bytecode code, Javac drv) (package private) int
CtField.MethodInitializer.compileIfStatic
(CtClass type, String name, Bytecode code, Javac drv) Produces codes for a static field.(package private) int
CtField.MultiArrayInitializer.compileIfStatic
(CtClass type, String name, Bytecode code, Javac drv) (package private) int
CtField.NewInitializer.compileIfStatic
(CtClass type, String name, Bytecode code, Javac drv) Produces codes for a static field.(package private) int
CtField.ParamInitializer.compileIfStatic
(CtClass type, String name, Bytecode code, Javac drv) (package private) int
CtField.StringInitializer.compileIfStatic
(CtClass type, String name, Bytecode code, Javac drv) (package private) static int
CtNewWrappedMethod.compileParameterList
(Bytecode code, CtClass[] params, int regno) private static void
CtNewWrappedMethod.compileReturn
(Bytecode code, CtClass type) static CtConstructor
CtNewConstructor.copy
(CtConstructor c, CtClass declaring, ClassMap map) Creates a copy of a constructor.static CtMethod
Creates a copy of a method with a new name.static CtMethod
Creates a copy of a method.static CtConstructor
CtNewConstructor.defaultConstructor
(CtClass declaring) Creates a default (public) constructor.static CtMethod
Creates a method forwarding to a delegate in a super class.private static CtMethod
CtNewMethod.delegator0
(CtMethod delegate, CtClass declaring) protected void
CodeConverter.doit
(CtClass clazz, MethodInfo minfo, ConstPool cp) Performs code conversion.void
Prevents a mapping from the specified class name to another name.(package private) int
CtField.CodeInitializer.getConstantValue
(ConstPool cp, CtClass type) (package private) int
CtField.DoubleInitializer.getConstantValue
(ConstPool cp, CtClass type) (package private) int
CtField.FloatInitializer.getConstantValue
(ConstPool cp, CtClass type) (package private) int
CtField.Initializer.getConstantValue
(ConstPool cp, CtClass type) (package private) int
CtField.IntInitializer.getConstantValue
(ConstPool cp, CtClass type) (package private) int
CtField.LongInitializer.getConstantValue
(ConstPool cp, CtClass type) (package private) int
CtField.PtreeInitializer.getConstantValue
(ConstPool cp, CtClass type) (package private) int
CtField.StringInitializer.getConstantValue
(ConstPool cp, CtClass type) (package private) int
CtField.CodeInitializer0.getConstantValue2
(ConstPool cp, CtClass type, ASTree tree) CtClass.getDeclaredConstructor
(CtClass[] params) Returns a constructor receiving the specified parameters.CtClass.getDeclaredMethod
(String name, CtClass[] params) Retrieves the method with the specified name and parameter types among the methods declared in the class.CtClassType.getDeclaredMethod
(String name, CtClass[] params) private static void
private static CtMethod
CtClassType.getMethod0
(CtClass cc, String name, String desc) private static void
CtClassType.getMethods0
(Map<String, CtMember> h, CtClass cc) private int
CtBehavior.insertAfterAdvice
(Bytecode code, Javac jv, String src, ConstPool cp, CtClass rtype, int varNo) private int
CtBehavior.insertAfterHandler
(boolean asFinally, Bytecode b, CtClass rtype, int returnVarNo, Javac javac, String src) void
CtBehavior.insertParameter
(CtClass type) Inserts a new parameter, which becomes the first parameter.Class
<?> Loader.Simple.invokeDefineClass
(CtClass cc) Invokes the protecteddefineClass()
inClassLoader
.private boolean
CtNewClass.isInheritable
(int mod, CtClass superclazz) private static boolean
SerialVersionUID.isSerializable
(CtClass clazz) Does the class implement Serializable?private static String
static CtField
Compiles the given source code and creates a field.static CtMethod
Compiles the given source code and creates a method.static CtMethod
CtMethod.make
(MethodInfo minfo, CtClass declaring) Creates a method from aMethodInfo
object.static CtConstructor
Compiles the given source code and creates a constructor.static CtConstructor
CtNewConstructor.make
(CtClass[] parameters, CtClass[] exceptions, int howto, CtMethod body, CtMethod.ConstParameter cparam, CtClass declaring) Creates a public constructor.static CtConstructor
Creates a public constructor.static CtConstructor
Creates a public constructor that only calls a constructor in the super class.static CtMethod
CtNewMethod.make
(int modifiers, CtClass returnType, String mname, CtClass[] parameters, CtClass[] exceptions, String body, CtClass declaring) Creates a method.static CtMethod
Compiles the given source code and creates a method.static CtMethod
Compiles the given source code and creates a method.static CtMethod
CtNewMethod.make
(CtClass returnType, String mname, CtClass[] parameters, CtClass[] exceptions, String body, CtClass declaring) Creates a public (non-static) method.protected static Bytecode
CtNewWrappedConstructor.makeBody
(CtClass declaring, ClassFile classfile, int howToCallSuper, CtMethod wrappedBody, CtClass[] parameters, CtMethod.ConstParameter cparam) (package private) static Bytecode
CtNewWrappedMethod.makeBody
(CtClass clazz, ClassFile classfile, CtMethod wrappedBody, CtClass[] parameters, CtClass returnType, CtMethod.ConstParameter cparam) protected static int
CtNewWrappedMethod.makeBody0
(CtClass clazz, ClassFile classfile, CtMethod wrappedBody, boolean isStatic, CtClass[] parameters, CtClass returnType, CtMethod.ConstParameter cparam, Bytecode code) Creates a new public class.private int
CtClassType.makeFieldInitializer
(Bytecode code, CtClass[] parameters) ClassPool.makeInterface
(String name, CtClass superclass) Creates a new public interface.(package private) static int
CtField.ParamInitializer.nthParamToLocal
(int nth, CtClass[] params, boolean isStatic) Computes the index of the local variable that the n-th parameter is assigned to.void
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 byoldClass
is 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.(package private) static void
CtBehavior.setBody0
(CtClass srcClass, MethodInfo srcInfo, CtClass destClass, MethodInfo destInfo, ClassMap map) void
CtBehavior.setExceptionTypes
(CtClass[] types) Sets exceptions that this method/constructor may throw.void
CtClass.setInterfaces
(CtClass[] list) Sets implemented interfaces.void
CtClassType.setInterfaces
(CtClass[] list) 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
CtClassType.setSuperclass
(CtClass clazz) void
Sets the type of the field.static CtConstructor
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
CtClassType.subclassOf
(CtClass superclass) boolean
boolean
Returnstrue
if this class extends or implementsclazz
.boolean
Converts the given class to ajava.lang.Class
object.Class
<?> Converts the class to ajava.lang.Class
object.ClassPool.toClass
(CtClass ct, Class<?> neighbor, ClassLoader loader, ProtectionDomain domain) Converts the class to ajava.lang.Class
object.ClassPool.toClass
(CtClass ct, ClassLoader loader) Deprecated.ClassPool.toClass
(CtClass ct, ClassLoader loader, ProtectionDomain domain) Deprecated.Class
<?> ClassPool.toClass
(CtClass ct, MethodHandles.Lookup lookup) Converts the class to ajava.lang.Class
object.Makes a copy of this constructor and converts it into a method.Makes a copy of this constructor and converts it into a method.private static void
CtClassType.updateInnerEntry
(int newMod, String name, CtClass clazz, boolean outer) 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 CtConstructor
CtNewWrappedConstructor.wrapped
(CtClass[] parameterTypes, CtClass[] exceptionTypes, int howToCallSuper, CtMethod body, CtMethod.ConstParameter constParam, CtClass declaring) static CtMethod
CtNewWrappedMethod.wrapped
(CtClass returnType, String mname, CtClass[] parameterTypes, CtClass[] exceptionTypes, CtMethod body, CtMethod.ConstParameter constParam, CtClass declaring) ModifierConstructorDescription(package private)
ArrayInitializer
(CtClass t, int s) protected
CtBehavior
(CtClass clazz, MethodInfo minfo) protected
CtConstructor
(MethodInfo minfo, CtClass declaring) CtConstructor
(CtClass[] parameters, CtClass declaring) Creates a constructor with no constructor body.CtConstructor
(CtConstructor src, CtClass declaring, ClassMap map) Creates a copy of aCtConstructor
object.private
(package private)
Creates aCtField
object.Creates a copy of the given field.protected
(package private)
CtMethod
(MethodInfo minfo, CtClass declaring) Creates a public abstract method.Creates a copy of aCtMethod
object.(package private)
CtNewClass
(String name, ClassPool cp, boolean isInterface, CtClass superclass) (package private)
MultiArrayInitializer
(CtClass t, int[] d) -
Uses of CtClass in javassist.bytecode
Fields in javassist.bytecode declared as CtClassModifier and TypeFieldDescriptionstatic final CtClass
Bytecode.THIS
Represents theCtClass
file using the constant pool table given to thisBytecode
object.static final CtClass
ConstPool.THIS
Represents the class using this constant pool table.Methods in javassist.bytecode that return CtClassModifier and TypeMethodDescriptionSignatureAttribute.BaseType.getCtlass()
Returns theCtClass
representing this primitive type.static CtClass[]
Descriptor.getParameterTypes
(String desc, ClassPool cp) Returns theCtClass
objects representing the parameter types specified by the given descriptor.static CtClass
Descriptor.getReturnType
(String desc, ClassPool cp) Returns theCtClass
object representing the return type specified by the given descriptor.static CtClass
Returns aCtClass
object representing the type specified by the given descriptor.(package private) static CtClass
Descriptor.toPrimitiveClass
(char c) Methods in javassist.bytecode with parameters of type CtClassModifier and TypeMethodDescriptionvoid
Bytecode.addAnewarray
(CtClass clazz, int length) Appends ICONST and ANEWARRAY.void
Bytecode.addCheckcast
(CtClass c) Appends CHECKCAST.int
ConstPool.addClassInfo
(CtClass c) Adds a newCONSTANT_Class_info
structure.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 ofexception_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, String desc, int count) Appends INVOKEINTERFACE.void
Bytecode.addInvokeinterface
(CtClass clazz, String name, CtClass returnType, CtClass[] paramTypes, int count) Appends INVOKEINTERFACE.void
Bytecode.addInvokespecial
(CtClass clazz, String name, String desc) Appends INVOKESPECIAL.void
Bytecode.addInvokespecial
(CtClass clazz, String name, CtClass returnType, CtClass[] paramTypes) Appends INVOKESPECIAL.void
Bytecode.addInvokestatic
(CtClass clazz, String name, String desc) Appends INVOKESTATIC.void
Bytecode.addInvokestatic
(CtClass clazz, String name, CtClass returnType, CtClass[] paramTypes) Appends INVOKESTATIC.void
Bytecode.addInvokevirtual
(CtClass clazz, String name, String desc) Appends INVOKEVIRTUAL.void
Bytecode.addInvokevirtual
(CtClass clazz, String name, CtClass returnType, CtClass[] paramTypes) Appends INVOKEVIRTUAL.int
Appends an instruction for loading a value from the local variable at the indexn
.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
Appends NEW.void
Bytecode.addPutfield
(CtClass c, String name, String desc) Appends PUTFIELD.private void
Bytecode.addPutfield0
(CtClass target, String classname, String name, String desc) void
Bytecode.addPutstatic
(CtClass c, String name, String desc) Appends PUTSTATIC.private void
Bytecode.addPutstatic0
(CtClass target, String classname, String fieldName, String desc) void
Appends ARETURN, IRETURN, .., or RETURN.int
Appends an instruction for storing a value into the local variable at the indexn
.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
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
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) Setsmax_locals
.private static int
private static void
Descriptor.toDescriptor
(StringBuilder desc, CtClass type) static String
Returns the internal representation of the class name in the JVM. -
Uses of CtClass in javassist.bytecode.analysis
Fields in javassist.bytecode.analysis declared as CtClassModifier and TypeFieldDescriptionprivate CtClass
Analyzer.clazz
private CtClass
ControlFlow.clazz
private final CtClass
Type.clazz
Fields in javassist.bytecode.analysis with type parameters of type CtClassMethods in javassist.bytecode.analysis that return CtClassModifier and TypeMethodDescriptionprivate static CtClass
Type.findCommonSuperClass
(CtClass one, CtClass two) MultiArrayType.getCtClass()
MultiType.getCtClass()
Gets the class that corresponds with this type.Type.getCtClass()
Returns the class this type represents.Methods in javassist.bytecode.analysis that return types with arguments of type CtClassModifier and TypeMethodDescriptionType.findCommonInterfaces
(Type type) Type.findExclusiveDeclaredInterfaces
(Type type, CtClass exclude) Type.getAllInterfaces
(CtClass clazz, Map<String, CtClass> map) MultiType.getAllMultiInterfaces
(MultiType type) Type.getDeclaredInterfaces
(CtClass clazz, Map<String, CtClass> map) MultiType.mergeMultiAndSingle
(MultiType multi, Type single) MultiType.mergeMultiInterfaces
(MultiType type1, MultiType type2) Methods in javassist.bytecode.analysis with parameters of type CtClassModifier and TypeMethodDescriptionFrame[]
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.(package private) static boolean
private static CtClass
Type.findCommonSuperClass
(CtClass one, CtClass two) Type.findExclusiveDeclaredInterfaces
(Type type, CtClass exclude) static Type
Obtain the Type for a given class.Type.getAllInterfaces
(CtClass clazz, Map<String, CtClass> map) Type.getDeclaredInterfaces
(CtClass clazz, Map<String, CtClass> map) void
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.Method parameters in javassist.bytecode.analysis with type arguments of type CtClassModifier and TypeMethodDescriptionType.getAllInterfaces
(CtClass clazz, Map<String, CtClass> map) Type.getDeclaredInterfaces
(CtClass clazz, Map<String, CtClass> map) Constructors in javassist.bytecode.analysis with parameters of type CtClassModifierConstructorDescriptionControlFlow
(CtClass ctclazz, MethodInfo minfo) Constructs a control-flow analyzer.(package private)
private
Constructor parameters in javassist.bytecode.analysis with type arguments of type CtClass -
Uses of CtClass in javassist.bytecode.annotation
Methods in javassist.bytecode.annotation with parameters of type CtClassModifier and TypeMethodDescriptionstatic MemberValue
Annotation.createMemberValue
(ConstPool cp, CtClass type) Makes an instance ofMemberValue
.Constructors in javassist.bytecode.annotation with parameters of type CtClassModifierConstructorDescriptionAnnotation
(ConstPool cp, CtClass clazz) Constructs an annotation that can be accessed through the interface represented byclazz
. -
Uses of CtClass in javassist.bytecode.stackmap
Methods in javassist.bytecode.stackmap that return CtClassModifier and TypeMethodDescriptionstatic 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.private CtClass
TypeData.TypeVar.fixByUppers
(List<TypeData> users, ClassPool cp, Set<TypeData> visited, CtClass type) Methods in javassist.bytecode.stackmap with parameters of type CtClassModifier and TypeMethodDescriptionstatic 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.(package private) static boolean
private CtClass
TypeData.TypeVar.fixByUppers
(List<TypeData> users, ClassPool cp, Set<TypeData> visited, CtClass type) private static boolean
TypeData.TypeVar.isObjectArray
(CtClass cc) -
Uses of CtClass in javassist.compiler
Fields in javassist.compiler declared as CtClassModifier and TypeFieldDescriptionprivate CtClass
AccessorMaker.clazz
MemberResolver.Method.declaring
private CtClass
JvstCodeGen.dollarType
(package private) CtClass[]
JvstCodeGen.paramTypeList
(package private) CtClass
JvstCodeGen.returnType
protected CtClass
MemberCodeGen.thisClass
protected CtClass
TypeChecker.thisClass
Methods in javassist.compiler that return CtClassModifier and TypeMethodDescriptionstatic CtClass
MemberResolver.getSuperclass
(CtClass c) static CtClass
MemberResolver.getSuperInterface
(CtClass c, String interfaceName) MemberCodeGen.getThisClass()
MemberResolver.lookupClass
(int type, int dim, String classname) MemberResolver.lookupClass
(String name, boolean notCheckInner) MemberResolver.lookupClass
(Declarator decl) private CtClass
MemberResolver.lookupClass0
(String classname, boolean notCheckInner) MemberResolver.lookupClassByJvmName
(String jvmName) MemberResolver.lookupClassByName
(ASTList name) CtClass[]
MemberCodeGen.makeParamList
(MethodDecl md) CtClass[]
MemberCodeGen.makeThrowsList
(MethodDecl md) private CtClass
MemberResolver.searchImports
(String orgName) Methods in javassist.compiler with parameters of type CtClassModifier and TypeMethodDescriptionprotected void
JvstCodeGen.atAssignParamList
(CtClass[] params, Bytecode code) void
MemberCodeGen.atMethodCallCore
(CtClass targetClass, String mname, ASTList args, boolean isStatic, boolean isSpecial, int aload0pos, MemberResolver.Method found) TypeChecker.atMethodCallCore
(CtClass targetClass, String mname, ASTList args) private void
MemberCodeGen.atMethodCallCore2
(CtClass targetClass, String mname, boolean isStatic, boolean isSpecial, int aload0pos, MemberResolver.Method found) static int
JvstCodeGen.compileParameterList
(Bytecode code, CtClass[] params, int regno) protected void
JvstCodeGen.compileUnwrapValue
(CtClass type, Bytecode code) protected void
JvstTypeChecker.compileUnwrapValue
(CtClass type) void
protected String
MemberCodeGen.getAccessibleConstructor
(String desc, CtClass declClass, MethodInfo minfo) protected String
MemberCodeGen.getAccessiblePrivate
(String methodName, String desc, String newDesc, MethodInfo minfo, CtClass declClass) AccessorMaker.getConstructor
(CtClass c, String desc, MethodInfo orig) static CtClass
MemberResolver.getSuperclass
(CtClass c) static CtClass
MemberResolver.getSuperInterface
(CtClass c, String interfaceName) private boolean
MemberCodeGen.isEnclosing
(CtClass outer, CtClass inner) private boolean
MemberCodeGen.isFromSameDeclaringClass
(CtClass outer, CtClass inner) private MemberResolver.Method
MemberResolver.lookupMethod
(CtClass clazz, String methodName, int[] argTypes, int[] argDims, String[] argClassNames, boolean onlyExact) MemberResolver.lookupMethod
(CtClass clazz, CtClass currentClass, MethodInfo current, String methodName, int[] argTypes, int[] argDims, String[] argClassNames) private static void
Javac.makeDefaultBody
(Bytecode b, CtClass type) 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.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.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.private int
JvstCodeGen.recordVar
(CtClass cc, String varName, int varNo, SymbolTable tbl) 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
private void
void
private void
Constructors in javassist.compiler with parameters of type CtClassModifierConstructorDescription(package private)
CtFieldWithInit
(CtClass type, String name, CtClass declaring) Constructs a compiler.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) -
Uses of CtClass in javassist.convert
Fields in javassist.convert declared as CtClassModifier and TypeFieldDescriptionprivate CtClass
TransformFieldAccess.fieldClass
protected CtClass
TransformReadField.fieldClass
protected CtClass[]
TransformBefore.parameterTypes
Methods in javassist.convert with parameters of type CtClassModifier and TypeMethodDescriptionprivate void
TransformAccessArrayField.initFrames
(CtClass clazz, MethodInfo minfo) void
TransformAccessArrayField.initialize
(ConstPool cp, CtClass clazz, MethodInfo minfo) void
Transformer.initialize
(ConstPool cp, CtClass clazz, MethodInfo minfo) (package private) static String
TransformReadField.isField
(ClassPool pool, ConstPool cp, CtClass fclass, String fname, boolean is_private, int index) (package private) static boolean
TransformReadField.isFieldInSuper
(CtClass clazz, CtClass fclass, String fname) protected void
private void
TransformBefore.makeCode2
(Bytecode save, Bytecode load, int i, int n, CtClass[] paramTypes, int var) 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.abstract int
Transformer.transform
(CtClass clazz, int pos, CodeIterator it, 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
TransformNew.transform
(CtClass clazz, int pos, CodeIterator iterator, ConstPool cp) Replace a sequence of NEW classname DUP ...int
TransformNewClass.transform
(CtClass clazz, int pos, CodeIterator iterator, ConstPool cp) Modifies a sequence of NEW classname DUP ...int
TransformReadField.transform
(CtClass tclazz, int pos, CodeIterator iterator, ConstPool cp) int
TransformWriteField.transform
(CtClass tclazz, int pos, CodeIterator iterator, ConstPool cp) -
Uses of CtClass in javassist.expr
Fields in javassist.expr declared as CtClassModifier and TypeFieldDescription(package private) CtClass
NewArray.ProceedForArray.arrayType
(package private) CtClass
FieldAccess.ProceedForRead.fieldType
(package private) CtClass
FieldAccess.ProceedForWrite.fieldType
(package private) CtClass
NewExpr.ProceedForNew.newType
(package private) CtClass
Cast.ProceedForCast.retType
(package private) CtClass
Expr.thisClass
Methods in javassist.expr that return CtClassModifier and TypeMethodDescriptionNewArray.getComponentType()
Returns the type of array components.private CtClass
FieldAccess.getCtClass()
Returns the class in which the field is declared.protected CtClass
MethodCall.getCtClass()
Returns the class of the target object, which the method is called on.private CtClass
NewExpr.getCtClass()
Returns the class of the created object.Expr.getEnclosingClass()
Returns the class that declares the method enclosing this expression.(package private) CtClass
NewArray.getPrimitiveType
(int atype) Cast.getType()
Returns theCtClass
object representing the type specified by the cast.Handler.getType()
Returns the type handled by the catch clause.Instanceof.getType()
Returns theCtClass
object representing the type name on the right hand side of the instanceof operator.CtClass[]
Cast.mayThrow()
Returns the list of exceptions that the expression may throw.CtClass[]
Expr.mayThrow()
Returns the list of exceptions that the expression may throw.CtClass[]
FieldAccess.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[]
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[]
NewExpr.mayThrow()
Returns the list of exceptions that the expression may throw.Methods in javassist.expr with parameters of type CtClassModifier and TypeMethodDescriptionprivate static void
(package private) static final boolean
Expr.checkResultValue
(CtClass retType, String prog) boolean
ExprEditor.doit
(CtClass clazz, MethodInfo minfo) Undocumented method.(package private) boolean
ExprEditor.doit
(CtClass clazz, MethodInfo minfo, ExprEditor.LoopContext context, CodeIterator iterator, int endPos) Visits each bytecode in the given range.(package private) final boolean
ExprEditor.loopBody
(CodeIterator iterator, CtClass clazz, MethodInfo minfo, ExprEditor.LoopContext context) (package private) static final void
Expr.storeStack
(CtClass[] params, boolean isStaticCall, int regno, Bytecode bytecode) private static void
Expr.storeStack0
(int i, int n, CtClass[] params, int regno, Bytecode bytecode) Method parameters in javassist.expr with type arguments of type CtClassModifier and TypeMethodDescriptionprivate static void
Constructors in javassist.expr with parameters of type CtClassModifierConstructorDescriptionprotected
Cast
(int pos, CodeIterator i, CtClass declaring, MethodInfo m) Undocumented constructor.protected
ConstructorCall
(int pos, CodeIterator i, CtClass decl, MethodInfo m) Undocumented constructor.protected
Expr
(int pos, CodeIterator i, CtClass declaring, MethodInfo m) Undocumented constructor.protected
FieldAccess
(int pos, CodeIterator i, CtClass declaring, MethodInfo m, int op) protected
Handler
(ExceptionTable et, int nth, CodeIterator it, CtClass declaring, MethodInfo m) Undocumented constructor.protected
Instanceof
(int pos, CodeIterator i, CtClass declaring, MethodInfo m) Undocumented constructor.protected
MethodCall
(int pos, CodeIterator i, CtClass declaring, MethodInfo m) Undocumented constructor.protected
NewArray
(int pos, CodeIterator i, CtClass declaring, MethodInfo m, int op) protected
NewExpr
(int pos, CodeIterator i, CtClass declaring, MethodInfo m, String type, int np) Undocumented constructor.(package private)
ProceedForArray
(CtClass type, int op, int i, int dim) (package private)
ProceedForCast
(int i, CtClass t) (package private)
ProceedForNew
(CtClass nt, int ni, int mi) (package private)
ProceedForRead
(CtClass type, int op, int i, int var) (package private)
ProceedForWrite
(CtClass type, int op, int i, int var) -
Uses of CtClass in javassist.scopedpool
Fields in javassist.scopedpool with type parameters of type CtClassMethods in javassist.scopedpool that return CtClassModifier and TypeMethodDescriptionprotected CtClass
Get the cached classprotected CtClass
ScopedClassPool.getCachedLocally
(String classname) Whether the class is cached in this pooledScopedClassPool.getLocally
(String classname) Get any local copy of the classMethods in javassist.scopedpool with parameters of type CtClassModifier and TypeMethodDescriptionprotected void
ScopedClassPool.cacheCtClass
(String classname, CtClass c, boolean dynamic) Cache a classvoid
ScopedClassPool.lockInCache
(CtClass c) Lock a class into the cachevoid
Soften a classClass
<?> ScopedClassPool.toClass
(CtClass ct, ClassLoader loader, ProtectionDomain domain) Convert a javassist class to a java class -
Uses of CtClass in javassist.tools.reflect
Fields in javassist.tools.reflect declared as CtClassMethods in javassist.tools.reflect with parameters of type CtClassModifier and TypeMethodDescriptionboolean
Reflection.makeReflective
(CtClass clazz, CtClass metaobject, CtClass metaclass) Produces a reflective class.private boolean
Reflection.modifyClassfile
(CtClass clazz, CtClass metaobject, CtClass metaclass) private void
Reflection.processFields
(CtClass clazz) private void
Reflection.processMethods
(CtClass clazz, boolean dontSearch) private void
Reflection.processMethods0
(int mod, CtClass clazz, CtMethod m, int identifier, boolean dontSearch) private void
Reflection.registerReflectiveClass
(CtClass clazz) Registers a reflective class. -
Uses of CtClass in javassist.tools.rmi
Fields in javassist.tools.rmi declared as CtClassModifier and TypeFieldDescriptionprivate CtClass[]
StubGenerator.exceptionForProxy
private CtClass[]
StubGenerator.interfacesForProxy
private CtClass[]
StubGenerator.proxyConstructorParamTypes
Fields in javassist.tools.rmi with type parameters of type CtClassMethods in javassist.tools.rmi that return CtClassModifier and TypeMethodDescriptionprivate CtClass
StubGenerator.produceProxyClass
(CtClass orgclass, Class<?> orgRtClass) private CtClass
private CtClass[]
Methods in javassist.tools.rmi with parameters of type CtClassModifier and TypeMethodDescriptionprivate void
StubGenerator.addMethods
(CtClass proxy, Method[] ms) private void
StubGenerator.modifySuperclass
(CtClass orgclass) Adds a default constructor to the super classes.private CtClass
StubGenerator.produceProxyClass
(CtClass orgclass, Class<?> orgRtClass) -
Uses of CtClass in javassist.util
Methods in javassist.util with parameters of type CtClass
ClassPool.toClass(CtClass,Class,ClassLoader,ProtectionDomain)
.