Package javassist.util.proxy
Class RuntimeSupport
java.lang.Object
javassist.util.proxy.RuntimeSupport
Runtime support routines that the classes generated by ProxyFactory use.
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic MethodHandler
A method handler that only executes a method. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
find2Methods
(Class<?> clazz, String superMethod, String thisMethod, int index, String desc, Method[] methods) Finds two methods specified by the parameters and stores them into the given array.static void
find2Methods
(Object self, String superMethod, String thisMethod, int index, String desc, Method[] methods) Deprecated.static Method
findMethod
(Class<?> clazz, String name, String desc) Finds a method with the given name and descriptor.static Method
findMethod
(Object self, String name, String desc) Deprecated.replaced byfindMethod(Class, String, String)
static Method
findSuperClassMethod
(Class<?> clazz, String name, String desc) Finds a method that has the given name and descriptor and is declared in the super class.static Method
findSuperMethod
(Object self, String name, String desc) Finds a method that has the given name and descriptor and is declared in the super class.static String
makeDescriptor
(Class<?>[] params, Class<?> retType) Makes a descriptor for a given method.static String
Makes a descriptor for a given method.static String
makeDescriptor
(String params, Class<?> retType) Makes a descriptor for a given method.static javassist.util.proxy.SerializedProxy
makeSerializedProxy
(Object proxy) Converts a proxy object to an object that is writable to an object stream.
-
Field Details
-
default_interceptor
A method handler that only executes a method.
-
-
Constructor Details
-
RuntimeSupport
public RuntimeSupport()
-
-
Method Details
-
find2Methods
public static void find2Methods(Class<?> clazz, String superMethod, String thisMethod, int index, String desc, Method[] methods) Finds two methods specified by the parameters and stores them into the given array.- Throws:
RuntimeException
- if the methods are not found.- See Also:
-
find2Methods
@Deprecated public static void find2Methods(Object self, String superMethod, String thisMethod, int index, String desc, Method[] methods) Deprecated.Finds two methods specified by the parameters and stores them into the given array.Added back for JBoss Seam. See JASSIST-206.
- Throws:
RuntimeException
- if the methods are not found.- See Also:
-
findMethod
Deprecated.replaced byfindMethod(Class, String, String)
Finds a method with the given name and descriptor. It searches only the class of self.Added back for JBoss Seam. See JASSIST-206.
- Throws:
RuntimeException
- if the method is not found.
-
findMethod
Finds a method with the given name and descriptor. It searches only the class of self.- Throws:
RuntimeException
- if the method is not found.
-
findSuperMethod
Finds a method that has the given name and descriptor and is declared in the super class.- Throws:
RuntimeException
- if the method is not found.
-
findSuperClassMethod
Finds a method that has the given name and descriptor and is declared in the super class.- Throws:
RuntimeException
- if the method is not found.
-
makeDescriptor
Makes a descriptor for a given method. -
makeDescriptor
Makes a descriptor for a given method.- Parameters:
params
- parameter types.retType
- return type.
-
makeDescriptor
Makes a descriptor for a given method.- Parameters:
params
- the descriptor of parameter types.retType
- return type.
-
makeSerializedProxy
public static javassist.util.proxy.SerializedProxy makeSerializedProxy(Object proxy) throws InvalidClassException Converts a proxy object to an object that is writable to an object stream. This method is called bywriteReplace()
in a proxy class.- Throws:
InvalidClassException
- Since:
- 3.4
-
find2Methods(Class, String, String, int, String, Method[])