public class CachedMethod extends MetaMethod implements Comparable
Modifier and Type | Field and Description |
---|---|
CachedClass |
cachedClass |
isVargsMethod, nativeParamTypes, parameterTypes
Constructor and Description |
---|
CachedMethod(CachedClass clazz,
Method method) |
CachedMethod(Method method) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Object o) |
CallSite |
createPogoMetaMethodSite(CallSite site,
MetaClassImpl metaClass,
Class[] params) |
CallSite |
createPojoMetaMethodSite(CallSite site,
MetaClassImpl metaClass,
Class[] params) |
CallSite |
createStaticMetaMethodSite(CallSite site,
MetaClassImpl metaClass,
Class[] params) |
boolean |
equals(Object o) |
static CachedMethod |
find(Method method) |
Method |
getCachedMethod() |
CachedClass |
getDeclaringClass()
Gets the class where this method is declared
|
String |
getDescriptor()
Return a descriptor of this method based on the return type and parameters of this method.
|
int |
getModifiers()
Returns the modifiers for this method
|
String |
getName()
Returns the name of the method represented by this class
|
int |
getParamsCount() |
ParameterTypes |
getParamTypes() |
protected Class[] |
getPT() |
Class |
getReturnType()
Access the return type for this method
|
String |
getSignature()
Returns the signature of this method
|
int |
hashCode() |
Object |
invoke(Object object,
Object[] arguments)
Invoke this method
|
boolean |
isStatic()
Returns whether or not this method is static.
|
Method |
setAccessible() |
String |
toString()
Returns a string representation of this method
|
checkParameters, clone, doMethodInvoke, equal, equal, getMopName, isAbstract, isCacheable, isMethod, isPrivate, isProtected, isPublic, isSame, processDoMethodInvokeException
coerceArgumentsToClasses, correctArguments, getNativeParameterTypes, getParameterTypes, isValidExactMethod, isValidExactMethod, isValidMethod, isValidMethod, isVargsMethod, isVargsMethod, setParametersTypes
public final CachedClass cachedClass
public CachedMethod(CachedClass clazz, Method method)
public CachedMethod(Method method)
public static CachedMethod find(Method method)
protected Class[] getPT()
getPT
in class ParameterTypes
public String getName()
MetaMethod
getName
in class MetaMethod
public String getDescriptor()
MetaMethod
getDescriptor
in class MetaMethod
public CachedClass getDeclaringClass()
MetaMethod
getDeclaringClass
in class MetaMethod
public final Object invoke(Object object, Object[] arguments)
MetaMethod
invoke
in class MetaMethod
object
- The object this method should be invoked onarguments
- The arguments for the method if applicablepublic ParameterTypes getParamTypes()
public Class getReturnType()
MetaMethod
getReturnType
in class MetaMethod
public int getParamsCount()
public int getModifiers()
MetaMethod
getModifiers
in class MetaMethod
public String getSignature()
MetaMethod
getSignature
in class MetaMethod
public final Method setAccessible()
public boolean isStatic()
MetaMethod
isStatic
in class MetaMethod
public int compareTo(Object o)
compareTo
in interface Comparable
public String toString()
MetaMethod
toString
in class MetaMethod
public CallSite createPogoMetaMethodSite(CallSite site, MetaClassImpl metaClass, Class[] params)
public CallSite createPojoMetaMethodSite(CallSite site, MetaClassImpl metaClass, Class[] params)
public CallSite createStaticMetaMethodSite(CallSite site, MetaClassImpl metaClass, Class[] params)
public Method getCachedMethod()