Package | Description |
---|---|
javassist |
The Javassist Core API.
|
javassist.bytecode |
Bytecode-level API.
|
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.
|
javassist.tools.web |
Simple web server for running sample code.
|
javassist.util.proxy |
Dynamic proxy (similar to
Enhancer of cglib). |
Modifier and Type | Method and Description |
---|---|
private static java.lang.String |
CtNewWrappedMethod.addBodyMethod(CtClassType clazz,
ClassFile classfile,
CtMethod src) |
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.addConstructor(CtConstructor c)
Adds a constructor.
|
void |
CtClassType.addConstructor(CtConstructor c) |
void |
CtNewClass.addConstructor(CtConstructor c) |
void |
CtClass.addField(CtField f)
Adds a field.
|
void |
CtClass.addField(CtField f,
CtField.Initializer init)
Adds a field with an initial value.
|
void |
CtClassType.addField(CtField f,
CtField.Initializer init) |
void |
CtClass.addField(CtField f,
java.lang.String init)
Adds a field with an initial value.
|
void |
CtClassType.addField(CtField f,
java.lang.String init) |
void |
CtBehavior.addLocalVariable(java.lang.String name,
CtClass type)
Declares a new local variable.
|
void |
CtClass.addMethod(CtMethod m)
Adds a method.
|
void |
CtClassType.addMethod(CtMethod m) |
void |
CtBehavior.addParameter(CtClass type)
Appends a new parameter, which becomes the last parameter.
|
void |
Loader.addTranslator(ClassPool cp,
Translator t)
Adds a translator, which is called whenever a class is loaded.
|
(package private) static long |
SerialVersionUID.calculateDefault(CtClass clazz)
Calculate default value.
|
boolean |
CtConstructor.callsSuper()
Returns true if this constructor calls a constructor
of the super class.
|
(package private) void |
CtField.Initializer.check(java.lang.String desc) |
(package private) void |
CtField.IntInitializer.check(java.lang.String desc) |
(package private) void |
CtField.LongInitializer.check(java.lang.String desc) |
(package private) void |
CtField.FloatInitializer.check(java.lang.String desc) |
(package private) void |
CtField.DoubleInitializer.check(java.lang.String desc) |
(package private) void |
CtField.MultiArrayInitializer.check(java.lang.String desc) |
private static void |
CtNewWrappedMethod.checkSignature(CtMethod wrappedBody,
java.lang.String descriptor) |
(package private) int |
CtMethod.ConstParameter.compile(Bytecode code) |
(package private) int |
CtMethod.IntConstParameter.compile(Bytecode code) |
(package private) int |
CtMethod.LongConstParameter.compile(Bytecode code) |
(package private) int |
CtMethod.StringConstParameter.compile(Bytecode code) |
(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.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.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.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.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.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) 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) |
protected int |
CtField.NewInitializer.compileStringParameter(Bytecode code) |
(package private) void |
CtBehavior.copy(CtBehavior src,
boolean isCons,
ClassMap map) |
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.
|
(package private) int |
CtConstructor.getStartPosOfBody(CodeAttribute ca) |
(package private) int |
CtBehavior.getStartPosOfBody(CodeAttribute ca) |
static CtMethod |
CtNewMethod.getter(java.lang.String methodName,
CtField field)
Creates a public getter method.
|
void |
CtNewClass.inheritAllConstructors()
Adds constructors inhrited from the super class.
|
void |
CtBehavior.insertAfter(java.lang.String src)
Inserts bytecode at the end of the body.
|
void |
CtBehavior.insertAfter(java.lang.String src,
boolean asFinally)
Inserts bytecode at the end of the body.
|
void |
CodeConverter.insertAfterMethod(CtMethod origMethod,
CtMethod afterMethod)
Inserts a call to another method after an existing method call.
|
int |
CtBehavior.insertAt(int lineNum,
boolean modify,
java.lang.String src)
Inserts bytecode at the specified line in the body.
|
int |
CtBehavior.insertAt(int lineNum,
java.lang.String src)
Inserts bytecode at the specified line in the body.
|
void |
CtBehavior.insertBefore(java.lang.String src)
Inserts bytecode at the beginning of the body.
|
private void |
CtBehavior.insertBefore(java.lang.String src,
boolean rebuild) |
void |
CtConstructor.insertBeforeBody(java.lang.String src)
Inserts bytecode just after another constructor in the super class
or this class is called.
|
void |
CodeConverter.insertBeforeMethod(CtMethod origMethod,
CtMethod beforeMethod)
Insert a call to another method before an existing method call.
|
void |
CtBehavior.insertParameter(CtClass type)
Inserts a new parameter, which becomes the first parameter.
|
void |
CtClass.instrument(CodeConverter converter)
Applies the given converter to all methods and constructors
declared in the class.
|
void |
CtBehavior.instrument(CodeConverter converter)
Modifies the method/constructor body.
|
void |
CtClassType.instrument(CodeConverter converter) |
void |
CtClass.instrument(ExprEditor editor)
Modifies the bodies of all methods and constructors
declared in the class.
|
void |
CtBehavior.instrument(ExprEditor editor)
Modifies the method/constructor body.
|
void |
CtClassType.instrument(ExprEditor editor) |
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,
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(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 CtMethod |
CtMethod.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)
Compiles the given source code and creates a method.
|
static CtField |
CtField.make(java.lang.String src,
CtClass declaring)
Compiles the given source code and creates a field.
|
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,
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) |
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) |
CtConstructor |
CtClass.makeClassInitializer()
Makes an empty class initializer (static constructor).
|
CtConstructor |
CtClassType.makeClassInitializer() |
private int |
CtClassType.makeFieldInitializer(Bytecode code,
CtClass[] parameters) |
void |
ClassPool.makePackage(java.lang.ClassLoader loader,
java.lang.String name)
Defines a new package.
|
private void |
CtClassType.modifyClassConstructor(ClassFile cf) |
private void |
CtClassType.modifyClassConstructor(ClassFile cf,
Bytecode code,
int stacksize,
int localsize) |
private void |
CtClassType.modifyConstructors(ClassFile cf) |
void |
Translator.onLoad(ClassPool pool,
java.lang.String classname)
Is invoked by a
Loader for notifying that
a class is loaded. |
void |
CodeConverter.redirectMethodCall(CtMethod origMethod,
CtMethod substMethod)
Modify method invocations in a method body so that a different
method will be invoked.
|
void |
CodeConverter.redirectMethodCall(java.lang.String oldMethodName,
CtMethod newMethod)
Correct invocations to a method that has been renamed.
|
private static void |
CtConstructor.removeConsCall(CodeAttribute ca) |
void |
CtConstructor.setBody(CtConstructor src,
ClassMap map)
Copies a constructor body from another constructor.
|
void |
CtMethod.setBody(CtMethod src,
ClassMap map)
Copies a method body from another method.
|
void |
CtConstructor.setBody(java.lang.String src)
Sets a constructor body.
|
void |
CtBehavior.setBody(java.lang.String src)
Sets a method/constructor body.
|
void |
CtBehavior.setBody(java.lang.String src,
java.lang.String delegateObj,
java.lang.String delegateMethod)
Sets a method/constructor body.
|
(package private) static void |
CtBehavior.setBody0(CtClass srcClass,
MethodInfo srcInfo,
CtClass destClass,
MethodInfo destInfo,
ClassMap map) |
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) |
static CtMethod |
CtNewMethod.setter(java.lang.String methodName,
CtField field)
Creates a public setter method.
|
void |
CtMethod.setWrappedBody(CtMethod mbody,
CtMethod.ConstParameter constParam)
Replace a method body with a new method body wrapping the
given method.
|
static CtConstructor |
CtNewConstructor.skeleton(CtClass[] parameters,
CtClass[] exceptions,
CtClass declaring)
Creates a public constructor that only calls a constructor
in the super class.
|
void |
Translator.start(ClassPool pool)
Is invoked by a
Loader for initialization
when the object is attached to the Loader object. |
byte[] |
CtClass.toBytecode()
Converts this class to a class file.
|
void |
CtClass.toBytecode(java.io.DataOutputStream out)
Converts this class to a class file.
|
void |
CtClassType.toBytecode(java.io.DataOutputStream out) |
void |
CtNewClass.toBytecode(java.io.DataOutputStream out) |
java.lang.Class |
CtClass.toClass()
Converts this class to a
java.lang.Class object. |
java.lang.Class |
CtClass.toClass(java.lang.ClassLoader loader)
Deprecated.
Replaced by
CtClass.toClass(ClassLoader,ProtectionDomain) |
java.lang.Class |
CtClass.toClass(java.lang.ClassLoader loader,
java.security.ProtectionDomain domain)
Converts this class to a
java.lang.Class object. |
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.
|
void |
CtBehavior.useCflow(java.lang.String name)
Declares to use
$cflow for this method/constructor. |
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 |
CtNewWrappedMethod.wrapped(CtClass returnType,
java.lang.String mname,
CtClass[] parameterTypes,
CtClass[] exceptionTypes,
CtMethod body,
CtMethod.ConstParameter constParam,
CtClass declaring) |
(package private) void |
ClassPool.writeClassfile(java.lang.String classname,
java.io.OutputStream out) |
(package private) void |
ClassPoolTail.writeClassfile(java.lang.String classname,
java.io.OutputStream out)
This method does not close the output stream.
|
void |
CtClass.writeFile()
Writes a class file represented by this
CtClass
object in the current directory. |
void |
CtClass.writeFile(java.lang.String directoryName)
Writes a class file represented by this
CtClass
object on a local disk. |
Constructor and Description |
---|
CtConstructor(CtConstructor src,
CtClass declaring,
ClassMap map)
Creates a copy of a
CtConstructor object. |
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(java.lang.String typeDesc,
java.lang.String name,
CtClass clazz) |
CtMethod(CtMethod src,
CtClass declaring,
ClassMap map)
Creates a copy of a
CtMethod object. |
Modifier and Type | Class and Description |
---|---|
class |
DuplicateMemberException
An exception thrown when adding a duplicate member is requested.
|
Modifier and Type | Method and Description |
---|---|
void |
StackMap.removeNew(int where)
Undocumented method.
|
void |
StackMapTable.removeNew(int where)
Undocumented method.
|
void |
ClassFile.setSuperclass(java.lang.String superclass)
Sets the super class.
|
Modifier and Type | Method and Description |
---|---|
private CtField |
Javac.compileField(FieldDecl fd) |
Constructor and Description |
---|
CompileError(CannotCompileException e) |
Constructor and Description |
---|
CtFieldWithInit(CtClass type,
java.lang.String name,
CtClass declaring) |
Modifier and Type | Method and Description |
---|---|
void |
Transformer.initialize(ConstPool cp,
CtClass clazz,
MethodInfo minfo) |
void |
TransformAccessArrayField.initialize(ConstPool cp,
CtClass clazz,
MethodInfo minfo) |
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
...
|
abstract int |
Transformer.transform(CtClass clazz,
int pos,
CodeIterator it,
ConstPool cp) |
Modifier and Type | Method and Description |
---|---|
private int |
NewExpr.canReplace() |
(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.
|
void |
ExprEditor.edit(Cast c)
Edits an expression for explicit type casting (overridable).
|
void |
ExprEditor.edit(ConstructorCall c)
Edits a constructor call (overridable).
|
void |
ExprEditor.edit(FieldAccess f)
Edits a field-access expression (overridable).
|
void |
ExprEditor.edit(Handler h)
Edits a catch clause (overridable).
|
void |
ExprEditor.edit(Instanceof i)
Edits an instanceof expression (overridable).
|
void |
ExprEditor.edit(MethodCall m)
Edits a method call (overridable).
|
void |
ExprEditor.edit(NewArray a)
Edits an expression for array creation (overridable).
|
void |
ExprEditor.edit(NewExpr e)
Edits a new expression (overridable).
|
void |
Handler.insertBefore(java.lang.String src)
Inserts bytecode at the beginning of the catch clause.
|
(package private) boolean |
ExprEditor.loopBody(CodeIterator iterator,
CtClass clazz,
MethodInfo minfo,
ExprEditor.LoopContext context) |
abstract void |
Expr.replace(java.lang.String statement)
Replaces this expression with the bytecode derived from
the given source text.
|
void |
NewArray.replace(java.lang.String statement)
Replaces the array creation with the bytecode derived from
the given source text.
|
void |
NewExpr.replace(java.lang.String statement)
Replaces the new expression with the bytecode derived from
the given source text.
|
void |
Cast.replace(java.lang.String statement)
Replaces the explicit cast operator with the bytecode derived from
the given source text.
|
void |
Instanceof.replace(java.lang.String statement)
Replaces the instanceof operator with the bytecode derived from
the given source text.
|
void |
Handler.replace(java.lang.String statement)
This method has not been implemented yet.
|
void |
MethodCall.replace(java.lang.String statement)
Replaces the method call with the bytecode derived from
the given source text.
|
void |
FieldAccess.replace(java.lang.String statement)
Replaces the method call with the bytecode derived from
the given source text.
|
void |
Expr.replace(java.lang.String statement,
ExprEditor recursive)
Replaces this expression with the bytecode derived from
the given source text and
ExprEditor . |
private void |
NewArray.replace2(java.lang.String statement) |
protected void |
Expr.runEditor(ExprEditor ed,
CodeIterator oldIterator) |
Modifier and Type | Method and Description |
---|---|
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 | Class and Description |
---|---|
class |
CannotReflectException
Thrown by
makeReflective() in Reflection
when there is an attempt to reflect
a class that is either an interface or a subclass of
either ClassMetaobject or Metaobject. |
Modifier and Type | Method and Description |
---|---|
boolean |
Reflection.makeReflective(java.lang.Class clazz,
java.lang.Class metaobject,
java.lang.Class metaclass)
Produces a reflective class.
|
boolean |
Reflection.makeReflective(CtClass clazz,
CtClass metaobject,
CtClass metaclass)
Produces a reflective class.
|
boolean |
Reflection.makeReflective(java.lang.String classname,
java.lang.String metaobject,
java.lang.String metaclass)
Produces a reflective class.
|
boolean |
Loader.makeReflective(java.lang.String clazz,
java.lang.String metaobject,
java.lang.String metaclass)
Produces a reflective class.
|
private boolean |
Reflection.modifyClassfile(CtClass clazz,
CtClass metaobject,
CtClass metaclass) |
void |
Reflection.onLoad(ClassPool pool,
java.lang.String classname)
Inserts hooks for intercepting accesses to the fields declared
in reflective classes.
|
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) |
Constructor and Description |
---|
Loader()
Constructs a new class loader.
|
Modifier and Type | Method and Description |
---|---|
private void |
StubGenerator.addMethods(CtClass proxy,
java.lang.reflect.Method[] ms) |
private java.lang.Object |
AppletServer.convertRvalue(java.lang.Object rvalue) |
int |
AppletServer.exportObject(java.lang.String name,
java.lang.Object obj)
Exports an object.
|
boolean |
StubGenerator.makeProxyClass(java.lang.Class clazz)
Makes a proxy class.
|
private void |
StubGenerator.modifySuperclass(CtClass orgclass)
Adds a default constructor to the super classes.
|
private CtClass |
StubGenerator.produceProxyClass(CtClass orgclass,
java.lang.Class orgRtClass) |
Constructor and Description |
---|
AppletServer(ClassPool loader,
StubGenerator gen,
int port) |
AppletServer(int port)
Constructs a web server.
|
AppletServer(int port,
ClassPool src)
Constructs a web server.
|
AppletServer(java.lang.String port)
Constructs a web server.
|
Modifier and Type | Method and Description |
---|---|
void |
Webserver.addTranslator(ClassPool cp,
Translator t)
Adds a translator, which is called whenever a client requests
a class file.
|
Modifier and Type | Method and Description |
---|---|
private static void |
ProxyFactory.addClassInitializer(ClassFile cf,
ConstPool cp,
java.lang.String classname,
int size,
java.util.ArrayList forwarders) |
private static void |
ProxyFactory.addGetter(java.lang.String classname,
ClassFile cf,
ConstPool cp) |
private static void |
ProxyFactory.addSetter(java.lang.String classname,
ClassFile cf,
ConstPool cp) |
private ClassFile |
ProxyFactory.make() |
private void |
ProxyFactory.makeConstructors(java.lang.String thisClassName,
ClassFile cf,
ConstPool cp,
java.lang.String classname) |
private void |
ProxyFactory.override(java.lang.String thisClassname,
java.lang.reflect.Method meth,
java.lang.String prefix,
int index,
java.lang.String desc,
ClassFile cf,
ConstPool cp,
java.util.ArrayList forwarders) |
private int |
ProxyFactory.overrideMethods(ClassFile cf,
ConstPool cp,
java.lang.String className,
java.util.ArrayList forwarders) |
static java.lang.Class |
FactoryHelper.toClass(ClassFile cf,
java.lang.ClassLoader loader)
Loads a class file by a given class loader.
|
static java.lang.Class |
FactoryHelper.toClass(ClassFile cf,
java.lang.ClassLoader loader,
java.security.ProtectionDomain domain)
Loads a class file by a given class loader.
|
static void |
FactoryHelper.writeFile(ClassFile cf,
java.lang.String directoryName)
Writes a class file.
|
private static void |
FactoryHelper.writeFile0(ClassFile cf,
java.lang.String directoryName) |