类 MethodAccess
java.lang.Object
cn.taketoday.bytecode.reflect.MethodAccess
- 作者:
- TODAY 2018-11-08 15:08
-
嵌套类概要
嵌套类 -
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明booleanstatic MethodAccessstatic MethodAccessfrom(ClassLoader loader, Class type) getConstructor(Class[] parameterTypes) getConstructor(Constructor constructor) abstract intgetIndex(MethodSignature sig) abstract intReturn the index of the matching constructor.intabstract intReturn the index of the matching method.abstract intReturns the maximum method index for this class.getName()protected static StringgetSignatureWithoutReturnType(String name, Class[] parameterTypes) inthashCode()abstract ObjectInvoke the method with the specified index.abstract ObjectnewInstance(int index, Object[] args) Create a new instance using the specified constructor index and arguments.newInstance(Class[] parameterTypes, Object[] args) toString()
-
字段详细资料
-
type
-
-
构造器详细资料
-
MethodAccess
-
-
方法详细资料
-
getIndex
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. - 另请参阅:
-
getIndex
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. - 另请参阅:
-
invoke
public abstract Object invoke(int index, Object obj, Object[] args) throws InvocationTargetException Invoke 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- 抛出:
InvocationTargetException- if the underlying method throws an exception- 另请参阅:
-
newInstance
Create a new instance using the specified constructor index and arguments.- 参数:
index- the constructor indexargs- the arguments passed to the constructor- 抛出:
InvocationTargetException- if the constructor throws an exception- 另请参阅:
-
getIndex
-
getIndex
-
getMaxIndex
public abstract int getMaxIndex()Returns the maximum method index for this class. -
invoke
-
newInstance
-
newInstance
-
getMethod
-
getConstructor
-
getMethod
-
getConstructor
-
getName
-
getDeclaringClass
-
toString
-
hashCode
public int hashCode() -
equals
-
getSignatureWithoutReturnType
-
from
-
from
-