Uses of Class
javassist.CtMethod
-
Packages that use CtMethod Package Description javassist The Javassist Core API.javassist.bytecode Bytecode-level API.javassist.bytecode.analysis Bytecode Analysis API.javassist.compiler javassist.convert javassist.expr This package contains the classes for modifying a method body.javassist.tools.reflect Runtime Behavioral Reflection.javassist.tools.rmi Sample implementation of remote method invocation. -
-
Uses of CtMethod in javassist
Fields in javassist with type parameters of type CtMethod Modifier and Type Field Description private java.util.Map<CtMethod,java.lang.String>
CtClassType. hiddenMethods
Methods in javassist that return CtMethod Modifier and Type Method 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. copy(CtMethod src, java.lang.String name, CtClass declaring, ClassMap map)
Creates a copy of a method with a new name.static CtMethod
CtNewMethod. copy(CtMethod src, CtClass declaring, ClassMap map)
Creates a copy of a method.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)
CtMethod
CtClass. getDeclaredMethod(java.lang.String name)
Retrieves the method with the specified name among the methods declared in the class.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)
CtMethod
CtClassType. getDeclaredMethod(java.lang.String name, CtClass[] params)
CtMethod[]
CtClass. getDeclaredMethods()
Gets all methods declared in the class.CtMethod[]
CtClass. getDeclaredMethods(java.lang.String name)
Retrieves methods with the specified name among the methods declared in the class.CtMethod[]
CtClassType. getDeclaredMethods()
CtMethod[]
CtClassType. getDeclaredMethods(java.lang.String name)
CtMethod
CtClass. getEnclosingMethod()
Deprecated.The enclosing method might be a constructor.CtMethod
ClassPool. getMethod(java.lang.String classname, java.lang.String methodname)
Reads a class file and obtains a compile-time method.CtMethod
CtArray. getMethod(java.lang.String name, java.lang.String desc)
CtMethod
CtClass. getMethod(java.lang.String name, java.lang.String desc)
Returns the method with the given name and signature.CtMethod
CtClassType. getMethod(java.lang.String name, java.lang.String desc)
private static CtMethod
CtClassType. getMethod0(CtClass cc, java.lang.String name, java.lang.String desc)
CtMethod[]
CtArray. getMethods()
CtMethod[]
CtClass. getMethods()
Returns an array containingCtMethod
objects representing all the non-private methods of the class.CtMethod[]
CtClassType. getMethods()
static CtMethod
CtNewMethod. getter(java.lang.String methodName, CtField field)
Creates a public getter method.static CtMethod
CtMethod. make(java.lang.String src, CtClass declaring)
Compiles the given source code and creates a method.static CtMethod
CtMethod. make(MethodInfo minfo, CtClass declaring)
Creates a method from aMethodInfo
object.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(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.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. setter(java.lang.String methodName, CtField field)
Creates a public setter method.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.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)
Methods in javassist that return types with arguments of type CtMethod Modifier and Type Method Description (package private) java.util.Map<CtMethod,java.lang.String>
CtClassType. getHiddenMethods()
Methods in javassist with parameters of type CtMethod Modifier and Type Method Description private static java.lang.String
CtNewWrappedMethod. addBodyMethod(CtClassType clazz, ClassFile classfile, CtMethod src)
void
CtClass. addMethod(CtMethod m)
Adds a method.void
CtClassType. addMethod(CtMethod m)
private static void
CtNewWrappedMethod. checkSignature(CtMethod wrappedBody, java.lang.String descriptor)
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 CtMethod
CtNewMethod. copy(CtMethod src, CtClass declaring, ClassMap map)
Creates a copy of a method.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)
void
CodeConverter. insertAfterMethod(CtMethod origMethod, CtMethod afterMethod)
Inserts a call to another method after an existing method call.void
CodeConverter. insertBeforeMethod(CtMethod origMethod, CtMethod beforeMethod)
Insert a call to another method before an existing method call.static CtConstructor
CtNewConstructor. make(CtClass[] parameters, CtClass[] exceptions, int howto, CtMethod body, CtMethod.ConstParameter cparam, CtClass declaring)
Creates a public constructor.protected static Bytecode
CtNewWrappedConstructor. makeBody(CtClass declaring, ClassFile classfile, int howToCallSuper, CtMethod wrappedBody, CtClass[] parameters, CtMethod.ConstParameter cparam)
(package private) static Bytecode
CtNewWrappedMethod. makeBody(CtClass clazz, ClassFile classfile, CtMethod wrappedBody, CtClass[] parameters, CtClass returnType, CtMethod.ConstParameter cparam)
protected static int
CtNewWrappedMethod. makeBody0(CtClass clazz, ClassFile classfile, CtMethod wrappedBody, boolean isStatic, CtClass[] parameters, CtClass returnType, CtMethod.ConstParameter cparam, Bytecode code)
void
CodeConverter. redirectMethodCall(java.lang.String oldMethodName, CtMethod newMethod)
Correct invocations to a method that has been renamed.void
CodeConverter. redirectMethodCall(CtMethod origMethod, CtMethod substMethod)
Modify method invocations in a method body so that a different method will be invoked.void
CodeConverter. redirectMethodCallToStatic(CtMethod origMethod, CtMethod staticMethod)
Redirect non-static method invocations in a method body to a static method.void
CtClass. removeMethod(CtMethod m)
Removes a method declared in this class.void
CtClassType. removeMethod(CtMethod m)
void
CtMethod. setBody(CtMethod src, ClassMap map)
Copies a method body from another method.void
CtMethod. setWrappedBody(CtMethod mbody, CtMethod.ConstParameter constParam)
Replace a method body with a new method body wrapping the given 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 CtConstructor
CtNewWrappedConstructor. wrapped(CtClass[] parameterTypes, CtClass[] exceptionTypes, int howToCallSuper, 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)
Constructors in javassist with parameters of type CtMethod Constructor Description CtMethod(CtMethod src, CtClass declaring, ClassMap map)
Creates a copy of aCtMethod
object. -
Uses of CtMethod in javassist.bytecode
Methods in javassist.bytecode with parameters of type CtMethod Modifier and Type Method Description void
InstructionPrinter. print(CtMethod method)
Prints the bytecode instructions of a given method.static void
InstructionPrinter. print(CtMethod method, java.io.PrintStream stream)
Prints the bytecode instructions of a given method. -
Uses of CtMethod in javassist.bytecode.analysis
Methods in javassist.bytecode.analysis with parameters of type CtMethod Modifier and Type Method Description Frame[]
Analyzer. analyze(CtMethod 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.private java.lang.String
FramePrinter. getMethodString(CtMethod method)
void
FramePrinter. print(CtMethod method)
Prints the instructions and the frame states of the given method.Constructors in javassist.bytecode.analysis with parameters of type CtMethod Constructor Description ControlFlow(CtMethod method)
Constructs a control-flow analyzer for the given method. -
Uses of CtMethod in javassist.compiler
Methods in javassist.compiler with parameters of type CtMethod Modifier and Type Method Description void
MemberCodeGen. setThisMethod(CtMethod m)
Records the currently compiled method. -
Uses of CtMethod in javassist.convert
Constructors in javassist.convert with parameters of type CtMethod Constructor Description TransformAfter(Transformer next, CtMethod origMethod, CtMethod afterMethod)
TransformBefore(Transformer next, CtMethod origMethod, CtMethod beforeMethod)
TransformCall(Transformer next, java.lang.String oldMethodName, CtMethod substMethod)
TransformCall(Transformer next, CtMethod origMethod, CtMethod substMethod)
TransformCallToStatic(Transformer next, CtMethod origMethod, CtMethod substMethod)
-
Uses of CtMethod in javassist.expr
Methods in javassist.expr that return CtMethod Modifier and Type Method Description CtMethod
ConstructorCall. getMethod()
Always throws aNotFoundException
.CtMethod
MethodCall. getMethod()
Returns the called method. -
Uses of CtMethod in javassist.tools.reflect
Fields in javassist.tools.reflect declared as CtMethod Modifier and Type Field Description protected CtMethod
Reflection. trapMethod
protected CtMethod
Reflection. trapRead
protected CtMethod
Reflection. trapStaticMethod
protected CtMethod
Reflection. trapWrite
Methods in javassist.tools.reflect that return CtMethod Modifier and Type Method Description private CtMethod
Reflection. findOriginal(CtMethod m, boolean dontSearch)
Methods in javassist.tools.reflect with parameters of type CtMethod Modifier and Type Method Description private CtMethod
Reflection. findOriginal(CtMethod m, boolean dontSearch)
private void
Reflection. processMethods0(int mod, CtClass clazz, CtMethod m, int identifier, boolean dontSearch)
-
Uses of CtMethod in javassist.tools.rmi
Fields in javassist.tools.rmi declared as CtMethod Modifier and Type Field Description private CtMethod
StubGenerator. forwardMethod
private CtMethod
StubGenerator. forwardStaticMethod
-