org.codehaus.groovy.reflection
Class CachedMethod

java.lang.Object
  extended by org.codehaus.groovy.reflection.ParameterTypes
      extended by groovy.lang.MetaMethod
          extended by org.codehaus.groovy.reflection.CachedMethod
All Implemented Interfaces:
java.lang.Cloneable, java.lang.Comparable

public class CachedMethod
extends MetaMethod
implements java.lang.Comparable

Author:
Alex.Tkachman

Nested Class Summary
private static class CachedMethod.MyComparator
           
 
Field Summary
private  boolean alreadySetAccessible
           
 CachedClass cachedClass
           
private  java.lang.reflect.Method cachedMethod
           
private static CachedMethod.MyComparator comparator
           
private  int hashCode
           
private  int methodIndex
           
 
Fields inherited from class org.codehaus.groovy.reflection.ParameterTypes
isVargsMethod, nativeParamTypes, parameterTypes
 
Constructor Summary
CachedMethod(CachedClass clazz, java.lang.reflect.Method method)
           
CachedMethod(java.lang.reflect.Method method)
           
 
Method Summary
 boolean canBeCalledByReflector()
           
 int compareTo(java.lang.Object o)
           
private  int compareToCachedMethod(CachedMethod m)
           
private  int compareToMethod(java.lang.reflect.Method m)
           
 boolean equals(java.lang.Object o)
           
static CachedMethod find(java.lang.reflect.Method method)
           
 CachedClass getDeclaringClass()
           
 java.lang.String getDescriptor()
           
 int getMethodIndex()
           
 int getModifiers()
           
 java.lang.String getName()
           
 int getParamsCount()
           
 ParameterTypes getParamTypes()
           
protected  java.lang.Class[] getPT()
           
 java.lang.Class getReturnType()
           
 java.lang.String getSignature()
           
 int hashCode()
           
 java.lang.Object invoke(java.lang.Object object, java.lang.Object[] arguments)
           
 boolean isStatic()
           
 java.lang.reflect.Method setAccessible()
           
private  void setAccessible0()
           
 void setMethodIndex(int i)
           
 java.lang.String toString()
           
 
Methods inherited from class groovy.lang.MetaMethod
checkParameters, clone, doMethodInvoke, equal, equal, getMopName, isCacheable, isMethod, isPrivate, isProtected, isPublic, isSame, processDoMethodInvokeException
 
Methods inherited from class org.codehaus.groovy.reflection.ParameterTypes
coerceArgumentsToClasses, getNativeParameterTypes, getParameterTypes, isValidMethod, isValidMethod, isVargsMethod, setParametersTypes
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

cachedClass

public final CachedClass cachedClass

cachedMethod

private final java.lang.reflect.Method cachedMethod

alreadySetAccessible

private volatile boolean alreadySetAccessible

methodIndex

private int methodIndex

hashCode

private int hashCode

comparator

private static CachedMethod.MyComparator comparator
Constructor Detail

CachedMethod

public CachedMethod(CachedClass clazz,
                    java.lang.reflect.Method method)

CachedMethod

public CachedMethod(java.lang.reflect.Method method)
Method Detail

find

public static CachedMethod find(java.lang.reflect.Method method)

getPT

protected java.lang.Class[] getPT()
Overrides:
getPT in class ParameterTypes

getName

public java.lang.String getName()
Specified by:
getName in class MetaMethod

getDescriptor

public java.lang.String getDescriptor()
Overrides:
getDescriptor in class MetaMethod

getDeclaringClass

public CachedClass getDeclaringClass()
Specified by:
getDeclaringClass in class MetaMethod

invoke

public java.lang.Object invoke(java.lang.Object object,
                               java.lang.Object[] arguments)
Specified by:
invoke in class MetaMethod

getParamTypes

public ParameterTypes getParamTypes()

getReturnType

public java.lang.Class getReturnType()
Specified by:
getReturnType in class MetaMethod

getParamsCount

public int getParamsCount()

getModifiers

public int getModifiers()
Specified by:
getModifiers in class MetaMethod

getSignature

public java.lang.String getSignature()
Overrides:
getSignature in class MetaMethod

setAccessible

public java.lang.reflect.Method setAccessible()

setAccessible0

private void setAccessible0()

isStatic

public boolean isStatic()
Overrides:
isStatic in class MetaMethod

setMethodIndex

public void setMethodIndex(int i)

getMethodIndex

public int getMethodIndex()

canBeCalledByReflector

public boolean canBeCalledByReflector()

compareTo

public int compareTo(java.lang.Object o)
Specified by:
compareTo in interface java.lang.Comparable

compareToCachedMethod

private int compareToCachedMethod(CachedMethod m)

compareToMethod

private int compareToMethod(java.lang.reflect.Method m)

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class MetaMethod


Copyright © ${year} The Codehaus. All Rights Reserved.