Uses of Class
javassist.CtMethod
Packages that use CtMethod
Package
Description
The Javassist Core API.
Bytecode-level API.
Bytecode Analysis API.
This package contains the classes for modifying a method body.
Runtime Behavioral Reflection.
Sample implementation of remote method invocation.
-
Uses of CtMethod in javassist
Modifier and TypeMethodDescriptionstatic CtMethodCtNewMethod.abstractMethod(CtClass returnType, String mname, CtClass[] parameters, CtClass[] exceptions, CtClass declaring) Creates a public abstract method.static CtMethodCreates a copy of a method with a new name.static CtMethodCreates a copy of a method.static CtMethodCreates a method forwarding to a delegate in a super class.private static CtMethodCtNewMethod.delegator0(CtMethod delegate, CtClass declaring) CtClass.getDeclaredMethod(String name) Retrieves the method with the specified name among the methods declared in the class.CtClass.getDeclaredMethod(String name, CtClass[] params) Retrieves the method with the specified name and parameter types among the methods declared in the class.CtClassType.getDeclaredMethod(String name) CtClassType.getDeclaredMethod(String name, CtClass[] params) CtMethod[]CtClass.getDeclaredMethods()Gets all methods declared in the class.CtMethod[]CtClass.getDeclaredMethods(String name) Retrieves methods with the specified name among the methods declared in the class.CtMethod[]CtClassType.getDeclaredMethods()CtMethod[]CtClassType.getDeclaredMethods(String name) final CtMethodCtClass.getEnclosingMethod()Deprecated.The enclosing method might be a constructor.Reads a class file and obtains a compile-time method.Returns the method with the given name and signature.private static CtMethodCtClassType.getMethod0(CtClass cc, String name, String desc) CtMethod[]CtArray.getMethods()CtMethod[]CtClass.getMethods()Returns an array containingCtMethodobjects representing all the non-private methods of the class.CtMethod[]CtClassType.getMethods()static CtMethodCreates a public getter method.static CtMethodCompiles the given source code and creates a method.static CtMethodCtMethod.make(MethodInfo minfo, CtClass declaring) Creates a method from aMethodInfoobject.static CtMethodCtNewMethod.make(int modifiers, CtClass returnType, String mname, CtClass[] parameters, CtClass[] exceptions, String body, CtClass declaring) Creates a method.static CtMethodCompiles the given source code and creates a method.static CtMethodCompiles the given source code and creates a method.static CtMethodCtNewMethod.make(CtClass returnType, String mname, CtClass[] parameters, CtClass[] exceptions, String body, CtClass declaring) Creates a public (non-static) method.static CtMethodCreates a public setter method.Makes a copy of this constructor and converts it into a method.Makes a copy of this constructor and converts it into a method.static CtMethodCtNewMethod.wrapped(CtClass returnType, String mname, CtClass[] parameterTypes, CtClass[] exceptionTypes, CtMethod body, CtMethod.ConstParameter constParam, CtClass declaring) Creates a wrapped method.static CtMethodCtNewWrappedMethod.wrapped(CtClass returnType, String mname, CtClass[] parameterTypes, CtClass[] exceptionTypes, CtMethod body, CtMethod.ConstParameter constParam, CtClass declaring) Modifier and TypeMethodDescriptionprivate static StringCtNewWrappedMethod.addBodyMethod(CtClassType clazz, ClassFile classfile, CtMethod src) voidAdds a method.voidprivate static voidCtNewWrappedMethod.checkSignature(CtMethod wrappedBody, String descriptor) static CtMethodCreates a copy of a method with a new name.static CtMethodCreates a copy of a method.static CtMethodCreates a method forwarding to a delegate in a super class.private static CtMethodCtNewMethod.delegator0(CtMethod delegate, CtClass declaring) voidCodeConverter.insertAfterMethod(CtMethod origMethod, CtMethod afterMethod) Inserts a call to another method after an existing method call.voidCodeConverter.insertBeforeMethod(CtMethod origMethod, CtMethod beforeMethod) Insert a call to another method before an existing method call.static CtConstructorCtNewConstructor.make(CtClass[] parameters, CtClass[] exceptions, int howto, CtMethod body, CtMethod.ConstParameter cparam, CtClass declaring) Creates a public constructor.protected static BytecodeCtNewWrappedConstructor.makeBody(CtClass declaring, ClassFile classfile, int howToCallSuper, CtMethod wrappedBody, CtClass[] parameters, CtMethod.ConstParameter cparam) (package private) static BytecodeCtNewWrappedMethod.makeBody(CtClass clazz, ClassFile classfile, CtMethod wrappedBody, CtClass[] parameters, CtClass returnType, CtMethod.ConstParameter cparam) protected static intCtNewWrappedMethod.makeBody0(CtClass clazz, ClassFile classfile, CtMethod wrappedBody, boolean isStatic, CtClass[] parameters, CtClass returnType, CtMethod.ConstParameter cparam, Bytecode code) voidCodeConverter.redirectMethodCall(String oldMethodName, CtMethod newMethod) Correct invocations to a method that has been renamed.voidCodeConverter.redirectMethodCall(CtMethod origMethod, CtMethod substMethod) Modify method invocations in a method body so that a different method will be invoked.voidCodeConverter.redirectMethodCallToStatic(CtMethod origMethod, CtMethod staticMethod) Redirect non-static method invocations in a method body to a static method.voidCtClass.removeMethod(CtMethod m) Removes a method declared in this class.voidCtClassType.removeMethod(CtMethod m) voidCopies a method body from another method.voidCtMethod.setWrappedBody(CtMethod mbody, CtMethod.ConstParameter constParam) Replace a method body with a new method body wrapping the given method.static CtMethodCtNewMethod.wrapped(CtClass returnType, String mname, CtClass[] parameterTypes, CtClass[] exceptionTypes, CtMethod body, CtMethod.ConstParameter constParam, CtClass declaring) Creates a wrapped method.static CtConstructorCtNewWrappedConstructor.wrapped(CtClass[] parameterTypes, CtClass[] exceptionTypes, int howToCallSuper, CtMethod body, CtMethod.ConstParameter constParam, CtClass declaring) static CtMethodCtNewWrappedMethod.wrapped(CtClass returnType, String mname, CtClass[] parameterTypes, CtClass[] exceptionTypes, CtMethod body, CtMethod.ConstParameter constParam, CtClass declaring) -
Uses of CtMethod in javassist.bytecode
Methods in javassist.bytecode with parameters of type CtMethodModifier and TypeMethodDescriptionvoidPrints the bytecode instructions of a given method.static voidInstructionPrinter.print(CtMethod method, 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 CtMethodModifier and TypeMethodDescriptionFrame[]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 StringFramePrinter.getMethodString(CtMethod method) voidPrints the instructions and the frame states of the given method.Constructors in javassist.bytecode.analysis with parameters of type CtMethodModifierConstructorDescriptionControlFlow(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 CtMethodModifier and TypeMethodDescriptionvoidMemberCodeGen.setThisMethod(CtMethod m) Records the currently compiled method. -
Uses of CtMethod in javassist.convert
Constructors in javassist.convert with parameters of type CtMethodModifierConstructorDescriptionTransformAfter(Transformer next, CtMethod origMethod, CtMethod afterMethod) TransformBefore(Transformer next, CtMethod origMethod, CtMethod beforeMethod) TransformCall(Transformer next, 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 -
Uses of CtMethod in javassist.tools.reflect
Fields in javassist.tools.reflect declared as CtMethodModifier and TypeFieldDescriptionprotected CtMethodReflection.trapMethodprotected CtMethodReflection.trapReadprotected CtMethodReflection.trapStaticMethodprotected CtMethodReflection.trapWriteMethods in javassist.tools.reflect that return CtMethodModifier and TypeMethodDescriptionprivate CtMethodReflection.findOriginal(CtMethod m, boolean dontSearch) Methods in javassist.tools.reflect with parameters of type CtMethodModifier and TypeMethodDescriptionprivate CtMethodReflection.findOriginal(CtMethod m, boolean dontSearch) private voidReflection.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 CtMethodModifier and TypeFieldDescriptionprivate CtMethodStubGenerator.forwardMethodprivate CtMethodStubGenerator.forwardStaticMethod