public class RuntimeSupport
extends java.lang.Object
ProxyFactory
Modifier and Type | Field and Description |
---|---|
static MethodHandler |
default_interceptor
A method handler that only executes a method.
|
Constructor and Description |
---|
RuntimeSupport() |
Modifier and Type | Method and Description |
---|---|
static void |
find2Methods(java.lang.Class clazz,
java.lang.String superMethod,
java.lang.String thisMethod,
int index,
java.lang.String desc,
java.lang.reflect.Method[] methods)
Finds two methods specified by the parameters and stores them
into the given array.
|
static void |
find2Methods(java.lang.Object self,
java.lang.String superMethod,
java.lang.String thisMethod,
int index,
java.lang.String desc,
java.lang.reflect.Method[] methods)
Deprecated.
|
static java.lang.reflect.Method |
findMethod(java.lang.Class clazz,
java.lang.String name,
java.lang.String desc)
Finds a method with the given name and descriptor.
|
static java.lang.reflect.Method |
findMethod(java.lang.Object self,
java.lang.String name,
java.lang.String desc)
Deprecated.
replaced by
findMethod(Class, String, String) |
static java.lang.reflect.Method |
findSuperClassMethod(java.lang.Class clazz,
java.lang.String name,
java.lang.String desc)
Finds a method that has the given name and descriptor and is declared
in the super class.
|
static java.lang.reflect.Method |
findSuperMethod(java.lang.Object self,
java.lang.String name,
java.lang.String desc)
Finds a method that has the given name and descriptor and is declared
in the super class.
|
static java.lang.String |
makeDescriptor(java.lang.Class[] params,
java.lang.Class retType)
Makes a descriptor for a given method.
|
static java.lang.String |
makeDescriptor(java.lang.reflect.Method m)
Makes a descriptor for a given method.
|
static java.lang.String |
makeDescriptor(java.lang.String params,
java.lang.Class retType)
Makes a descriptor for a given method.
|
static javassist.util.proxy.SerializedProxy |
makeSerializedProxy(java.lang.Object proxy)
Converts a proxy object to an object that is writable to an
object stream.
|
public static MethodHandler default_interceptor
public static void find2Methods(java.lang.Class clazz, java.lang.String superMethod, java.lang.String thisMethod, int index, java.lang.String desc, java.lang.reflect.Method[] methods)
java.lang.RuntimeException
- if the methods are not found.ProxyFactory
public static void find2Methods(java.lang.Object self, java.lang.String superMethod, java.lang.String thisMethod, int index, java.lang.String desc, java.lang.reflect.Method[] methods)
find2Methods(Class, String, String, int, String, Method[])
Added back for JBoss Seam. See JASSIST-206.
java.lang.RuntimeException
- if the methods are not found.ProxyFactory
public static java.lang.reflect.Method findMethod(java.lang.Object self, java.lang.String name, java.lang.String desc)
findMethod(Class, String, String)
Added back for JBoss Seam. See JASSIST-206.
java.lang.RuntimeException
- if the method is not found.public static java.lang.reflect.Method findMethod(java.lang.Class clazz, java.lang.String name, java.lang.String desc)
java.lang.RuntimeException
- if the method is not found.public static java.lang.reflect.Method findSuperMethod(java.lang.Object self, java.lang.String name, java.lang.String desc)
java.lang.RuntimeException
- if the method is not found.public static java.lang.reflect.Method findSuperClassMethod(java.lang.Class clazz, java.lang.String name, java.lang.String desc)
java.lang.RuntimeException
- if the method is not found.public static java.lang.String makeDescriptor(java.lang.reflect.Method m)
public static java.lang.String makeDescriptor(java.lang.Class[] params, java.lang.Class retType)
params
- parameter types.retType
- return type.public static java.lang.String makeDescriptor(java.lang.String params, java.lang.Class retType)
params
- the descriptor of parameter types.retType
- return type.public static javassist.util.proxy.SerializedProxy makeSerializedProxy(java.lang.Object proxy) throws java.io.InvalidClassException
writeReplace()
in a proxy class.java.io.InvalidClassException
Javassist, a Java-bytecode translator toolkit.
Copyright (C) 1999- Shigeru Chiba. All Rights Reserved.