类 FastClass
- java.lang.Object
-
- org.hibernate.bytecode.internal.javassist.FastClass
-
- 所有已实现的接口:
Serializable
public class FastClass extends Object implements Serializable
Fast access to class information- 作者:
- Muga Nishizawa
- 另请参阅:
- 序列化表格
-
-
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 static FastClasscreate(Class type)Constructs a FastClassbooleanequals(Object o)intgetIndex(Class[] parameterTypes)Locate the index of a constructorintgetIndex(String name, Class[] parameterTypes)Locate the index of a methodClassgetJavaClass()Get the wrapped java class referenceStringgetName()Get the wrapped class nameinthashCode()Objectinvoke(int index, Object obj, Object[] args)Access to invoke a method on the class that this fast class handles by its indexObjectinvoke(String name, Class[] parameterTypes, Object obj, Object[] args)Access to invoke a method on the class that this fast class handlesObjectnewInstance()Invoke the default constructorObjectnewInstance(int index, Object[] args)Invoke a constructor by its indexObjectnewInstance(Class[] parameterTypes, Object[] args)Invoke a parameterized constructorStringtoString()
-
-
-
方法详细资料
-
create
public static FastClass create(Class type)
Constructs a FastClass- 参数:
type- The class to optimize- 返回:
- The fast class access to the given class
-
invoke
public Object invoke(String name, Class[] parameterTypes, Object obj, Object[] args) throws InvocationTargetException
Access to invoke a method on the class that this fast class handles- 参数:
name- The name of the method to invoke,parameterTypes- The method parameter typesobj- The instance on which to invoke the methodargs- The parameter arguments- 返回:
- The method result
- 抛出:
InvocationTargetException- Indicates a problem performing invocation
-
invoke
public Object invoke(int index, Object obj, Object[] args) throws InvocationTargetException
Access to invoke a method on the class that this fast class handles by its index- 参数:
index- The method indexobj- The instance on which to invoke the methodargs- The parameter arguments- 返回:
- The method result
- 抛出:
InvocationTargetException- Indicates a problem performing invocation
-
newInstance
public Object newInstance() throws InvocationTargetException
Invoke the default constructor- 返回:
- The constructed instance
- 抛出:
InvocationTargetException- Indicates a problem performing invocation
-
newInstance
public Object newInstance(Class[] parameterTypes, Object[] args) throws InvocationTargetException
Invoke a parameterized constructor- 参数:
parameterTypes- The parameter typesargs- The parameter arguments to pass along- 返回:
- The constructed instance
- 抛出:
InvocationTargetException- Indicates a problem performing invocation
-
newInstance
public Object newInstance(int index, Object[] args) throws InvocationTargetException
Invoke a constructor by its index- 参数:
index- The constructor indexargs- The parameter arguments to pass along- 返回:
- The constructed instance
- 抛出:
InvocationTargetException- Indicates a problem performing invocation
-
getIndex
public int getIndex(String name, Class[] parameterTypes)
Locate the index of a method- 参数:
name- The method nameparameterTypes- The method parameter types- 返回:
- The index
-
getIndex
public int getIndex(Class[] parameterTypes)
Locate the index of a constructor- 参数:
parameterTypes- The constructor parameter types- 返回:
- The index
-
getName
public String getName()
Get the wrapped class name- 返回:
- The class name
-
getJavaClass
public Class getJavaClass()
Get the wrapped java class reference- 返回:
- The class reference
-
-