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.
|
Modifier and Type | Class and Description |
---|---|
(package private) class |
CtArray
Array types.
|
(package private) class |
CtClassType
Class types.
|
(package private) class |
CtNewClass |
(package private) class |
CtNewNestedClass
A newly created public nested class.
|
class |
CtPrimitiveType
An instance of
CtPrimitiveType represents a primitive type. |
Modifier and Type | Field and Description |
---|---|
static CtClass |
CtClass.booleanType
The
CtClass object representing
the boolean type. |
static CtClass |
CtClass.byteType
The
CtClass object representing
the byte type. |
static CtClass |
CtClass.charType
The
CtClass object representing
the char type. |
protected CtClass |
CtMember.declaringClass |
static CtClass |
CtClass.doubleType
The
CtClass object representing
the double type. |
static CtClass |
CtClass.floatType
The
CtClass object representing
the float type. |
private CtClass[] |
CtArray.interfaces |
static CtClass |
CtClass.intType
The
CtClass object representing
the int type. |
static CtClass |
CtClass.longType
The
CtClass object representing
the long type. |
(package private) CtClass |
CtField.NewInitializer.objectType |
(package private) static CtClass[] |
CtClass.primitiveTypes |
static CtClass |
CtClass.shortType
The
CtClass object representing
the short type. |
(package private) CtClass |
CtField.ArrayInitializer.type |
(package private) CtClass |
CtField.MultiArrayInitializer.type |
static CtClass |
CtClass.voidType
The
CtClass object representing
the void type. |
Modifier and Type | Method and Description |
---|---|
(package private) CtClass |
ClassPool.checkNotExists(java.lang.String classname) |
protected CtClass |
ClassPool.createCtClass(java.lang.String classname,
boolean useCache)
Creates a CtClass object representing the specified class.
|
CtClass |
ClassPool.get(java.lang.String classname)
Reads a class file from the source and returns a reference
to the
CtClass
object representing that class file. |
CtClass[] |
ClassPool.get(java.lang.String[] classnames)
Reads class files from the source and returns an array of
CtClass
objects representing those class files. |
protected CtClass |
ClassPool.get0(java.lang.String classname,
boolean useCache) |
CtClass |
ClassPool.getAndRename(java.lang.String orgName,
java.lang.String newName)
Reads a class file and constructs a
CtClass
object with a new name. |
protected CtClass |
ClassPool.getCached(java.lang.String classname)
Provide a hook so that subclasses can do their own
caching of classes.
|
CtClass |
CtArray.getComponentType() |
CtClass |
CtClass.getComponentType()
If this object represents an array, this method returns the component
type of the array.
|
CtClass |
ClassPool.getCtClass(java.lang.String classname)
Returns a
CtClass object with the given name. |
CtClass[] |
CtClass.getDeclaredClasses()
Returns an array of nested classes declared in the class.
|
CtClass |
CtClass.getDeclaringClass()
If this class is a member class or interface of another class,
then the class enclosing this class is returned.
|
CtClass |
CtClassType.getDeclaringClass() |
CtClass |
CtField.getDeclaringClass()
Returns the class declaring the field.
|
CtClass |
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() |
CtClass |
ClassPool.getOrNull(java.lang.String classname)
Reads a class file from the source and returns a reference
to the
CtClass
object representing that class file. |
CtClass[] |
CtBehavior.getParameterTypes()
Obtains parameter types of this method/constructor.
|
CtClass |
CtMethod.getReturnType()
Obtains the type of the returned value.
|
(package private) CtClass |
CtBehavior.getReturnType0()
Obtains the type of the returned value.
|
CtClass |
CtArray.getSuperclass() |
CtClass |
CtClass.getSuperclass()
Obtains the class object representing the superclass of the
class.
|
CtClass |
CtClassType.getSuperclass() |
CtClass |
CtField.getType()
Returns the type of the field.
|
CtClass |
ClassPool.makeClass(java.io.InputStream classfile)
Creates a new class (or interface) from the given class file.
|
CtClass |
ClassPool.makeClass(java.io.InputStream classfile,
boolean ifNotFrozen)
Creates a new class (or interface) from the given class file.
|
CtClass |
ClassPool.makeClass(java.lang.String classname)
Creates a new public class.
|
CtClass |
ClassPool.makeClass(java.lang.String classname,
CtClass superclass)
Creates a new public class.
|
CtClass |
ClassPool.makeClassIfNew(java.io.InputStream classfile)
Creates a new class (or interface) from the given class file.
|
CtClass |
ClassPool.makeInterface(java.lang.String name)
Creates a new public interface.
|
CtClass |
ClassPool.makeInterface(java.lang.String name,
CtClass superclass)
Creates a new public interface.
|
(package private) CtClass |
ClassPool.makeNestedClass(java.lang.String classname)
Creates a new public nested class.
|
CtClass |
CtClass.makeNestedClass(java.lang.String name,
boolean isStatic)
Makes a new public nested class.
|
CtClass |
CtClassType.makeNestedClass(java.lang.String name,
boolean isStatic) |
protected CtClass |
ClassPool.removeCached(java.lang.String classname)
Provide a hook so that subclasses can do their own
caching of classes.
|
Modifier and Type | Method and Description |
---|---|
static CtMethod |
CtNewMethod.abstractMethod(CtClass returnType,
java.lang.String mname,
CtClass[] parameters,
CtClass[] exceptions,
CtClass declaring)
Creates a public abstract method.
|
static CtMethod |
CtNewMethod.abstractMethod(CtClass returnType,
java.lang.String mname,
CtClass[] parameters,
CtClass[] exceptions,
CtClass declaring)
Creates a public abstract method.
|
static CtMethod |
CtNewMethod.abstractMethod(CtClass returnType,
java.lang.String mname,
CtClass[] parameters,
CtClass[] exceptions,
CtClass declaring)
Creates a public abstract method.
|
void |
CtBehavior.addCatch(java.lang.String src,
CtClass exceptionType)
Adds a catch clause that handles an exception thrown in the
body.
|
void |
CtBehavior.addCatch(java.lang.String src,
CtClass exceptionType,
java.lang.String exceptionName)
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(java.lang.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,
java.lang.String desc) |
static CtField.Initializer |
CtField.Initializer.byCall(CtClass methodClass,
java.lang.String methodName)
Makes an initializer calling a static method.
|
static CtField.Initializer |
CtField.Initializer.byCall(CtClass methodClass,
java.lang.String methodName,
java.lang.String[] stringParams)
Makes an initializer calling a static method.
|
static CtField.Initializer |
CtField.Initializer.byCallWithParams(CtClass methodClass,
java.lang.String methodName)
Makes an initializer calling a static method.
|
static CtField.Initializer |
CtField.Initializer.byCallWithParams(CtClass methodClass,
java.lang.String methodName,
java.lang.String[] stringParams)
Makes an initializer calling a static method.
|
static CtField.Initializer |
CtField.Initializer.byNew(CtClass objectType)
Makes an initializer creating a new object.
|
static CtField.Initializer |
CtField.Initializer.byNew(CtClass objectType,
java.lang.String[] stringParams)
Makes an initializer creating a new object.
|
static CtField.Initializer |
CtField.Initializer.byNewArray(CtClass type,
int size)
Makes an initializer creating a new array.
|
static CtField.Initializer |
CtField.Initializer.byNewArray(CtClass type,
int[] sizes)
Makes an initializer creating a new multi-dimensional array.
|
static CtField.Initializer |
CtField.Initializer.byNewWithParams(CtClass objectType)
Makes an initializer creating a new object.
|
static CtField.Initializer |
CtField.Initializer.byNewWithParams(CtClass objectType,
java.lang.String[] stringParams)
Makes an initializer creating a new object.
|
protected void |
ClassPool.cacheCtClass(java.lang.String classname,
CtClass c,
boolean dynamic)
Provides a hook so that subclasses can do their own
caching of classes.
|
(package private) static long |
SerialVersionUID.calculateDefault(CtClass clazz)
Calculate default value.
|
(package private) void |
ClassPool.classNameChanged(java.lang.String oldname,
CtClass clazz) |
(package private) abstract int |
CtField.Initializer.compile(CtClass type,
java.lang.String name,
Bytecode code,
CtClass[] parameters,
Javac drv) |
(package private) abstract int |
CtField.Initializer.compile(CtClass type,
java.lang.String name,
Bytecode code,
CtClass[] parameters,
Javac drv) |
(package private) int |
CtField.CodeInitializer0.compile(CtClass type,
java.lang.String name,
Bytecode code,
CtClass[] parameters,
Javac drv) |
(package private) int |
CtField.CodeInitializer0.compile(CtClass type,
java.lang.String name,
Bytecode code,
CtClass[] parameters,
Javac drv) |
(package private) int |
CtField.ParamInitializer.compile(CtClass type,
java.lang.String name,
Bytecode code,
CtClass[] parameters,
Javac drv) |
(package private) int |
CtField.ParamInitializer.compile(CtClass type,
java.lang.String name,
Bytecode code,
CtClass[] parameters,
Javac drv) |
(package private) int |
CtField.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) int |
CtField.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) int |
CtField.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) int |
CtField.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) int |
CtField.IntInitializer.compile(CtClass type,
java.lang.String name,
Bytecode code,
CtClass[] parameters,
Javac drv) |
(package private) int |
CtField.IntInitializer.compile(CtClass type,
java.lang.String name,
Bytecode code,
CtClass[] parameters,
Javac drv) |
(package private) int |
CtField.LongInitializer.compile(CtClass type,
java.lang.String name,
Bytecode code,
CtClass[] parameters,
Javac drv) |
(package private) int |
CtField.LongInitializer.compile(CtClass type,
java.lang.String name,
Bytecode code,
CtClass[] parameters,
Javac drv) |
(package private) int |
CtField.FloatInitializer.compile(CtClass type,
java.lang.String name,
Bytecode code,
CtClass[] parameters,
Javac drv) |
(package private) int |
CtField.FloatInitializer.compile(CtClass type,
java.lang.String name,
Bytecode code,
CtClass[] parameters,
Javac drv) |
(package private) int |
CtField.DoubleInitializer.compile(CtClass type,
java.lang.String name,
Bytecode code,
CtClass[] parameters,
Javac drv) |
(package private) int |
CtField.DoubleInitializer.compile(CtClass type,
java.lang.String name,
Bytecode code,
CtClass[] parameters,
Javac drv) |
(package private) int |
CtField.StringInitializer.compile(CtClass type,
java.lang.String name,
Bytecode code,
CtClass[] parameters,
Javac drv) |
(package private) int |
CtField.StringInitializer.compile(CtClass type,
java.lang.String name,
Bytecode code,
CtClass[] parameters,
Javac drv) |
(package private) int |
CtField.ArrayInitializer.compile(CtClass type,
java.lang.String name,
Bytecode code,
CtClass[] parameters,
Javac drv) |
(package private) int |
CtField.ArrayInitializer.compile(CtClass type,
java.lang.String name,
Bytecode code,
CtClass[] parameters,
Javac drv) |
(package private) int |
CtField.MultiArrayInitializer.compile(CtClass type,
java.lang.String name,
Bytecode code,
CtClass[] parameters,
Javac drv) |
(package private) int |
CtField.MultiArrayInitializer.compile(CtClass type,
java.lang.String name,
Bytecode code,
CtClass[] parameters,
Javac drv) |
(package private) abstract int |
CtField.Initializer.compileIfStatic(CtClass type,
java.lang.String name,
Bytecode code,
Javac drv) |
(package private) int |
CtField.CodeInitializer0.compileIfStatic(CtClass type,
java.lang.String name,
Bytecode code,
Javac drv) |
(package private) int |
CtField.ParamInitializer.compileIfStatic(CtClass type,
java.lang.String name,
Bytecode code,
Javac drv) |
(package private) int |
CtField.NewInitializer.compileIfStatic(CtClass type,
java.lang.String name,
Bytecode code,
Javac drv)
Produces codes for a static field.
|
(package private) int |
CtField.MethodInitializer.compileIfStatic(CtClass type,
java.lang.String name,
Bytecode code,
Javac drv)
Produces codes for a static field.
|
(package private) int |
CtField.IntInitializer.compileIfStatic(CtClass type,
java.lang.String name,
Bytecode code,
Javac drv) |
(package private) int |
CtField.LongInitializer.compileIfStatic(CtClass type,
java.lang.String name,
Bytecode code,
Javac drv) |
(package private) int |
CtField.FloatInitializer.compileIfStatic(CtClass type,
java.lang.String name,
Bytecode code,
Javac drv) |
(package private) int |
CtField.DoubleInitializer.compileIfStatic(CtClass type,
java.lang.String name,
Bytecode code,
Javac drv) |
(package private) int |
CtField.StringInitializer.compileIfStatic(CtClass type,
java.lang.String name,
Bytecode code,
Javac drv) |
(package private) int |
CtField.ArrayInitializer.compileIfStatic(CtClass type,
java.lang.String name,
Bytecode code,
Javac drv) |
(package private) int |
CtField.MultiArrayInitializer.compileIfStatic(CtClass type,
java.lang.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 |
CtNewMethod.copy(CtMethod src,
CtClass declaring,
ClassMap map)
Creates a copy of a method.
|
static CtMethod |
CtNewMethod.copy(CtMethod src,
java.lang.String name,
CtClass declaring,
ClassMap map)
Creates a copy of a method with a new name.
|
static CtConstructor |
CtNewConstructor.defaultConstructor(CtClass declaring)
Creates a default (public) constructor.
|
static CtMethod |
CtNewMethod.delegator(CtMethod delegate,
CtClass declaring)
Creates a method forwarding to a delegate in
a super class.
|
private static CtMethod |
CtNewMethod.delegator0(CtMethod delegate,
CtClass declaring) |
protected void |
CodeConverter.doit(CtClass clazz,
MethodInfo minfo,
ConstPool cp)
Performs code conversion.
|
void |
ClassMap.fix(CtClass clazz)
Prevents a mapping from the specified class name to another name.
|
(package private) int |
CtField.Initializer.getConstantValue(ConstPool cp,
CtClass type) |
(package private) int |
CtField.CodeInitializer.getConstantValue(ConstPool cp,
CtClass type) |
(package private) int |
CtField.PtreeInitializer.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.FloatInitializer.getConstantValue(ConstPool cp,
CtClass type) |
(package private) int |
CtField.DoubleInitializer.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) |
CtConstructor |
CtClass.getDeclaredConstructor(CtClass[] params)
Returns a constructor receiving the specified parameters.
|
CtMethod |
CtClass.getDeclaredMethod(java.lang.String name,
CtClass[] params)
Retrieves the method with the specified name and parameter types
among the methods declared in the class.
|
CtMethod |
CtClassType.getDeclaredMethod(java.lang.String name,
CtClass[] params) |
private static void |
CtClassType.getFields(java.util.ArrayList alist,
CtClass cc) |
private static CtMethod |
CtClassType.getMethod0(CtClass cc,
java.lang.String name,
java.lang.String desc) |
private static void |
CtClassType.getMethods0(java.util.HashMap h,
CtClass cc) |
private int |
CtBehavior.insertAfterAdvice(Bytecode code,
Javac jv,
java.lang.String src,
ConstPool cp,
CtClass rtype,
int varNo) |
private int |
CtBehavior.insertAfterHandler(boolean asFinally,
Bytecode b,
CtClass rtype,
int returnVarNo,
Javac javac,
java.lang.String src) |
void |
CtBehavior.insertParameter(CtClass type)
Inserts a new parameter, which becomes the first parameter.
|
private boolean |
CtNewClass.isInheritable(int mod,
CtClass superclazz) |
private static boolean |
SerialVersionUID.isSerializable(CtClass clazz)
Does the class implement Serializable?
|
private static java.lang.String |
SerialVersionUID.javaName(CtClass clazz) |
static CtConstructor |
CtNewConstructor.make(CtClass[] parameters,
CtClass[] exceptions,
CtClass declaring)
Creates a public constructor that only calls a constructor
in the super class.
|
static CtConstructor |
CtNewConstructor.make(CtClass[] parameters,
CtClass[] exceptions,
CtClass declaring)
Creates a public constructor that only calls a constructor
in the super class.
|
static CtConstructor |
CtNewConstructor.make(CtClass[] parameters,
CtClass[] exceptions,
CtClass declaring)
Creates a public constructor that only calls a constructor
in the super class.
|
static CtConstructor |
CtNewConstructor.make(CtClass[] parameters,
CtClass[] exceptions,
int howto,
CtMethod body,
CtMethod.ConstParameter cparam,
CtClass declaring)
Creates a public constructor.
|
static CtConstructor |
CtNewConstructor.make(CtClass[] parameters,
CtClass[] exceptions,
int howto,
CtMethod body,
CtMethod.ConstParameter cparam,
CtClass declaring)
Creates a public constructor.
|
static CtConstructor |
CtNewConstructor.make(CtClass[] parameters,
CtClass[] exceptions,
int howto,
CtMethod body,
CtMethod.ConstParameter cparam,
CtClass declaring)
Creates a public constructor.
|
static CtConstructor |
CtNewConstructor.make(CtClass[] parameters,
CtClass[] exceptions,
java.lang.String body,
CtClass declaring)
Creates a public constructor.
|
static CtConstructor |
CtNewConstructor.make(CtClass[] parameters,
CtClass[] exceptions,
java.lang.String body,
CtClass declaring)
Creates a public constructor.
|
static CtConstructor |
CtNewConstructor.make(CtClass[] parameters,
CtClass[] exceptions,
java.lang.String body,
CtClass declaring)
Creates a public constructor.
|
static CtMethod |
CtNewMethod.make(CtClass returnType,
java.lang.String mname,
CtClass[] parameters,
CtClass[] exceptions,
java.lang.String body,
CtClass declaring)
Creates a public (non-static) method.
|
static CtMethod |
CtNewMethod.make(CtClass returnType,
java.lang.String mname,
CtClass[] parameters,
CtClass[] exceptions,
java.lang.String body,
CtClass declaring)
Creates a public (non-static) method.
|
static CtMethod |
CtNewMethod.make(CtClass returnType,
java.lang.String mname,
CtClass[] parameters,
CtClass[] exceptions,
java.lang.String body,
CtClass declaring)
Creates a public (non-static) method.
|
static CtMethod |
CtNewMethod.make(int modifiers,
CtClass returnType,
java.lang.String mname,
CtClass[] parameters,
CtClass[] exceptions,
java.lang.String body,
CtClass declaring)
Creates a method.
|
static CtMethod |
CtNewMethod.make(int modifiers,
CtClass returnType,
java.lang.String mname,
CtClass[] parameters,
CtClass[] exceptions,
java.lang.String body,
CtClass declaring)
Creates a method.
|
static CtMethod |
CtNewMethod.make(int modifiers,
CtClass returnType,
java.lang.String mname,
CtClass[] parameters,
CtClass[] exceptions,
java.lang.String body,
CtClass declaring)
Creates a method.
|
static CtMethod |
CtMethod.make(MethodInfo minfo,
CtClass declaring)
Creates a method from a
MethodInfo object. |
static CtField |
CtField.make(java.lang.String src,
CtClass declaring)
Compiles the given source code and creates a field.
|
static CtMethod |
CtMethod.make(java.lang.String src,
CtClass declaring)
Compiles the given source code and creates a method.
|
static CtConstructor |
CtNewConstructor.make(java.lang.String src,
CtClass declaring)
Compiles the given source code and creates a constructor.
|
static CtMethod |
CtNewMethod.make(java.lang.String src,
CtClass declaring)
Compiles the given source code and creates a method.
|
static CtMethod |
CtNewMethod.make(java.lang.String src,
CtClass declaring,
java.lang.String delegateObj,
java.lang.String delegateMethod)
Compiles the given source code and creates a method.
|
(package private) static Bytecode |
CtNewWrappedMethod.makeBody(CtClass clazz,
ClassFile classfile,
CtMethod wrappedBody,
CtClass[] parameters,
CtClass returnType,
CtMethod.ConstParameter cparam) |
(package private) static Bytecode |
CtNewWrappedMethod.makeBody(CtClass clazz,
ClassFile classfile,
CtMethod wrappedBody,
CtClass[] parameters,
CtClass returnType,
CtMethod.ConstParameter cparam) |
protected static Bytecode |
CtNewWrappedConstructor.makeBody(CtClass declaring,
ClassFile classfile,
int howToCallSuper,
CtMethod wrappedBody,
CtClass[] parameters,
CtMethod.ConstParameter cparam) |
protected static Bytecode |
CtNewWrappedConstructor.makeBody(CtClass declaring,
ClassFile classfile,
int howToCallSuper,
CtMethod wrappedBody,
CtClass[] parameters,
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) |
protected static int |
CtNewWrappedMethod.makeBody0(CtClass clazz,
ClassFile classfile,
CtMethod wrappedBody,
boolean isStatic,
CtClass[] parameters,
CtClass returnType,
CtMethod.ConstParameter cparam,
Bytecode code) |
CtClass |
ClassPool.makeClass(java.lang.String classname,
CtClass superclass)
Creates a new public class.
|
private int |
CtClassType.makeFieldInitializer(Bytecode code,
CtClass[] parameters) |
CtClass |
ClassPool.makeInterface(java.lang.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 |
ClassMap.put(CtClass oldname,
CtClass newname)
Maps a class name to another name in this hashtable.
|
void |
CodeConverter.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.
|
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,
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.
|
void |
CodeConverter.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.
|
void |
CodeConverter.replaceNew(CtClass oldClass,
CtClass newClass)
Modify a method body so that instantiation of the class
specified by
oldClass
is replaced with instantiation of another class newClass . |
void |
CodeConverter.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 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 |
CtField.setType(CtClass clazz)
Sets the type of the field.
|
static CtConstructor |
CtNewConstructor.skeleton(CtClass[] parameters,
CtClass[] exceptions,
CtClass declaring)
Creates a public constructor that only calls a constructor
in the super class.
|
static CtConstructor |
CtNewConstructor.skeleton(CtClass[] parameters,
CtClass[] exceptions,
CtClass declaring)
Creates a public constructor that only calls a constructor
in the super class.
|
static CtConstructor |
CtNewConstructor.skeleton(CtClass[] parameters,
CtClass[] exceptions,
CtClass declaring)
Creates a public constructor that only calls a constructor
in the super class.
|
boolean |
CtClass.subclassOf(CtClass superclass)
Determines whether the class directly or indirectly extends
the given class.
|
boolean |
CtClassType.subclassOf(CtClass superclass) |
boolean |
CtArray.subtypeOf(CtClass clazz) |
boolean |
CtClass.subtypeOf(CtClass clazz)
Returns
true if this class extends or implements
clazz . |
boolean |
CtClassType.subtypeOf(CtClass clazz) |
java.lang.Class |
ClassPool.toClass(CtClass clazz)
Converts the given class to a
java.lang.Class object. |
java.lang.Class |
ClassPool.toClass(CtClass ct,
java.lang.ClassLoader loader)
Deprecated.
Replaced by
ClassPool.toClass(CtClass,ClassLoader,ProtectionDomain) .
A subclass of ClassPool that has been
overriding this method should be modified. It should override
ClassPool.toClass(CtClass,ClassLoader,ProtectionDomain) . |
java.lang.Class |
ClassPool.toClass(CtClass ct,
java.lang.ClassLoader loader,
java.security.ProtectionDomain domain)
Converts the class to a
java.lang.Class object. |
CtMethod |
CtConstructor.toMethod(java.lang.String name,
CtClass declaring)
Makes a copy of this constructor and converts it into a method.
|
CtMethod |
CtConstructor.toMethod(java.lang.String name,
CtClass declaring,
ClassMap map)
Makes a copy of this constructor and converts it into a method.
|
private static void |
CtNewNestedClass.updateInnerEntry(int mod,
java.lang.String name,
CtClass clazz,
boolean outer) |
boolean |
CtMember.visibleFrom(CtClass clazz)
Returns true if this member is accessible from the given class.
|
static CtConstructor |
CtNewWrappedConstructor.wrapped(CtClass[] parameterTypes,
CtClass[] exceptionTypes,
int howToCallSuper,
CtMethod body,
CtMethod.ConstParameter constParam,
CtClass declaring) |
static CtConstructor |
CtNewWrappedConstructor.wrapped(CtClass[] parameterTypes,
CtClass[] exceptionTypes,
int howToCallSuper,
CtMethod body,
CtMethod.ConstParameter constParam,
CtClass declaring) |
static CtConstructor |
CtNewWrappedConstructor.wrapped(CtClass[] parameterTypes,
CtClass[] exceptionTypes,
int howToCallSuper,
CtMethod body,
CtMethod.ConstParameter constParam,
CtClass declaring) |
static CtMethod |
CtNewMethod.wrapped(CtClass returnType,
java.lang.String mname,
CtClass[] parameterTypes,
CtClass[] exceptionTypes,
CtMethod body,
CtMethod.ConstParameter constParam,
CtClass declaring)
Creates a wrapped method.
|
static CtMethod |
CtNewMethod.wrapped(CtClass returnType,
java.lang.String mname,
CtClass[] parameterTypes,
CtClass[] exceptionTypes,
CtMethod body,
CtMethod.ConstParameter constParam,
CtClass declaring)
Creates a wrapped method.
|
static CtMethod |
CtNewMethod.wrapped(CtClass returnType,
java.lang.String mname,
CtClass[] parameterTypes,
CtClass[] exceptionTypes,
CtMethod body,
CtMethod.ConstParameter constParam,
CtClass declaring)
Creates a wrapped method.
|
static CtMethod |
CtNewWrappedMethod.wrapped(CtClass returnType,
java.lang.String mname,
CtClass[] parameterTypes,
CtClass[] exceptionTypes,
CtMethod body,
CtMethod.ConstParameter constParam,
CtClass declaring) |
static CtMethod |
CtNewWrappedMethod.wrapped(CtClass returnType,
java.lang.String mname,
CtClass[] parameterTypes,
CtClass[] exceptionTypes,
CtMethod body,
CtMethod.ConstParameter constParam,
CtClass declaring) |
static CtMethod |
CtNewWrappedMethod.wrapped(CtClass returnType,
java.lang.String mname,
CtClass[] parameterTypes,
CtClass[] exceptionTypes,
CtMethod body,
CtMethod.ConstParameter constParam,
CtClass declaring) |
Constructor and Description |
---|
ArrayInitializer(CtClass t,
int s) |
CtBehavior(CtClass clazz,
MethodInfo minfo) |
CtConstructor(CtClass[] parameters,
CtClass declaring)
Creates a constructor with no constructor body.
|
CtConstructor(CtClass[] parameters,
CtClass declaring)
Creates a constructor with no constructor body.
|
CtConstructor(CtConstructor src,
CtClass declaring,
ClassMap map)
Creates a copy of a
CtConstructor object. |
CtConstructor(MethodInfo minfo,
CtClass declaring) |
CtField(CtClass type,
java.lang.String name,
CtClass declaring)
Creates a
CtField object. |
CtField(CtField src,
CtClass declaring)
Creates a copy of the given field.
|
CtField(FieldInfo fi,
CtClass clazz) |
CtField(java.lang.String typeDesc,
java.lang.String name,
CtClass clazz) |
CtMember(CtClass clazz) |
CtMethod(CtClass returnType,
java.lang.String mname,
CtClass[] parameters,
CtClass declaring)
Creates a public abstract method.
|
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 a
CtMethod object. |
CtMethod(MethodInfo minfo,
CtClass declaring) |
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) |
Modifier and Type | Field and Description |
---|---|
static CtClass |
Bytecode.THIS
Represents the
CtClass file using the
constant pool table given to this Bytecode object. |
static CtClass |
ConstPool.THIS
Represents the class using this constant pool table.
|
Modifier and Type | Method and Description |
---|---|
CtClass |
SignatureAttribute.BaseType.getCtlass()
Returns the
CtClass representing this
primitive type. |
static CtClass[] |
Descriptor.getParameterTypes(java.lang.String desc,
ClassPool cp)
Returns the
CtClass objects representing the parameter
types specified by the given descriptor. |
static CtClass |
Descriptor.getReturnType(java.lang.String desc,
ClassPool cp)
Returns the
CtClass object representing the return
type specified by the given descriptor. |
static CtClass |
Descriptor.toCtClass(java.lang.String desc,
ClassPool cp)
Returns a
CtClass object representing the type
specified by the given descriptor. |
(package private) static CtClass |
Descriptor.toPrimitiveClass(char c) |
Modifier and Type | Method and Description |
---|---|
void |
Bytecode.addAnewarray(CtClass clazz,
int length)
Appends ICONST and ANEWARRAY.
|
void |
Bytecode.addCheckcast(CtClass c)
Appends CHECKCAST.
|
int |
ConstPool.addClassInfo(CtClass c)
Adds a new
CONSTANT_Class_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 of
exception_table . |
void |
Bytecode.addGetfield(CtClass c,
java.lang.String name,
java.lang.String type)
Appends GETFIELD.
|
void |
Bytecode.addGetstatic(CtClass c,
java.lang.String name,
java.lang.String type)
Appends GETSTATIC.
|
void |
Bytecode.addInvokeinterface(CtClass clazz,
java.lang.String name,
CtClass returnType,
CtClass[] paramTypes,
int count)
Appends INVOKEINTERFACE.
|
void |
Bytecode.addInvokeinterface(CtClass clazz,
java.lang.String name,
CtClass returnType,
CtClass[] paramTypes,
int count)
Appends INVOKEINTERFACE.
|
void |
Bytecode.addInvokeinterface(CtClass clazz,
java.lang.String name,
java.lang.String desc,
int count)
Appends INVOKEINTERFACE.
|
void |
Bytecode.addInvokespecial(CtClass clazz,
java.lang.String name,
CtClass returnType,
CtClass[] paramTypes)
Appends INVOKESPECIAL.
|
void |
Bytecode.addInvokespecial(CtClass clazz,
java.lang.String name,
CtClass returnType,
CtClass[] paramTypes)
Appends INVOKESPECIAL.
|
void |
Bytecode.addInvokespecial(CtClass clazz,
java.lang.String name,
java.lang.String desc)
Appends INVOKESPECIAL.
|
void |
Bytecode.addInvokestatic(CtClass clazz,
java.lang.String name,
CtClass returnType,
CtClass[] paramTypes)
Appends INVOKESTATIC.
|
void |
Bytecode.addInvokestatic(CtClass clazz,
java.lang.String name,
CtClass returnType,
CtClass[] paramTypes)
Appends INVOKESTATIC.
|
void |
Bytecode.addInvokestatic(CtClass clazz,
java.lang.String name,
java.lang.String desc)
Appends INVOKESTATIC.
|
void |
Bytecode.addInvokevirtual(CtClass clazz,
java.lang.String name,
CtClass returnType,
CtClass[] paramTypes)
Appends INVOKEVIRTUAL.
|
void |
Bytecode.addInvokevirtual(CtClass clazz,
java.lang.String name,
CtClass returnType,
CtClass[] paramTypes)
Appends INVOKEVIRTUAL.
|
void |
Bytecode.addInvokevirtual(CtClass clazz,
java.lang.String name,
java.lang.String desc)
Appends INVOKEVIRTUAL.
|
int |
Bytecode.addLoad(int n,
CtClass type)
Appends an instruction for loading a value from the
local variable at the index
n . |
int |
Bytecode.addLoadParameters(CtClass[] params,
int offset)
Appends instructions for loading all the parameters onto the
operand stack.
|
int |
Bytecode.addMultiNewarray(CtClass clazz,
int dim)
Appends MULTINEWARRAY.
|
int |
Bytecode.addMultiNewarray(CtClass clazz,
int[] dimensions)
Appends MULTINEWARRAY.
|
void |
Bytecode.addNew(CtClass clazz)
Appends NEW.
|
void |
Bytecode.addPutfield(CtClass c,
java.lang.String name,
java.lang.String desc)
Appends PUTFIELD.
|
private void |
Bytecode.addPutfield0(CtClass target,
java.lang.String classname,
java.lang.String name,
java.lang.String desc) |
void |
Bytecode.addPutstatic(CtClass c,
java.lang.String name,
java.lang.String desc)
Appends PUTSTATIC.
|
private void |
Bytecode.addPutstatic0(CtClass target,
java.lang.String classname,
java.lang.String fieldName,
java.lang.String desc) |
void |
Bytecode.addReturn(CtClass type)
Appends ARETURN, IRETURN, .., or RETURN.
|
int |
Bytecode.addStore(int n,
CtClass type)
Appends an instruction for storing a value into the
local variable at the index
n . |
static java.lang.String |
Descriptor.appendParameter(CtClass type,
java.lang.String descriptor)
Appends a parameter type to the parameter list represented
by the given descriptor.
|
static java.lang.String |
Descriptor.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.String |
Descriptor.of(CtClass type)
Returns the descriptor representing the given type.
|
static java.lang.String |
Descriptor.ofConstructor(CtClass[] paramTypes)
Returns the descriptor representing a constructor receiving
the given parameter types.
|
static java.lang.String |
Descriptor.ofMethod(CtClass returnType,
CtClass[] paramTypes)
Returns the descriptor representing a method that receives
the given parameter types and returns the given type.
|
static java.lang.String |
Descriptor.ofMethod(CtClass returnType,
CtClass[] paramTypes)
Returns the descriptor representing a method that receives
the given parameter types and returns the given type.
|
static java.lang.String |
Descriptor.ofParameters(CtClass[] paramTypes)
Returns the descriptor representing a list of parameter types.
|
void |
Bytecode.setMaxLocals(boolean isStatic,
CtClass[] params,
int locals)
Sets
max_locals . |
private static int |
Descriptor.toCtClass(ClassPool cp,
java.lang.String desc,
int i,
CtClass[] args,
int n) |
private static void |
Descriptor.toDescriptor(java.lang.StringBuffer desc,
CtClass type) |
static java.lang.String |
Descriptor.toJvmName(CtClass clazz)
Returns the internal representation of the class name in the
JVM.
|
Modifier and Type | Field and Description |
---|---|
private CtClass |
Analyzer.clazz |
private CtClass |
ControlFlow.clazz |
private CtClass |
Type.clazz |
Modifier and Type | Method and Description |
---|---|
private static CtClass |
Type.findCommonSuperClass(CtClass one,
CtClass two) |
CtClass |
MultiArrayType.getCtClass() |
CtClass |
MultiType.getCtClass()
Gets the class that corresponds with this type.
|
CtClass |
Type.getCtClass()
Returns the class this type represents.
|
Modifier and Type | Method and Description |
---|---|
Frame[] |
Analyzer.analyze(CtClass clazz,
MethodInfo method)
Performs data-flow analysis on a method and returns an array, indexed by
instruction position, containing the starting frame state of all reachable
instructions.
|
(package private) static boolean |
Type.eq(CtClass one,
CtClass two) |
private static CtClass |
Type.findCommonSuperClass(CtClass one,
CtClass two) |
private java.util.Map |
Type.findExclusiveDeclaredInterfaces(Type type,
CtClass exclude) |
static Type |
Type.get(CtClass clazz)
Obtain the Type for a given class.
|
(package private) java.util.Map |
Type.getAllInterfaces(CtClass clazz,
java.util.Map map) |
(package private) java.util.Map |
Type.getDeclaredInterfaces(CtClass clazz,
java.util.Map map) |
void |
FramePrinter.print(CtClass clazz)
Prints all the methods declared in the given class.
|
static void |
FramePrinter.print(CtClass clazz,
java.io.PrintStream stream)
Prints all the methods declared in the given class.
|
Constructor and Description |
---|
ControlFlow(CtClass ctclazz,
MethodInfo minfo)
Constructs a control-flow analyzer.
|
Type(CtClass clazz) |
Type(CtClass clazz,
boolean special) |
Modifier and Type | Method and Description |
---|---|
static MemberValue |
Annotation.createMemberValue(ConstPool cp,
CtClass type)
Makes an instance of
MemberValue . |
Constructor and Description |
---|
Annotation(ConstPool cp,
CtClass clazz)
Constructs an annotation that can be accessed through the interface
represented by
clazz . |
Modifier and Type | Method and Description |
---|---|
static CtClass |
TypeData.commonSuperClass(CtClass one,
CtClass two)
Finds the most specific common super class of the given classes.
|
static CtClass |
TypeData.commonSuperClassEx(CtClass one,
CtClass two)
Finds the most specific common super class of the given classes
by considering array types.
|
private CtClass |
TypeData.TypeVar.fixByUppers(java.util.ArrayList users,
ClassPool cp,
java.util.HashSet visited,
CtClass type) |
Modifier and Type | Method and Description |
---|---|
static CtClass |
TypeData.commonSuperClass(CtClass one,
CtClass two)
Finds the most specific common super class of the given classes.
|
static CtClass |
TypeData.commonSuperClassEx(CtClass one,
CtClass two)
Finds the most specific common super class of the given classes
by considering array types.
|
(package private) static boolean |
TypeData.eq(CtClass one,
CtClass two) |
private CtClass |
TypeData.TypeVar.fixByUppers(java.util.ArrayList users,
ClassPool cp,
java.util.HashSet visited,
CtClass type) |
private static boolean |
TypeData.TypeVar.isObjectArray(CtClass cc) |
Modifier and Type | Field and Description |
---|---|
private CtClass |
AccessorMaker.clazz |
CtClass |
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 |
Modifier and Type | Method and Description |
---|---|
static CtClass |
MemberResolver.getSuperclass(CtClass c) |
CtClass |
MemberCodeGen.getThisClass() |
CtClass |
MemberResolver.lookupClass(Declarator decl) |
CtClass |
MemberResolver.lookupClass(int type,
int dim,
java.lang.String classname) |
CtClass |
MemberResolver.lookupClass(java.lang.String name,
boolean notCheckInner) |
private CtClass |
MemberResolver.lookupClass0(java.lang.String classname,
boolean notCheckInner) |
CtClass |
MemberResolver.lookupClassByJvmName(java.lang.String jvmName) |
CtClass |
MemberResolver.lookupClassByName(ASTList name) |
CtClass[] |
MemberCodeGen.makeParamList(MethodDecl md) |
CtClass[] |
MemberCodeGen.makeThrowsList(MethodDecl md) |
private CtClass |
MemberResolver.searchImports(java.lang.String orgName) |
Modifier and Type | Method and Description |
---|---|
protected void |
JvstCodeGen.atAssignParamList(CtClass[] params,
Bytecode code) |
MemberResolver.Method |
TypeChecker.atMethodCallCore(CtClass targetClass,
java.lang.String mname,
ASTList args) |
void |
MemberCodeGen.atMethodCallCore(CtClass targetClass,
java.lang.String mname,
ASTList args,
boolean isStatic,
boolean isSpecial,
int aload0pos,
MemberResolver.Method found) |
private void |
MemberCodeGen.atMethodCallCore2(CtClass targetClass,
java.lang.String mname,
boolean isStatic,
boolean isSpecial,
int aload0pos,
int count,
MemberResolver.Method found) |
static int |
JvstCodeGen.compileParameterList(Bytecode code,
CtClass[] params,
int regno) |
protected void |
JvstTypeChecker.compileUnwrapValue(CtClass type) |
protected void |
JvstCodeGen.compileUnwrapValue(CtClass type,
Bytecode code) |
void |
JvstCodeGen.doNumCast(CtClass type) |
protected java.lang.String |
MemberCodeGen.getAccessibleConstructor(java.lang.String desc,
CtClass declClass,
MethodInfo minfo) |
protected java.lang.String |
MemberCodeGen.getAccessiblePrivate(java.lang.String methodName,
java.lang.String desc,
java.lang.String newDesc,
MethodInfo minfo,
CtClass declClass) |
java.lang.String |
AccessorMaker.getConstructor(CtClass c,
java.lang.String desc,
MethodInfo orig) |
static CtClass |
MemberResolver.getSuperclass(CtClass c) |
private boolean |
MemberCodeGen.isEnclosing(CtClass outer,
CtClass inner) |
MemberResolver.Method |
MemberResolver.lookupMethod(CtClass clazz,
CtClass currentClass,
MethodInfo current,
java.lang.String methodName,
int[] argTypes,
int[] argDims,
java.lang.String[] argClassNames) |
private MemberResolver.Method |
MemberResolver.lookupMethod(CtClass clazz,
java.lang.String methodName,
int[] argTypes,
int[] argDims,
java.lang.String[] argClassNames,
boolean onlyExact) |
private static void |
Javac.makeDefaultBody(Bytecode b,
CtClass type) |
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,
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.
|
int |
JvstCodeGen.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.
|
int |
Javac.recordParams(java.lang.String target,
CtClass[] params,
boolean use0,
int varNo,
boolean isStatic)
Makes variables $0, $1, $2, ..., and $args represent method
parameters.
|
int |
Javac.recordReturnType(CtClass type,
boolean useResultVar)
Prepares to use cast $r, $w, $_, and $type.
|
int |
JvstCodeGen.recordReturnType(CtClass type,
java.lang.String castName,
java.lang.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,
java.lang.String varName,
int varNo,
SymbolTable tbl) |
int |
Javac.recordVariable(CtClass type,
java.lang.String name)
Makes the given variable available.
|
int |
JvstCodeGen.recordVariable(CtClass type,
java.lang.String varName,
SymbolTable tbl)
Makes the given variable name available.
|
void |
JvstCodeGen.setType(CtClass type) |
void |
JvstTypeChecker.setType(CtClass type) |
private void |
JvstCodeGen.setType(CtClass type,
int dim) |
private void |
JvstTypeChecker.setType(CtClass type,
int dim) |
Constructor and 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) |
Modifier and Type | Field and Description |
---|---|
private CtClass |
TransformFieldAccess.fieldClass |
protected CtClass |
TransformReadField.fieldClass |
protected CtClass[] |
TransformBefore.parameterTypes |
Modifier and Type | Method and Description |
---|---|
private 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 java.lang.String |
TransformReadField.isField(ClassPool pool,
ConstPool cp,
CtClass fclass,
java.lang.String fname,
boolean is_private,
int index) |
(package private) static boolean |
TransformReadField.isFieldInSuper(CtClass clazz,
CtClass fclass,
java.lang.String fname) |
protected void |
TransformBefore.makeCode(CtClass[] paramTypes,
ConstPool cp) |
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.
|
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) |
abstract int |
Transformer.transform(CtClass clazz,
int pos,
CodeIterator it,
ConstPool cp) |
Modifier and Type | Field and Description |
---|---|
(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 |
Modifier and Type | Method and Description |
---|---|
CtClass |
NewArray.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.
|
CtClass |
Expr.getEnclosingClass()
Returns the class that declares the method enclosing
this expression.
|
(package private) CtClass |
NewArray.getPrimitiveType(int atype) |
CtClass |
Cast.getType()
Returns the
CtClass object representing
the type specified by the cast. |
CtClass |
Handler.getType()
Returns the type handled by the catch clause.
|
CtClass |
Instanceof.getType()
Returns the
CtClass 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.
|
Modifier and Type | Method and Description |
---|---|
private static void |
Expr.addClass(java.util.LinkedList list,
CtClass c) |
(package private) static boolean |
Expr.checkResultValue(CtClass retType,
java.lang.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) boolean |
ExprEditor.loopBody(CodeIterator iterator,
CtClass clazz,
MethodInfo minfo,
ExprEditor.LoopContext context) |
(package private) static 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) |
Constructor and Description |
---|
Cast(int pos,
CodeIterator i,
CtClass declaring,
MethodInfo m)
Undocumented constructor.
|
ConstructorCall(int pos,
CodeIterator i,
CtClass decl,
MethodInfo m)
Undocumented constructor.
|
Expr(int pos,
CodeIterator i,
CtClass declaring,
MethodInfo m)
Undocumented constructor.
|
FieldAccess(int pos,
CodeIterator i,
CtClass declaring,
MethodInfo m,
int op) |
Handler(ExceptionTable et,
int nth,
CodeIterator it,
CtClass declaring,
MethodInfo m)
Undocumented constructor.
|
Instanceof(int pos,
CodeIterator i,
CtClass declaring,
MethodInfo m)
Undocumented constructor.
|
MethodCall(int pos,
CodeIterator i,
CtClass declaring,
MethodInfo m)
Undocumented constructor.
|
NewArray(int pos,
CodeIterator i,
CtClass declaring,
MethodInfo m,
int op) |
NewExpr(int pos,
CodeIterator i,
CtClass declaring,
MethodInfo m,
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) |
Modifier and Type | Method and Description |
---|---|
protected CtClass |
ScopedClassPool.getCached(java.lang.String classname)
Get the cached class
|
protected CtClass |
ScopedClassPool.getCachedLocally(java.lang.String classname)
Whether the class is cached in this pooled
|
CtClass |
ScopedClassPool.getLocally(java.lang.String classname)
Get any local copy of the class
|
Modifier and Type | Method and Description |
---|---|
protected void |
ScopedClassPool.cacheCtClass(java.lang.String classname,
CtClass c,
boolean dynamic)
Cache a class
|
void |
ScopedClassPool.lockInCache(CtClass c)
Lock a class into the cache
|
void |
ScopedClassPool.soften(CtClass clazz)
Soften a class
|
java.lang.Class |
ScopedClassPool.toClass(CtClass ct,
java.lang.ClassLoader loader,
java.security.ProtectionDomain domain)
Convert a javassist class to a java class
|
Modifier and Type | Field and Description |
---|---|
protected CtClass[] |
Reflection.readParam |
Modifier and Type | Method and Description |
---|---|
boolean |
Reflection.makeReflective(CtClass clazz,
CtClass metaobject,
CtClass metaclass)
Produces a reflective class.
|
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.
|
Modifier and Type | Field and Description |
---|---|
private CtClass[] |
StubGenerator.exceptionForProxy |
private CtClass[] |
StubGenerator.interfacesForProxy |
private CtClass[] |
StubGenerator.proxyConstructorParamTypes |
Modifier and Type | Method and Description |
---|---|
private CtClass |
StubGenerator.produceProxyClass(CtClass orgclass,
java.lang.Class orgRtClass) |
private CtClass |
StubGenerator.toCtClass(java.lang.Class rtclass) |
private CtClass[] |
StubGenerator.toCtClass(java.lang.Class[] rtclasses) |
Modifier and Type | Method and Description |
---|---|
private void |
StubGenerator.addMethods(CtClass proxy,
java.lang.reflect.Method[] ms) |
private void |
StubGenerator.modifySuperclass(CtClass orgclass)
Adds a default constructor to the super classes.
|
private CtClass |
StubGenerator.produceProxyClass(CtClass orgclass,
java.lang.Class orgRtClass) |