类 FastClass
- java.lang.Object
-
- net.sf.cglib.reflect.FastClass
-
public abstract class FastClass extends java.lang.Object
-
-
嵌套类概要
嵌套类 修饰符和类型 类 说明 static classFastClass.Generator
-
方法概要
所有方法 静态方法 实例方法 抽象方法 具体方法 修饰符和类型 方法 说明 static FastClasscreate(java.lang.Class type)static FastClasscreate(java.lang.ClassLoader loader, java.lang.Class type)booleanequals(java.lang.Object o)FastConstructorgetConstructor(java.lang.Class[] parameterTypes)FastConstructorgetConstructor(java.lang.reflect.Constructor constructor)abstract intgetIndex(java.lang.Class[] parameterTypes)Return the index of the matching constructor.abstract intgetIndex(java.lang.String name, java.lang.Class[] parameterTypes)Return the index of the matching method.abstract intgetIndex(Signature sig)java.lang.ClassgetJavaClass()abstract intgetMaxIndex()Returns the maximum method index for this class.FastMethodgetMethod(java.lang.reflect.Method method)FastMethodgetMethod(java.lang.String name, java.lang.Class[] parameterTypes)java.lang.StringgetName()protected static java.lang.StringgetSignatureWithoutReturnType(java.lang.String name, java.lang.Class[] parameterTypes)inthashCode()abstract java.lang.Objectinvoke(int index, java.lang.Object obj, java.lang.Object[] args)Invoke the method with the specified index.java.lang.Objectinvoke(java.lang.String name, java.lang.Class[] parameterTypes, java.lang.Object obj, java.lang.Object[] args)java.lang.ObjectnewInstance()abstract java.lang.ObjectnewInstance(int index, java.lang.Object[] args)Create a new instance using the specified constructor index and arguments.java.lang.ObjectnewInstance(java.lang.Class[] parameterTypes, java.lang.Object[] args)java.lang.StringtoString()
-
-
-
方法详细资料
-
create
public static FastClass create(java.lang.Class type)
-
create
public static FastClass create(java.lang.ClassLoader loader, java.lang.Class type)
-
invoke
public java.lang.Object invoke(java.lang.String name, java.lang.Class[] parameterTypes, java.lang.Object obj, java.lang.Object[] args) throws java.lang.reflect.InvocationTargetException- 抛出:
java.lang.reflect.InvocationTargetException
-
newInstance
public java.lang.Object newInstance() throws java.lang.reflect.InvocationTargetException- 抛出:
java.lang.reflect.InvocationTargetException
-
newInstance
public java.lang.Object newInstance(java.lang.Class[] parameterTypes, java.lang.Object[] args) throws java.lang.reflect.InvocationTargetException- 抛出:
java.lang.reflect.InvocationTargetException
-
getMethod
public FastMethod getMethod(java.lang.reflect.Method method)
-
getConstructor
public FastConstructor getConstructor(java.lang.reflect.Constructor constructor)
-
getMethod
public FastMethod getMethod(java.lang.String name, java.lang.Class[] parameterTypes)
-
getConstructor
public FastConstructor getConstructor(java.lang.Class[] parameterTypes)
-
getName
public java.lang.String getName()
-
getJavaClass
public java.lang.Class getJavaClass()
-
toString
public java.lang.String toString()
- 覆盖:
toString在类中java.lang.Object
-
hashCode
public int hashCode()
- 覆盖:
hashCode在类中java.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- 覆盖:
equals在类中java.lang.Object
-
getIndex
public abstract int getIndex(java.lang.String name, java.lang.Class[] parameterTypes)Return the index of the matching method. The index may be used later to invoke the method with less overhead. If more than one method matches (i.e. they differ by return type only), one is chosen arbitrarily.- 参数:
name- the method nameparameterTypes- the parameter array- 返回:
- the index, or
-1if none is found. - 另请参阅:
invoke(int, Object, Object[])
-
getIndex
public abstract int getIndex(java.lang.Class[] parameterTypes)
Return the index of the matching constructor. The index may be used later to create a new instance with less overhead.- 参数:
parameterTypes- the parameter array- 返回:
- the constructor index, or
-1if none is found. - 另请参阅:
newInstance(int, Object[])
-
invoke
public abstract java.lang.Object invoke(int index, java.lang.Object obj, java.lang.Object[] args) throws java.lang.reflect.InvocationTargetExceptionInvoke the method with the specified index.- 参数:
index- the method indexobj- the object the underlying method is invoked fromargs- the arguments used for the method call- 抛出:
java.lang.reflect.InvocationTargetException- if the underlying method throws an exception- 另请参阅:
getIndex(name, Class[])
-
newInstance
public abstract java.lang.Object newInstance(int index, java.lang.Object[] args) throws java.lang.reflect.InvocationTargetExceptionCreate a new instance using the specified constructor index and arguments.- 参数:
index- the constructor indexargs- the arguments passed to the constructor- 抛出:
java.lang.reflect.InvocationTargetException- if the constructor throws an exception- 另请参阅:
getIndex(java.lang.Class[])
-
getIndex
public abstract int getIndex(Signature sig)
-
getMaxIndex
public abstract int getMaxIndex()
Returns the maximum method index for this class.
-
getSignatureWithoutReturnType
protected static java.lang.String getSignatureWithoutReturnType(java.lang.String name, java.lang.Class[] parameterTypes)
-
-