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 classArray types.(package private) classClass<?> types.(package private) classfinal classAn instance ofCtPrimitiveTyperepresents a primitive type.Modifier and TypeFieldDescriptionstatic CtClassCtClass.booleanTypeTheCtClassobject representing thebooleantype.static CtClassCtClass.byteTypeTheCtClassobject representing thebytetype.static CtClassCtClass.charTypeTheCtClassobject representing thechartype.protected CtClassCtMember.declaringClassstatic CtClassCtClass.doubleTypeTheCtClassobject representing thedoubletype.static CtClassCtClass.floatTypeTheCtClassobject representing thefloattype.private CtClass[]CtArray.interfacesstatic CtClassCtClass.intTypeTheCtClassobject representing theinttype.static CtClassCtClass.longTypeTheCtClassobject representing thelongtype.(package private) CtClassCtField.NewInitializer.objectType(package private) static CtClass[]CtClass.primitiveTypesstatic CtClassCtClass.shortTypeTheCtClassobject representing theshorttype.(package private) CtClassCtField.ArrayInitializer.type(package private) CtClassCtField.MultiArrayInitializer.typestatic CtClassCtClass.voidTypeTheCtClassobject representing thevoidtype.Modifier and TypeMethodDescription(package private) CtClassClassPool.checkNotExists(String classname) protected CtClassClassPool.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 theCtClassobject representing that class file.CtClass[]Reads class files from the source and returns an array ofCtClassobjects representing those class files.protected CtClassClassPool.getAndRename(String orgName, String newName) Reads a class file and constructs aCtClassobject with a new name.protected CtClassProvide 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 aCtClassobject 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 theCtClassobject 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) CtClassCtBehavior.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) CtClassClassPool.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 CtClassClassPool.removeCached(String classname) Provide a hook so that subclasses can do their own caching of classes.Modifier and TypeMethodDescriptionstatic CtMethodCtNewMethod.abstractMethod(CtClass returnType, String mname, CtClass[] parameters, CtClass[] exceptions, CtClass declaring) Creates a public abstract method.voidAdds a catch clause that handles an exception thrown in the body.voidAdds a catch clause that handles an exception thrown in the body.voidCtClass.addInterface(CtClass anInterface) Adds an interface.voidCtClassType.addInterface(CtClass anInterface) voidCtBehavior.addLocalVariable(String name, CtClass type) Declares a new local variable.voidCtBehavior.addParameter(CtClass type) Appends a new parameter, which becomes the last parameter.private voidCtBehavior.addParameter2(int where, CtClass type, String desc) static CtField.InitializerMakes an initializer calling a static method.static CtField.InitializerMakes an initializer calling a static method.static CtField.InitializerCtField.Initializer.byCallWithParams(CtClass methodClass, String methodName) Makes an initializer calling a static method.static CtField.InitializerCtField.Initializer.byCallWithParams(CtClass methodClass, String methodName, String[] stringParams) Makes an initializer calling a static method.static CtField.InitializerMakes an initializer creating a new object.static CtField.InitializerMakes an initializer creating a new object.static CtField.InitializerCtField.Initializer.byNewArray(CtClass type, int size) Makes an initializer creating a new array.static CtField.InitializerCtField.Initializer.byNewArray(CtClass type, int[] sizes) Makes an initializer creating a new multi-dimensional array.static CtField.InitializerCtField.Initializer.byNewWithParams(CtClass objectType) Makes an initializer creating a new object.static CtField.InitializerCtField.Initializer.byNewWithParams(CtClass objectType, String[] stringParams) Makes an initializer creating a new object.protected voidClassPool.cacheCtClass(String classname, CtClass c, boolean dynamic) Provides a hook so that subclasses can do their own caching of classes.static longSerialVersionUID.calculateDefault(CtClass clazz) Calculate default value.(package private) voidClassPool.classNameChanged(String oldname, CtClass clazz) (package private) intCtField.ArrayInitializer.compile(CtClass type, String name, Bytecode code, CtClass[] parameters, Javac drv) (package private) intCtField.CodeInitializer0.compile(CtClass type, String name, Bytecode code, CtClass[] parameters, Javac drv) (package private) intCtField.DoubleInitializer.compile(CtClass type, String name, Bytecode code, CtClass[] parameters, Javac drv) (package private) intCtField.FloatInitializer.compile(CtClass type, String name, Bytecode code, CtClass[] parameters, Javac drv) (package private) abstract intCtField.Initializer.compile(CtClass type, String name, Bytecode code, CtClass[] parameters, Javac drv) (package private) intCtField.IntInitializer.compile(CtClass type, String name, Bytecode code, CtClass[] parameters, Javac drv) (package private) intCtField.LongInitializer.compile(CtClass type, String name, Bytecode code, CtClass[] parameters, Javac drv) (package private) intCtField.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) intCtField.MultiArrayInitializer.compile(CtClass type, String name, Bytecode code, CtClass[] parameters, Javac drv) (package private) intCtField.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) intCtField.ParamInitializer.compile(CtClass type, String name, Bytecode code, CtClass[] parameters, Javac drv) (package private) intCtField.StringInitializer.compile(CtClass type, String name, Bytecode code, CtClass[] parameters, Javac drv) (package private) intCtField.ArrayInitializer.compileIfStatic(CtClass type, String name, Bytecode code, Javac drv) (package private) intCtField.CodeInitializer0.compileIfStatic(CtClass type, String name, Bytecode code, Javac drv) (package private) intCtField.DoubleInitializer.compileIfStatic(CtClass type, String name, Bytecode code, Javac drv) (package private) intCtField.FloatInitializer.compileIfStatic(CtClass type, String name, Bytecode code, Javac drv) (package private) abstract intCtField.Initializer.compileIfStatic(CtClass type, String name, Bytecode code, Javac drv) (package private) intCtField.IntInitializer.compileIfStatic(CtClass type, String name, Bytecode code, Javac drv) (package private) intCtField.LongInitializer.compileIfStatic(CtClass type, String name, Bytecode code, Javac drv) (package private) intCtField.MethodInitializer.compileIfStatic(CtClass type, String name, Bytecode code, Javac drv) Produces codes for a static field.(package private) intCtField.MultiArrayInitializer.compileIfStatic(CtClass type, String name, Bytecode code, Javac drv) (package private) intCtField.NewInitializer.compileIfStatic(CtClass type, String name, Bytecode code, Javac drv) Produces codes for a static field.(package private) intCtField.ParamInitializer.compileIfStatic(CtClass type, String name, Bytecode code, Javac drv) (package private) intCtField.StringInitializer.compileIfStatic(CtClass type, String name, Bytecode code, Javac drv) (package private) static intCtNewWrappedMethod.compileParameterList(Bytecode code, CtClass[] params, int regno) private static voidCtNewWrappedMethod.compileReturn(Bytecode code, CtClass type) static CtConstructorCtNewConstructor.copy(CtConstructor c, CtClass declaring, ClassMap map) Creates a copy of a constructor.static CtMethodCreates a copy of a method with a new name.static CtMethodCreates a copy of a method.static CtConstructorCtNewConstructor.defaultConstructor(CtClass declaring) Creates a default (public) constructor.static CtMethodCreates a method forwarding to a delegate in a super class.private static CtMethodCtNewMethod.delegator0(CtMethod delegate, CtClass declaring) protected voidCodeConverter.doit(CtClass clazz, MethodInfo minfo, ConstPool cp) Performs code conversion.voidPrevents a mapping from the specified class name to another name.(package private) intCtField.CodeInitializer.getConstantValue(ConstPool cp, CtClass type) (package private) intCtField.DoubleInitializer.getConstantValue(ConstPool cp, CtClass type) (package private) intCtField.FloatInitializer.getConstantValue(ConstPool cp, CtClass type) (package private) intCtField.Initializer.getConstantValue(ConstPool cp, CtClass type) (package private) intCtField.IntInitializer.getConstantValue(ConstPool cp, CtClass type) (package private) intCtField.LongInitializer.getConstantValue(ConstPool cp, CtClass type) (package private) intCtField.PtreeInitializer.getConstantValue(ConstPool cp, CtClass type) (package private) intCtField.StringInitializer.getConstantValue(ConstPool cp, CtClass type) (package private) intCtField.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 voidprivate static CtMethodCtClassType.getMethod0(CtClass cc, String name, String desc) private static voidCtClassType.getMethods0(Map<String, CtMember> h, CtClass cc) private intCtBehavior.insertAfterAdvice(Bytecode code, Javac jv, String src, ConstPool cp, CtClass rtype, int varNo) private intCtBehavior.insertAfterHandler(boolean asFinally, Bytecode b, CtClass rtype, int returnVarNo, Javac javac, String src) voidCtBehavior.insertParameter(CtClass type) Inserts a new parameter, which becomes the first parameter.Class<?>Loader.Simple.invokeDefineClass(CtClass cc) Invokes the protecteddefineClass()inClassLoader.private booleanCtNewClass.isInheritable(int mod, CtClass superclazz) private static booleanSerialVersionUID.isSerializable(CtClass clazz) Does the class implement Serializable?private static Stringstatic CtFieldCompiles the given source code and creates a field.static CtMethodCompiles the given source code and creates a method.static CtMethodCtMethod.make(MethodInfo minfo, CtClass declaring) Creates a method from aMethodInfoobject.static CtConstructorCompiles the given source code and creates a constructor.static CtConstructorCtNewConstructor.make(CtClass[] parameters, CtClass[] exceptions, int howto, CtMethod body, CtMethod.ConstParameter cparam, CtClass declaring) Creates a public constructor.static CtConstructorCreates a public constructor.static CtConstructorCreates a public constructor that only calls a constructor in the super class.static CtMethodCtNewMethod.make(int modifiers, CtClass returnType, String mname, CtClass[] parameters, CtClass[] exceptions, String body, CtClass declaring) Creates a method.static CtMethodCompiles the given source code and creates a method.static CtMethodCompiles the given source code and creates a method.static CtMethodCtNewMethod.make(CtClass returnType, String mname, CtClass[] parameters, CtClass[] exceptions, String body, CtClass declaring) Creates a public (non-static) method.protected static BytecodeCtNewWrappedConstructor.makeBody(CtClass declaring, ClassFile classfile, int howToCallSuper, CtMethod wrappedBody, CtClass[] parameters, CtMethod.ConstParameter cparam) (package private) static BytecodeCtNewWrappedMethod.makeBody(CtClass clazz, ClassFile classfile, CtMethod wrappedBody, CtClass[] parameters, CtClass returnType, CtMethod.ConstParameter cparam) protected static intCtNewWrappedMethod.makeBody0(CtClass clazz, ClassFile classfile, CtMethod wrappedBody, boolean isStatic, CtClass[] parameters, CtClass returnType, CtMethod.ConstParameter cparam, Bytecode code) Creates a new public class.private intCtClassType.makeFieldInitializer(Bytecode code, CtClass[] parameters) ClassPool.makeInterface(String name, CtClass superclass) Creates a new public interface.(package private) static intCtField.ParamInitializer.nthParamToLocal(int nth, CtClass[] params, boolean isStatic) Computes the index of the local variable that the n-th parameter is assigned to.voidMaps a class name to another name in this hashtable.voidCodeConverter.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.voidCodeConverter.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.voidCodeConverter.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.voidCodeConverter.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.voidCodeConverter.replaceNew(CtClass oldClass, CtClass newClass) Modify a method body so that instantiation of the class specified byoldClassis replaced with instantiation of another classnewClass.voidCodeConverter.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 voidCtBehavior.setBody0(CtClass srcClass, MethodInfo srcInfo, CtClass destClass, MethodInfo destInfo, ClassMap map) voidCtBehavior.setExceptionTypes(CtClass[] types) Sets exceptions that this method/constructor may throw.voidCtClass.setInterfaces(CtClass[] list) Sets implemented interfaces.voidCtClassType.setInterfaces(CtClass[] list) static voidSerialVersionUID.setSerialVersionUID(CtClass clazz) Adds serialVersionUID if one does not already exist.voidCtClass.setSuperclass(CtClass clazz) Changes a super class unless this object represents an interface.voidCtClassType.setSuperclass(CtClass clazz) voidSets the type of the field.static CtConstructorCreates a public constructor that only calls a constructor in the super class.booleanCtClass.subclassOf(CtClass superclass) Determines whether the class directly or indirectly extends the given class.booleanCtClassType.subclassOf(CtClass superclass) booleanbooleanReturnstrueif this class extends or implementsclazz.booleanConverts the given class to ajava.lang.Classobject.Class<?>Converts the class to ajava.lang.Classobject.ClassPool.toClass(CtClass ct, Class<?> neighbor, ClassLoader loader, ProtectionDomain domain) Converts the class to ajava.lang.Classobject.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.Classobject.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 voidCtClassType.updateInnerEntry(int newMod, String name, CtClass clazz, boolean outer) booleanCtMember.visibleFrom(CtClass clazz) Returns true if this member is accessible from the given class.static CtMethodCtNewMethod.wrapped(CtClass returnType, String mname, CtClass[] parameterTypes, CtClass[] exceptionTypes, CtMethod body, CtMethod.ConstParameter constParam, CtClass declaring) Creates a wrapped method.static CtConstructorCtNewWrappedConstructor.wrapped(CtClass[] parameterTypes, CtClass[] exceptionTypes, int howToCallSuper, CtMethod body, CtMethod.ConstParameter constParam, CtClass declaring) static CtMethodCtNewWrappedMethod.wrapped(CtClass returnType, String mname, CtClass[] parameterTypes, CtClass[] exceptionTypes, CtMethod body, CtMethod.ConstParameter constParam, CtClass declaring) ModifierConstructorDescription(package private)ArrayInitializer(CtClass t, int s) protectedCtBehavior(CtClass clazz, MethodInfo minfo) protectedCtConstructor(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 aCtConstructorobject.private(package private)Creates aCtFieldobject.Creates a copy of the given field.protected(package private)CtMethod(MethodInfo minfo, CtClass declaring) Creates a public abstract method.Creates a copy of aCtMethodobject.(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 CtClassBytecode.THISRepresents theCtClassfile using the constant pool table given to thisBytecodeobject.static final CtClassConstPool.THISRepresents the class using this constant pool table.Methods in javassist.bytecode that return CtClassModifier and TypeMethodDescriptionSignatureAttribute.BaseType.getCtlass()Returns theCtClassrepresenting this primitive type.static CtClass[]Descriptor.getParameterTypes(String desc, ClassPool cp) Returns theCtClassobjects representing the parameter types specified by the given descriptor.static CtClassDescriptor.getReturnType(String desc, ClassPool cp) Returns theCtClassobject representing the return type specified by the given descriptor.static CtClassReturns aCtClassobject representing the type specified by the given descriptor.(package private) static CtClassDescriptor.toPrimitiveClass(char c) Methods in javassist.bytecode with parameters of type CtClassModifier and TypeMethodDescriptionvoidBytecode.addAnewarray(CtClass clazz, int length) Appends ICONST and ANEWARRAY.voidBytecode.addCheckcast(CtClass c) Appends CHECKCAST.intConstPool.addClassInfo(CtClass c) Adds a newCONSTANT_Class_infostructure.voidBytecode.addConstZero(CtClass type) Appends an instruction for pushing zero or null on the stack.voidBytecode.addExceptionHandler(int start, int end, int handler, CtClass type) Adds a new entry ofexception_table.voidBytecode.addGetfield(CtClass c, String name, String type) Appends GETFIELD.voidBytecode.addGetstatic(CtClass c, String name, String type) Appends GETSTATIC.voidBytecode.addInvokeinterface(CtClass clazz, String name, String desc, int count) Appends INVOKEINTERFACE.voidBytecode.addInvokeinterface(CtClass clazz, String name, CtClass returnType, CtClass[] paramTypes, int count) Appends INVOKEINTERFACE.voidBytecode.addInvokespecial(CtClass clazz, String name, String desc) Appends INVOKESPECIAL.voidBytecode.addInvokespecial(CtClass clazz, String name, CtClass returnType, CtClass[] paramTypes) Appends INVOKESPECIAL.voidBytecode.addInvokestatic(CtClass clazz, String name, String desc) Appends INVOKESTATIC.voidBytecode.addInvokestatic(CtClass clazz, String name, CtClass returnType, CtClass[] paramTypes) Appends INVOKESTATIC.voidBytecode.addInvokevirtual(CtClass clazz, String name, String desc) Appends INVOKEVIRTUAL.voidBytecode.addInvokevirtual(CtClass clazz, String name, CtClass returnType, CtClass[] paramTypes) Appends INVOKEVIRTUAL.intAppends an instruction for loading a value from the local variable at the indexn.intBytecode.addLoadParameters(CtClass[] params, int offset) Appends instructions for loading all the parameters onto the operand stack.intBytecode.addMultiNewarray(CtClass clazz, int dim) Appends MULTINEWARRAY.intBytecode.addMultiNewarray(CtClass clazz, int[] dimensions) Appends MULTINEWARRAY.voidAppends NEW.voidBytecode.addPutfield(CtClass c, String name, String desc) Appends PUTFIELD.private voidBytecode.addPutfield0(CtClass target, String classname, String name, String desc) voidBytecode.addPutstatic(CtClass c, String name, String desc) Appends PUTSTATIC.private voidBytecode.addPutstatic0(CtClass target, String classname, String fieldName, String desc) voidAppends ARETURN, IRETURN, .., or RETURN.intAppends an instruction for storing a value into the local variable at the indexn.static StringDescriptor.appendParameter(CtClass type, String descriptor) Appends a parameter type to the parameter list represented by the given descriptor.static StringDescriptor.insertParameter(CtClass type, String descriptor) Inserts a parameter type at the beginning of the parameter list represented by the given descriptor.static StringReturns the descriptor representing the given type.static StringDescriptor.ofConstructor(CtClass[] paramTypes) Returns the descriptor representing a constructor receiving the given parameter types.static StringReturns the descriptor representing a method that receives the given parameter types and returns the given type.static StringDescriptor.ofParameters(CtClass[] paramTypes) Returns the descriptor representing a list of parameter types.voidBytecode.setMaxLocals(boolean isStatic, CtClass[] params, int locals) Setsmax_locals.private static intprivate static voidDescriptor.toDescriptor(StringBuilder desc, CtClass type) static StringReturns 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 CtClassAnalyzer.clazzprivate CtClassControlFlow.clazzprivate final CtClassType.clazzFields in javassist.bytecode.analysis with type parameters of type CtClassMethods in javassist.bytecode.analysis that return CtClassModifier and TypeMethodDescriptionprivate static CtClassType.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 booleanprivate static CtClassType.findCommonSuperClass(CtClass one, CtClass two) Type.findExclusiveDeclaredInterfaces(Type type, CtClass exclude) static TypeObtain the Type for a given class.Type.getAllInterfaces(CtClass clazz, Map<String, CtClass> map) Type.getDeclaredInterfaces(CtClass clazz, Map<String, CtClass> map) voidPrints all the methods declared in the given class.static voidFramePrinter.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)privateConstructor 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 MemberValueAnnotation.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 CtClassTypeData.commonSuperClass(CtClass one, CtClass two) Finds the most specific common super class of the given classes.static CtClassTypeData.commonSuperClassEx(CtClass one, CtClass two) Finds the most specific common super class of the given classes by considering array types.private CtClassTypeData.TypeVar.fixByUppers(List<TypeData> users, ClassPool cp, Set<TypeData> visited, CtClass type) Methods in javassist.bytecode.stackmap with parameters of type CtClassModifier and TypeMethodDescriptionstatic CtClassTypeData.commonSuperClass(CtClass one, CtClass two) Finds the most specific common super class of the given classes.static CtClassTypeData.commonSuperClassEx(CtClass one, CtClass two) Finds the most specific common super class of the given classes by considering array types.(package private) static booleanprivate CtClassTypeData.TypeVar.fixByUppers(List<TypeData> users, ClassPool cp, Set<TypeData> visited, CtClass type) private static booleanTypeData.TypeVar.isObjectArray(CtClass cc) -
Uses of CtClass in javassist.compiler
Fields in javassist.compiler declared as CtClassModifier and TypeFieldDescriptionprivate CtClassAccessorMaker.clazzMemberResolver.Method.declaringprivate CtClassJvstCodeGen.dollarType(package private) CtClass[]JvstCodeGen.paramTypeList(package private) CtClassJvstCodeGen.returnTypeprotected CtClassMemberCodeGen.thisClassprotected CtClassTypeChecker.thisClassMethods in javassist.compiler that return CtClassModifier and TypeMethodDescriptionstatic CtClassMemberResolver.getSuperclass(CtClass c) static CtClassMemberResolver.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 CtClassMemberResolver.lookupClass0(String classname, boolean notCheckInner) MemberResolver.lookupClassByJvmName(String jvmName) MemberResolver.lookupClassByName(ASTList name) CtClass[]MemberCodeGen.makeParamList(MethodDecl md) CtClass[]MemberCodeGen.makeThrowsList(MethodDecl md) private CtClassMemberResolver.searchImports(String orgName) Methods in javassist.compiler with parameters of type CtClassModifier and TypeMethodDescriptionprotected voidJvstCodeGen.atAssignParamList(CtClass[] params, Bytecode code) voidMemberCodeGen.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 voidMemberCodeGen.atMethodCallCore2(CtClass targetClass, String mname, boolean isStatic, boolean isSpecial, int aload0pos, MemberResolver.Method found) static intJvstCodeGen.compileParameterList(Bytecode code, CtClass[] params, int regno) protected voidJvstCodeGen.compileUnwrapValue(CtClass type, Bytecode code) protected voidJvstTypeChecker.compileUnwrapValue(CtClass type) voidprotected StringMemberCodeGen.getAccessibleConstructor(String desc, CtClass declClass, MethodInfo minfo) protected StringMemberCodeGen.getAccessiblePrivate(String methodName, String desc, String newDesc, MethodInfo minfo, CtClass declClass) AccessorMaker.getConstructor(CtClass c, String desc, MethodInfo orig) static CtClassMemberResolver.getSuperclass(CtClass c) static CtClassMemberResolver.getSuperInterface(CtClass c, String interfaceName) private booleanMemberCodeGen.isEnclosing(CtClass outer, CtClass inner) private booleanMemberCodeGen.isFromSameDeclaringClass(CtClass outer, CtClass inner) private MemberResolver.MethodMemberResolver.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 voidJavac.makeDefaultBody(Bytecode b, CtClass type) intJavac.recordParams(String target, CtClass[] params, boolean use0, int varNo, boolean isStatic) Makes variables $0, $1, $2, ..., and $args represent method parameters.intJavac.recordParams(CtClass[] params, boolean isStatic) Makes variables $0 (this), $1, $2, ..., and $args represent method parameters.intJvstCodeGen.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.intJvstCodeGen.recordParams(CtClass[] params, boolean isStatic, String prefix, String paramVarName, String paramsName, SymbolTable tbl) Makes method parameters $0, $1, ..., $args, $$, and $class available.intJavac.recordReturnType(CtClass type, boolean useResultVar) Prepares to use cast $r, $w, $_, and $type.intJvstCodeGen.recordReturnType(CtClass type, String castName, String resultName, SymbolTable tbl) Makes a cast to the return type ($r) available.voidJavac.recordType(CtClass t) Prepares to use $type.voidJvstCodeGen.recordType(CtClass t) Makes $type available.private intJvstCodeGen.recordVar(CtClass cc, String varName, int varNo, SymbolTable tbl) intJavac.recordVariable(CtClass type, String name) Makes the given variable available.intJvstCodeGen.recordVariable(CtClass type, String varName, SymbolTable tbl) Makes the given variable name available.voidprivate voidvoidprivate voidConstructors 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 CtClassTransformFieldAccess.fieldClassprotected CtClassTransformReadField.fieldClassprotected CtClass[]TransformBefore.parameterTypesMethods in javassist.convert with parameters of type CtClassModifier and TypeMethodDescriptionprivate voidTransformAccessArrayField.initFrames(CtClass clazz, MethodInfo minfo) voidTransformAccessArrayField.initialize(ConstPool cp, CtClass clazz, MethodInfo minfo) voidTransformer.initialize(ConstPool cp, CtClass clazz, MethodInfo minfo) (package private) static StringTransformReadField.isField(ClassPool pool, ConstPool cp, CtClass fclass, String fname, boolean is_private, int index) (package private) static booleanTransformReadField.isFieldInSuper(CtClass clazz, CtClass fclass, String fname) protected voidprivate voidTransformBefore.makeCode2(Bytecode save, Bytecode load, int i, int n, CtClass[] paramTypes, int var) intTransformAccessArrayField.transform(CtClass tclazz, int pos, CodeIterator iterator, ConstPool cp) intTransformCall.transform(CtClass clazz, int pos, CodeIterator iterator, ConstPool cp) Modify INVOKEINTERFACE, INVOKESPECIAL, INVOKESTATIC and INVOKEVIRTUAL so that a different method is invoked.abstract intTransformer.transform(CtClass clazz, int pos, CodeIterator it, ConstPool cp) intTransformFieldAccess.transform(CtClass clazz, int pos, CodeIterator iterator, ConstPool cp) Modify GETFIELD, GETSTATIC, PUTFIELD, and PUTSTATIC so that a different field is accessed.intTransformNew.transform(CtClass clazz, int pos, CodeIterator iterator, ConstPool cp) Replace a sequence of NEW classname DUP ...intTransformNewClass.transform(CtClass clazz, int pos, CodeIterator iterator, ConstPool cp) Modifies a sequence of NEW classname DUP ...intTransformReadField.transform(CtClass tclazz, int pos, CodeIterator iterator, ConstPool cp) intTransformWriteField.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) CtClassNewArray.ProceedForArray.arrayType(package private) CtClassFieldAccess.ProceedForRead.fieldType(package private) CtClassFieldAccess.ProceedForWrite.fieldType(package private) CtClassNewExpr.ProceedForNew.newType(package private) CtClassCast.ProceedForCast.retType(package private) CtClassExpr.thisClassMethods in javassist.expr that return CtClassModifier and TypeMethodDescriptionNewArray.getComponentType()Returns the type of array components.private CtClassFieldAccess.getCtClass()Returns the class in which the field is declared.protected CtClassMethodCall.getCtClass()Returns the class of the target object, which the method is called on.private CtClassNewExpr.getCtClass()Returns the class of the created object.Expr.getEnclosingClass()Returns the class that declares the method enclosing this expression.(package private) CtClassNewArray.getPrimitiveType(int atype) Cast.getType()Returns theCtClassobject representing the type specified by the cast.Handler.getType()Returns the type handled by the catch clause.Instanceof.getType()Returns theCtClassobject 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 booleanExpr.checkResultValue(CtClass retType, String prog) booleanExprEditor.doit(CtClass clazz, MethodInfo minfo) Undocumented method.(package private) booleanExprEditor.doit(CtClass clazz, MethodInfo minfo, ExprEditor.LoopContext context, CodeIterator iterator, int endPos) Visits each bytecode in the given range.(package private) final booleanExprEditor.loopBody(CodeIterator iterator, CtClass clazz, MethodInfo minfo, ExprEditor.LoopContext context) (package private) static final voidExpr.storeStack(CtClass[] params, boolean isStaticCall, int regno, Bytecode bytecode) private static voidExpr.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 voidConstructors in javassist.expr with parameters of type CtClassModifierConstructorDescriptionprotectedCast(int pos, CodeIterator i, CtClass declaring, MethodInfo m) Undocumented constructor.protectedConstructorCall(int pos, CodeIterator i, CtClass decl, MethodInfo m) Undocumented constructor.protectedExpr(int pos, CodeIterator i, CtClass declaring, MethodInfo m) Undocumented constructor.protectedFieldAccess(int pos, CodeIterator i, CtClass declaring, MethodInfo m, int op) protectedHandler(ExceptionTable et, int nth, CodeIterator it, CtClass declaring, MethodInfo m) Undocumented constructor.protectedInstanceof(int pos, CodeIterator i, CtClass declaring, MethodInfo m) Undocumented constructor.protectedMethodCall(int pos, CodeIterator i, CtClass declaring, MethodInfo m) Undocumented constructor.protectedNewArray(int pos, CodeIterator i, CtClass declaring, MethodInfo m, int op) protectedNewExpr(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 CtClassGet the cached classprotected CtClassScopedClassPool.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 voidScopedClassPool.cacheCtClass(String classname, CtClass c, boolean dynamic) Cache a classvoidScopedClassPool.lockInCache(CtClass c) Lock a class into the cachevoidSoften 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 TypeMethodDescriptionbooleanReflection.makeReflective(CtClass clazz, CtClass metaobject, CtClass metaclass) Produces a reflective class.private booleanReflection.modifyClassfile(CtClass clazz, CtClass metaobject, CtClass metaclass) private voidReflection.processFields(CtClass clazz) private voidReflection.processMethods(CtClass clazz, boolean dontSearch) private voidReflection.processMethods0(int mod, CtClass clazz, CtMethod m, int identifier, boolean dontSearch) private voidReflection.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.exceptionForProxyprivate CtClass[]StubGenerator.interfacesForProxyprivate CtClass[]StubGenerator.proxyConstructorParamTypesFields in javassist.tools.rmi with type parameters of type CtClassMethods in javassist.tools.rmi that return CtClassModifier and TypeMethodDescriptionprivate CtClassStubGenerator.produceProxyClass(CtClass orgclass, Class<?> orgRtClass) private CtClassprivate CtClass[]Methods in javassist.tools.rmi with parameters of type CtClassModifier and TypeMethodDescriptionprivate voidStubGenerator.addMethods(CtClass proxy, Method[] ms) private voidStubGenerator.modifySuperclass(CtClass orgclass) Adds a default constructor to the super classes.private CtClassStubGenerator.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).