Uses of Class
javassist.CtClass
-
Packages that use CtClass 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.javassist.tools.rmi Sample implementation of remote method invocation. -
-
Uses of CtClass in javassist
Subclasses of CtClass in javassist Modifier and Type Class Description (package private) classCtArrayArray types.(package private) classCtClassTypeClass types.(package private) classCtNewClass(package private) classCtNewNestedClassA newly created public nested class.classCtPrimitiveTypeAn instance ofCtPrimitiveTyperepresents a primitive type.Fields in javassist declared as CtClass Modifier and Type Field Description static 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.Methods in javassist that return CtClass Modifier and Type Method Description (package private) CtClassClassPool. checkNotExists(java.lang.String classname)protected CtClassClassPool. createCtClass(java.lang.String classname, boolean useCache)Creates a CtClass object representing the specified class.CtClassClassPool. get(java.lang.String classname)Reads a class file from the source and returns a reference to theCtClassobject representing that class file.CtClass[]ClassPool. get(java.lang.String[] classnames)Reads class files from the source and returns an array ofCtClassobjects representing those class files.protected CtClassClassPool. get0(java.lang.String classname, boolean useCache)CtClassClassPool. getAndRename(java.lang.String orgName, java.lang.String newName)Reads a class file and constructs aCtClassobject with a new name.protected CtClassClassPool. getCached(java.lang.String classname)Provide a hook so that subclasses can do their own caching of classes.CtClassCtArray. getComponentType()CtClassCtClass. getComponentType()If this object represents an array, this method returns the component type of the array.CtClassClassPool. getCtClass(java.lang.String classname)Returns aCtClassobject with the given name.CtClass[]CtClass. getDeclaredClasses()Returns an array of nested classes declared in the class.CtClassCtClass. getDeclaringClass()If this class is a member class or interface of another class, then the class enclosing this class is returned.CtClassCtClassType. getDeclaringClass()CtClassCtField. getDeclaringClass()Returns the class declaring the field.CtClassCtMember. 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()CtClassClassPool. getOrNull(java.lang.String classname)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.CtClassCtMethod. getReturnType()Obtains the type of the returned value.(package private) CtClassCtBehavior. getReturnType0()Obtains the type of the returned value.CtClassCtArray. getSuperclass()CtClassCtClass. getSuperclass()Obtains the class object representing the superclass of the class.CtClassCtClassType. getSuperclass()CtClassCtField. getType()Returns the type of the field.CtClassClassPool. makeAnnotation(java.lang.String name)Creates a new annotation.CtClassClassPool. makeClass(java.io.InputStream classfile)Creates a new class (or interface) from the given class file.CtClassClassPool. makeClass(java.io.InputStream classfile, boolean ifNotFrozen)Creates a new class (or interface) from the given class file.CtClassClassPool. makeClass(java.lang.String classname)Creates a new public class.CtClassClassPool. makeClass(java.lang.String classname, CtClass superclass)Creates a new public class.CtClassClassPool. makeClass(ClassFile classfile)Creates a new class (or interface) from the given class file.CtClassClassPool. makeClass(ClassFile classfile, boolean ifNotFrozen)Creates a new class (or interface) from the given class file.CtClassClassPool. makeClassIfNew(java.io.InputStream classfile)Creates a new class (or interface) from the given class file.CtClassClassPool. makeInterface(java.lang.String name)Creates a new public interface.CtClassClassPool. makeInterface(java.lang.String name, CtClass superclass)Creates a new public interface.(package private) CtClassClassPool. makeNestedClass(java.lang.String classname)Creates a new public nested class.CtClassCtClass. makeNestedClass(java.lang.String name, boolean isStatic)Makes a new public nested class.CtClassCtClassType. makeNestedClass(java.lang.String name, boolean isStatic)protected CtClassClassPool. removeCached(java.lang.String classname)Provide a hook so that subclasses can do their own caching of classes.Methods in javassist with parameters of type CtClass Modifier and Type Method Description static CtMethodCtNewMethod. abstractMethod(CtClass returnType, java.lang.String mname, CtClass[] parameters, CtClass[] exceptions, CtClass declaring)Creates a public abstract method.voidCtBehavior. addCatch(java.lang.String src, CtClass exceptionType)Adds a catch clause that handles an exception thrown in the body.voidCtBehavior. addCatch(java.lang.String src, CtClass exceptionType, java.lang.String exceptionName)Adds a catch clause that handles an exception thrown in the body.voidCtClass. addInterface(CtClass anInterface)Adds an interface.voidCtClassType. addInterface(CtClass anInterface)voidCtBehavior. addLocalVariable(java.lang.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, java.lang.String desc)static CtField.InitializerCtField.Initializer. byCall(CtClass methodClass, java.lang.String methodName)Makes an initializer calling a static method.static CtField.InitializerCtField.Initializer. byCall(CtClass methodClass, java.lang.String methodName, java.lang.String[] stringParams)Makes an initializer calling a static method.static CtField.InitializerCtField.Initializer. byCallWithParams(CtClass methodClass, java.lang.String methodName)Makes an initializer calling a static method.static CtField.InitializerCtField.Initializer. byCallWithParams(CtClass methodClass, java.lang.String methodName, java.lang.String[] stringParams)Makes an initializer calling a static method.static CtField.InitializerCtField.Initializer. byNew(CtClass objectType)Makes an initializer creating a new object.static CtField.InitializerCtField.Initializer. byNew(CtClass objectType, java.lang.String[] stringParams)Makes 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, java.lang.String[] stringParams)Makes an initializer creating a new object.protected voidClassPool. cacheCtClass(java.lang.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(java.lang.String oldname, CtClass clazz)(package private) intCtField.ArrayInitializer. compile(CtClass type, java.lang.String name, Bytecode code, CtClass[] parameters, Javac drv)(package private) intCtField.CodeInitializer0. compile(CtClass type, java.lang.String name, Bytecode code, CtClass[] parameters, Javac drv)(package private) intCtField.DoubleInitializer. compile(CtClass type, java.lang.String name, Bytecode code, CtClass[] parameters, Javac drv)(package private) intCtField.FloatInitializer. compile(CtClass type, java.lang.String name, Bytecode code, CtClass[] parameters, Javac drv)(package private) abstract intCtField.Initializer. compile(CtClass type, java.lang.String name, Bytecode code, CtClass[] parameters, Javac drv)(package private) intCtField.IntInitializer. compile(CtClass type, java.lang.String name, Bytecode code, CtClass[] parameters, Javac drv)(package private) intCtField.LongInitializer. compile(CtClass type, java.lang.String name, Bytecode code, CtClass[] parameters, Javac drv)(package private) intCtField.MethodInitializer. compile(CtClass type, java.lang.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, java.lang.String name, Bytecode code, CtClass[] parameters, Javac drv)(package private) intCtField.NewInitializer. compile(CtClass type, java.lang.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, java.lang.String name, Bytecode code, CtClass[] parameters, Javac drv)(package private) intCtField.StringInitializer. compile(CtClass type, java.lang.String name, Bytecode code, CtClass[] parameters, Javac drv)(package private) intCtField.ArrayInitializer. compileIfStatic(CtClass type, java.lang.String name, Bytecode code, Javac drv)(package private) intCtField.CodeInitializer0. compileIfStatic(CtClass type, java.lang.String name, Bytecode code, Javac drv)(package private) intCtField.DoubleInitializer. compileIfStatic(CtClass type, java.lang.String name, Bytecode code, Javac drv)(package private) intCtField.FloatInitializer. compileIfStatic(CtClass type, java.lang.String name, Bytecode code, Javac drv)(package private) abstract intCtField.Initializer. compileIfStatic(CtClass type, java.lang.String name, Bytecode code, Javac drv)(package private) intCtField.IntInitializer. compileIfStatic(CtClass type, java.lang.String name, Bytecode code, Javac drv)(package private) intCtField.LongInitializer. compileIfStatic(CtClass type, java.lang.String name, Bytecode code, Javac drv)(package private) intCtField.MethodInitializer. compileIfStatic(CtClass type, java.lang.String name, Bytecode code, Javac drv)Produces codes for a static field.(package private) intCtField.MultiArrayInitializer. compileIfStatic(CtClass type, java.lang.String name, Bytecode code, Javac drv)(package private) intCtField.NewInitializer. compileIfStatic(CtClass type, java.lang.String name, Bytecode code, Javac drv)Produces codes for a static field.(package private) intCtField.ParamInitializer. compileIfStatic(CtClass type, java.lang.String name, Bytecode code, Javac drv)(package private) intCtField.StringInitializer. compileIfStatic(CtClass type, java.lang.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 CtMethodCtNewMethod. copy(CtMethod src, java.lang.String name, CtClass declaring, ClassMap map)Creates a copy of a method with a new name.static CtMethodCtNewMethod. copy(CtMethod src, CtClass declaring, ClassMap map)Creates a copy of a method.static CtConstructorCtNewConstructor. defaultConstructor(CtClass declaring)Creates a default (public) constructor.static CtMethodCtNewMethod. delegator(CtMethod delegate, CtClass declaring)Creates 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.voidClassMap. fix(CtClass clazz)Prevents 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)CtConstructorCtClass. getDeclaredConstructor(CtClass[] params)Returns a constructor receiving the specified parameters.CtMethodCtClass. getDeclaredMethod(java.lang.String name, CtClass[] params)Retrieves the method with the specified name and parameter types among the methods declared in the class.CtMethodCtClassType. getDeclaredMethod(java.lang.String name, CtClass[] params)private static voidCtClassType. getFields(java.util.ArrayList alist, CtClass cc)private static CtMethodCtClassType. getMethod0(CtClass cc, java.lang.String name, java.lang.String desc)private static voidCtClassType. getMethods0(java.util.HashMap h, CtClass cc)private intCtBehavior. insertAfterAdvice(Bytecode code, Javac jv, java.lang.String src, ConstPool cp, CtClass rtype, int varNo)private intCtBehavior. insertAfterHandler(boolean asFinally, Bytecode b, CtClass rtype, int returnVarNo, Javac javac, java.lang.String src)voidCtBehavior. insertParameter(CtClass type)Inserts a new parameter, which becomes the first parameter.private booleanCtNewClass. isInheritable(int mod, CtClass superclazz)private static booleanSerialVersionUID. isSerializable(CtClass clazz)Does the class implement Serializable?private static java.lang.StringSerialVersionUID. javaName(CtClass clazz)static CtFieldCtField. make(java.lang.String src, CtClass declaring)Compiles the given source code and creates a field.static CtMethodCtMethod. make(java.lang.String src, CtClass declaring)Compiles the given source code and creates a method.static CtMethodCtMethod. make(MethodInfo minfo, CtClass declaring)Creates a method from aMethodInfoobject.static CtConstructorCtNewConstructor. make(java.lang.String src, CtClass declaring)Compiles 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 CtConstructorCtNewConstructor. make(CtClass[] parameters, CtClass[] exceptions, java.lang.String body, CtClass declaring)Creates a public constructor.static CtConstructorCtNewConstructor. make(CtClass[] parameters, CtClass[] exceptions, CtClass declaring)Creates a public constructor that only calls a constructor in the super class.static CtMethodCtNewMethod. make(int modifiers, CtClass returnType, java.lang.String mname, CtClass[] parameters, CtClass[] exceptions, java.lang.String body, CtClass declaring)Creates a method.static CtMethodCtNewMethod. make(java.lang.String src, CtClass declaring)Compiles the given source code and creates a method.static CtMethodCtNewMethod. make(java.lang.String src, CtClass declaring, java.lang.String delegateObj, java.lang.String delegateMethod)Compiles the given source code and creates a method.static CtMethodCtNewMethod. make(CtClass returnType, java.lang.String mname, CtClass[] parameters, CtClass[] exceptions, java.lang.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)CtClassClassPool. makeClass(java.lang.String classname, CtClass superclass)Creates a new public class.private intCtClassType. makeFieldInitializer(Bytecode code, CtClass[] parameters)CtClassClassPool. makeInterface(java.lang.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.voidClassMap. put(CtClass oldname, CtClass newname)Maps a class name to another name in this hashtable.voidCodeConverter. redirectFieldAccess(CtField field, CtClass newClass, java.lang.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, java.lang.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, java.lang.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, java.lang.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)voidCtField. setType(CtClass clazz)Sets the type of the field.static CtConstructorCtNewConstructor. skeleton(CtClass[] parameters, CtClass[] exceptions, CtClass declaring)Creates 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)booleanCtArray. subtypeOf(CtClass clazz)booleanCtClass. subtypeOf(CtClass clazz)Returnstrueif this class extends or implementsclazz.booleanCtClassType. subtypeOf(CtClass clazz)java.lang.ClassClassPool. toClass(CtClass clazz)Converts the given class to ajava.lang.Classobject.java.lang.ClassClassPool. toClass(CtClass ct, java.lang.ClassLoader loader)Deprecated.java.lang.ClassClassPool. toClass(CtClass ct, java.lang.ClassLoader loader, java.security.ProtectionDomain domain)Converts the class to ajava.lang.Classobject.CtMethodCtConstructor. toMethod(java.lang.String name, CtClass declaring)Makes a copy of this constructor and converts it into a method.CtMethodCtConstructor. toMethod(java.lang.String name, CtClass declaring, ClassMap map)Makes a copy of this constructor and converts it into a method.private static voidCtNewNestedClass. updateInnerEntry(int mod, java.lang.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, java.lang.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, java.lang.String mname, CtClass[] parameterTypes, CtClass[] exceptionTypes, CtMethod body, CtMethod.ConstParameter constParam, CtClass declaring)Constructors in javassist with parameters of type CtClass Constructor Description ArrayInitializer(CtClass t, int s)CtBehavior(CtClass clazz, MethodInfo minfo)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 aCtConstructorobject.CtField(java.lang.String typeDesc, java.lang.String name, CtClass clazz)CtField(FieldInfo fi, CtClass clazz)CtField(CtClass type, java.lang.String name, CtClass declaring)Creates aCtFieldobject.CtField(CtField src, CtClass declaring)Creates a copy of the given field.CtMember(CtClass clazz)CtMethod(MethodInfo minfo, CtClass declaring)CtMethod(CtClass returnType, java.lang.String mname, CtClass[] parameters, CtClass declaring)Creates a public abstract method.CtMethod(CtMethod src, CtClass declaring, ClassMap map)Creates a copy of aCtMethodobject.CtNewClass(java.lang.String name, ClassPool cp, boolean isInterface, CtClass superclass)CtNewNestedClass(java.lang.String realName, ClassPool cp, boolean isInterface, CtClass superclass)MultiArrayInitializer(CtClass t, int[] d) -
Uses of CtClass in javassist.bytecode
Fields in javassist.bytecode declared as CtClass Modifier and Type Field Description static CtClassBytecode. THISRepresents theCtClassfile using the constant pool table given to thisBytecodeobject.static CtClassConstPool. THISRepresents the class using this constant pool table.Methods in javassist.bytecode that return CtClass Modifier and Type Method Description CtClassSignatureAttribute.BaseType. getCtlass()Returns theCtClassrepresenting this primitive type.static CtClass[]Descriptor. getParameterTypes(java.lang.String desc, ClassPool cp)Returns theCtClassobjects representing the parameter types specified by the given descriptor.static CtClassDescriptor. getReturnType(java.lang.String desc, ClassPool cp)Returns theCtClassobject representing the return type specified by the given descriptor.static CtClassDescriptor. toCtClass(java.lang.String desc, ClassPool cp)Returns aCtClassobject representing the type specified by the given descriptor.(package private) static CtClassDescriptor. toPrimitiveClass(char c)Methods in javassist.bytecode with parameters of type CtClass Modifier and Type Method Description voidBytecode. 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, java.lang.String name, java.lang.String type)Appends GETFIELD.voidBytecode. addGetstatic(CtClass c, java.lang.String name, java.lang.String type)Appends GETSTATIC.voidBytecode. addInvokeinterface(CtClass clazz, java.lang.String name, java.lang.String desc, int count)Appends INVOKEINTERFACE.voidBytecode. addInvokeinterface(CtClass clazz, java.lang.String name, CtClass returnType, CtClass[] paramTypes, int count)Appends INVOKEINTERFACE.voidBytecode. addInvokespecial(CtClass clazz, java.lang.String name, java.lang.String desc)Appends INVOKESPECIAL.voidBytecode. addInvokespecial(CtClass clazz, java.lang.String name, CtClass returnType, CtClass[] paramTypes)Appends INVOKESPECIAL.voidBytecode. addInvokestatic(CtClass clazz, java.lang.String name, java.lang.String desc)Appends INVOKESTATIC.voidBytecode. addInvokestatic(CtClass clazz, java.lang.String name, CtClass returnType, CtClass[] paramTypes)Appends INVOKESTATIC.voidBytecode. addInvokevirtual(CtClass clazz, java.lang.String name, java.lang.String desc)Appends INVOKEVIRTUAL.voidBytecode. addInvokevirtual(CtClass clazz, java.lang.String name, CtClass returnType, CtClass[] paramTypes)Appends INVOKEVIRTUAL.intBytecode. addLoad(int n, CtClass type)Appends 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.voidBytecode. addNew(CtClass clazz)Appends NEW.voidBytecode. addPutfield(CtClass c, java.lang.String name, java.lang.String desc)Appends PUTFIELD.private voidBytecode. addPutfield0(CtClass target, java.lang.String classname, java.lang.String name, java.lang.String desc)voidBytecode. addPutstatic(CtClass c, java.lang.String name, java.lang.String desc)Appends PUTSTATIC.private voidBytecode. addPutstatic0(CtClass target, java.lang.String classname, java.lang.String fieldName, java.lang.String desc)voidBytecode. addReturn(CtClass type)Appends ARETURN, IRETURN, .., or RETURN.intBytecode. addStore(int n, CtClass type)Appends an instruction for storing a value into the local variable at the indexn.static java.lang.StringDescriptor. appendParameter(CtClass type, java.lang.String descriptor)Appends a parameter type to the parameter list represented by the given descriptor.static java.lang.StringDescriptor. insertParameter(CtClass type, java.lang.String descriptor)Inserts a parameter type at the beginning of the parameter list represented by the given descriptor.static java.lang.StringDescriptor. of(CtClass type)Returns the descriptor representing the given type.static java.lang.StringDescriptor. ofConstructor(CtClass[] paramTypes)Returns the descriptor representing a constructor receiving the given parameter types.static java.lang.StringDescriptor. ofMethod(CtClass returnType, CtClass[] paramTypes)Returns the descriptor representing a method that receives the given parameter types and returns the given type.static java.lang.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 intDescriptor. toCtClass(ClassPool cp, java.lang.String desc, int i, CtClass[] args, int n)private static voidDescriptor. toDescriptor(java.lang.StringBuffer desc, CtClass type)static java.lang.StringDescriptor. toJvmName(CtClass clazz)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 CtClass Modifier and Type Field Description private CtClassAnalyzer. clazzprivate CtClassControlFlow. clazzprivate CtClassType. clazzMethods in javassist.bytecode.analysis that return CtClass Modifier and Type Method Description private static CtClassType. findCommonSuperClass(CtClass one, CtClass two)CtClassMultiArrayType. getCtClass()CtClassMultiType. getCtClass()Gets the class that corresponds with this type.CtClassType. getCtClass()Returns the class this type represents.Methods in javassist.bytecode.analysis with parameters of type CtClass Modifier and Type Method 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.(package private) static booleanType. eq(CtClass one, CtClass two)private static CtClassType. findCommonSuperClass(CtClass one, CtClass two)private java.util.MapType. findExclusiveDeclaredInterfaces(Type type, CtClass exclude)static TypeType. get(CtClass clazz)Obtain the Type for a given class.(package private) java.util.MapType. getAllInterfaces(CtClass clazz, java.util.Map map)(package private) java.util.MapType. getDeclaredInterfaces(CtClass clazz, java.util.Map map)voidFramePrinter. print(CtClass clazz)Prints all the methods declared in the given class.static voidFramePrinter. print(CtClass clazz, java.io.PrintStream stream)Prints all the methods declared in the given class.Constructors in javassist.bytecode.analysis with parameters of type CtClass Constructor Description ControlFlow(CtClass ctclazz, MethodInfo minfo)Constructs a control-flow analyzer.Type(CtClass clazz)Type(CtClass clazz, boolean special) -
Uses of CtClass in javassist.bytecode.annotation
Methods in javassist.bytecode.annotation with parameters of type CtClass Modifier and Type Method Description static MemberValueAnnotation. createMemberValue(ConstPool cp, CtClass type)Makes an instance ofMemberValue.Constructors in javassist.bytecode.annotation with parameters of type CtClass Constructor Description Annotation(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 CtClass Modifier and Type Method Description static 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(java.util.ArrayList users, ClassPool cp, java.util.HashSet visited, CtClass type)Methods in javassist.bytecode.stackmap with parameters of type CtClass Modifier and Type Method Description static 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 booleanTypeData. eq(CtClass one, CtClass two)private CtClassTypeData.TypeVar. fixByUppers(java.util.ArrayList users, ClassPool cp, java.util.HashSet visited, CtClass type)private static booleanTypeData.TypeVar. isObjectArray(CtClass cc) -
Uses of CtClass in javassist.compiler
Fields in javassist.compiler declared as CtClass Modifier and Type Field Description private CtClassAccessorMaker. clazzCtClassMemberResolver.Method. declaringprivate CtClassJvstCodeGen. dollarType(package private) CtClass[]JvstCodeGen. paramTypeList(package private) CtClassJvstCodeGen. returnTypeprotected CtClassMemberCodeGen. thisClassprotected CtClassTypeChecker. thisClassMethods in javassist.compiler that return CtClass Modifier and Type Method Description static CtClassMemberResolver. getSuperclass(CtClass c)static CtClassMemberResolver. getSuperInterface(CtClass c, java.lang.String interfaceName)CtClassMemberCodeGen. getThisClass()CtClassMemberResolver. lookupClass(int type, int dim, java.lang.String classname)CtClassMemberResolver. lookupClass(java.lang.String name, boolean notCheckInner)CtClassMemberResolver. lookupClass(Declarator decl)private CtClassMemberResolver. lookupClass0(java.lang.String classname, boolean notCheckInner)CtClassMemberResolver. lookupClassByJvmName(java.lang.String jvmName)CtClassMemberResolver. lookupClassByName(ASTList name)CtClass[]MemberCodeGen. makeParamList(MethodDecl md)CtClass[]MemberCodeGen. makeThrowsList(MethodDecl md)private CtClassMemberResolver. searchImports(java.lang.String orgName)Methods in javassist.compiler with parameters of type CtClass Modifier and Type Method Description protected voidJvstCodeGen. atAssignParamList(CtClass[] params, Bytecode code)voidMemberCodeGen. atMethodCallCore(CtClass targetClass, java.lang.String mname, ASTList args, boolean isStatic, boolean isSpecial, int aload0pos, MemberResolver.Method found)MemberResolver.MethodTypeChecker. atMethodCallCore(CtClass targetClass, java.lang.String mname, ASTList args)private voidMemberCodeGen. atMethodCallCore2(CtClass targetClass, java.lang.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)voidJvstCodeGen. doNumCast(CtClass type)protected java.lang.StringMemberCodeGen. getAccessibleConstructor(java.lang.String desc, CtClass declClass, MethodInfo minfo)protected java.lang.StringMemberCodeGen. getAccessiblePrivate(java.lang.String methodName, java.lang.String desc, java.lang.String newDesc, MethodInfo minfo, CtClass declClass)java.lang.StringAccessorMaker. getConstructor(CtClass c, java.lang.String desc, MethodInfo orig)static CtClassMemberResolver. getSuperclass(CtClass c)static CtClassMemberResolver. getSuperInterface(CtClass c, java.lang.String interfaceName)private booleanMemberCodeGen. isEnclosing(CtClass outer, CtClass inner)private MemberResolver.MethodMemberResolver. lookupMethod(CtClass clazz, java.lang.String methodName, int[] argTypes, int[] argDims, java.lang.String[] argClassNames, boolean onlyExact)MemberResolver.MethodMemberResolver. lookupMethod(CtClass clazz, CtClass currentClass, MethodInfo current, java.lang.String methodName, int[] argTypes, int[] argDims, java.lang.String[] argClassNames)private static voidJavac. makeDefaultBody(Bytecode b, CtClass type)intJavac. recordParams(java.lang.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, java.lang.String prefix, java.lang.String paramVarName, java.lang.String paramsName, boolean use0, int paramBase, java.lang.String target, SymbolTable tbl)Makes method parameters $0, $1, ..., $args, $$, and $class available.intJvstCodeGen. recordParams(CtClass[] params, boolean isStatic, java.lang.String prefix, java.lang.String paramVarName, java.lang.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, java.lang.String castName, java.lang.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, java.lang.String varName, int varNo, SymbolTable tbl)intJavac. recordVariable(CtClass type, java.lang.String name)Makes the given variable available.intJvstCodeGen. recordVariable(CtClass type, java.lang.String varName, SymbolTable tbl)Makes the given variable name available.voidJvstCodeGen. setType(CtClass type)private voidJvstCodeGen. setType(CtClass type, int dim)voidJvstTypeChecker. setType(CtClass type)private voidJvstTypeChecker. setType(CtClass type, int dim)Constructors in javassist.compiler with parameters of type CtClass Constructor Description AccessorMaker(CtClass c)CtFieldWithInit(CtClass type, java.lang.String name, CtClass declaring)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) -
Uses of CtClass in javassist.convert
Fields in javassist.convert declared as CtClass Modifier and Type Field Description private CtClassTransformFieldAccess. fieldClassprotected CtClassTransformReadField. fieldClassprotected CtClass[]TransformBefore. parameterTypesMethods in javassist.convert with parameters of type CtClass Modifier and Type Method Description private 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 java.lang.StringTransformReadField. isField(ClassPool pool, ConstPool cp, CtClass fclass, java.lang.String fname, boolean is_private, int index)(package private) static booleanTransformReadField. isFieldInSuper(CtClass clazz, CtClass fclass, java.lang.String fname)protected voidTransformBefore. makeCode(CtClass[] paramTypes, ConstPool cp)private 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 CtClass Modifier and Type Field Description (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 CtClass Modifier and Type Method Description CtClassNewArray. 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.CtClassExpr. getEnclosingClass()Returns the class that declares the method enclosing this expression.(package private) CtClassNewArray. getPrimitiveType(int atype)CtClassCast. getType()Returns theCtClassobject representing the type specified by the cast.CtClassHandler. getType()Returns the type handled by the catch clause.CtClassInstanceof. 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 CtClass Modifier and Type Method Description private static voidExpr. addClass(java.util.LinkedList list, CtClass c)(package private) static booleanExpr. checkResultValue(CtClass retType, java.lang.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) booleanExprEditor. loopBody(CodeIterator iterator, CtClass clazz, MethodInfo minfo, ExprEditor.LoopContext context)(package private) static voidExpr. storeStack(CtClass[] params, boolean isStaticCall, int regno, Bytecode bytecode)private static voidExpr. storeStack0(int i, int n, CtClass[] params, int regno, Bytecode bytecode)Constructors in javassist.expr with parameters of type CtClass Constructor 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, java.lang.String type, int np)Undocumented constructor.ProceedForArray(CtClass type, int op, int i, int dim)ProceedForCast(int i, CtClass t)ProceedForNew(CtClass nt, int ni, int mi)ProceedForRead(CtClass type, int op, int i, int var)ProceedForWrite(CtClass type, int op, int i, int var) -
Uses of CtClass in javassist.scopedpool
Methods in javassist.scopedpool that return CtClass Modifier and Type Method Description protected CtClassScopedClassPool. getCached(java.lang.String classname)Get the cached classprotected CtClassScopedClassPool. getCachedLocally(java.lang.String classname)Whether the class is cached in this pooledCtClassScopedClassPool. getLocally(java.lang.String classname)Get any local copy of the classMethods in javassist.scopedpool with parameters of type CtClass Modifier and Type Method Description protected voidScopedClassPool. cacheCtClass(java.lang.String classname, CtClass c, boolean dynamic)Cache a classvoidScopedClassPool. lockInCache(CtClass c)Lock a class into the cachevoidScopedClassPool. soften(CtClass clazz)Soften a classjava.lang.ClassScopedClassPool. toClass(CtClass ct, java.lang.ClassLoader loader, java.security.ProtectionDomain domain)Convert a javassist class to a java class -
Uses of CtClass in javassist.tools.reflect
Fields in javassist.tools.reflect declared as CtClass Modifier and Type Field Description protected CtClass[]Reflection. readParamMethods in javassist.tools.reflect with parameters of type CtClass Modifier and Type Method Description booleanReflection. 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 CtClass Modifier and Type Field Description private CtClass[]StubGenerator. exceptionForProxyprivate CtClass[]StubGenerator. interfacesForProxyprivate CtClass[]StubGenerator. proxyConstructorParamTypesMethods in javassist.tools.rmi that return CtClass Modifier and Type Method Description private CtClassStubGenerator. produceProxyClass(CtClass orgclass, java.lang.Class orgRtClass)private CtClassStubGenerator. toCtClass(java.lang.Class rtclass)private CtClass[]StubGenerator. toCtClass(java.lang.Class[] rtclasses)Methods in javassist.tools.rmi with parameters of type CtClass Modifier and Type Method Description private voidStubGenerator. addMethods(CtClass proxy, java.lang.reflect.Method[] ms)private voidStubGenerator. modifySuperclass(CtClass orgclass)Adds a default constructor to the super classes.private CtClassStubGenerator. produceProxyClass(CtClass orgclass, java.lang.Class orgRtClass)
-