Groovy Documentation

groovy.lang
[Java] Class MetaMethod

java.lang.Object
  org.codehaus.groovy.reflection.ParameterTypes
      groovy.lang.MetaMethod
All Implemented Interfaces:
java.lang.Cloneable

public abstract class MetaMethod
extends ParameterTypes

Represents a Method on a Java object a little like java.lang.reflect.Method except without using reflection to invoke the method

Authors:
James Strachan
Alex Tkachman
Version:
\$Revision\$


Field Summary
 
Fields inherited from class ParameterTypes
isVargsMethod, nativeParamTypes, parameterTypes
 
Constructor Summary
MetaMethod()

MetaMethod(java.lang.Class[] pt)

 
Method Summary
void checkParameters(java.lang.Class[] arguments)

Checks that the given parameters are valid to call this method

java.lang.Object clone()

java.lang.Object doMethodInvoke(java.lang.Object object, java.lang.Object[] argumentArray)

protected static boolean equal(CachedClass[] a, java.lang.Class[] b)

protected static boolean equal(CachedClass[] a, CachedClass[] b)

CachedClass getDeclaringClass()

java.lang.String getDescriptor()

int getModifiers()

java.lang.String getMopName()

java.lang.String getName()

java.lang.Class getReturnType()

java.lang.String getSignature()

java.lang.Object invoke(java.lang.Object object, java.lang.Object[] arguments)

boolean isAbstract()

boolean isCacheable()

boolean isMethod(MetaMethod method)

boolean isPrivate()

boolean isProtected()

boolean isPublic()

boolean isSame(MetaMethod method)

@param method the method to compare against

boolean isStatic()

java.lang.RuntimeException processDoMethodInvokeException(java.lang.Exception e, java.lang.Object object, java.lang.Object[] argumentArray)

java.lang.String toString()

 
Methods inherited from class ParameterTypes
coerceArgumentsToClasses, correctArguments, getNativeParameterTypes, getPT, getParameterTypes, isValidExactMethod, isValidExactMethod, isValidMethod, isValidMethod, isVargsMethod, isVargsMethod, setParametersTypes
 
Methods inherited from class java.lang.Object
java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()
 

Constructor Detail

MetaMethod

public MetaMethod()


MetaMethod

public MetaMethod(java.lang.Class[] pt)


 
Method Detail

checkParameters

public void checkParameters(java.lang.Class[] arguments)
Checks that the given parameters are valid to call this method
throws:
IllegalArgumentException if the parameters are not valid
Parameters:
arguments - the arguments to check


clone

public java.lang.Object clone()


doMethodInvoke

public java.lang.Object doMethodInvoke(java.lang.Object object, java.lang.Object[] argumentArray)


equal

protected static boolean equal(CachedClass[] a, java.lang.Class[] b)


equal

protected static boolean equal(CachedClass[] a, CachedClass[] b)


getDeclaringClass

public CachedClass getDeclaringClass()


getDescriptor

public java.lang.String getDescriptor()


getModifiers

public int getModifiers()


getMopName

public java.lang.String getMopName()


getName

public java.lang.String getName()


getReturnType

public java.lang.Class getReturnType()


getSignature

public java.lang.String getSignature()


invoke

public java.lang.Object invoke(java.lang.Object object, java.lang.Object[] arguments)


isAbstract

public boolean isAbstract()


isCacheable

public boolean isCacheable()


isMethod

public boolean isMethod(MetaMethod method)


isPrivate

public final boolean isPrivate()


isProtected

public final boolean isProtected()


isPublic

public final boolean isPublic()


isSame

public final boolean isSame(MetaMethod method)
Parameters:
method - the method to compare against
Returns:
true if the given method has the same name, parameters, return type and modifiers but may be defined on another type


isStatic

public boolean isStatic()


processDoMethodInvokeException

public final java.lang.RuntimeException processDoMethodInvokeException(java.lang.Exception e, java.lang.Object object, java.lang.Object[] argumentArray)


toString

public java.lang.String toString()


 

Groovy Documentation