Groovy 2.2.1

groovy.lang
[Java] Class MetaMethod

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

public abstract class MetaMethod
extends ParameterTypes

Represents a Method on a Java object a little like 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(Class[] pt)

 
Method Summary
void checkParameters(Class[] arguments)

Checks that the given parameters are valid to call this method

Object clone()

Object doMethodInvoke(Object object, Object[] argumentArray)

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

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

CachedClass getDeclaringClass()

String getDescriptor()

int getModifiers()

String getMopName()

String getName()

Class getReturnType()

String getSignature()

Object invoke(Object object, 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()

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

String toString()

 
Methods inherited from class ParameterTypes
coerceArgumentsToClasses, correctArguments, getNativeParameterTypes, getPT, getParameterTypes, isValidExactMethod, isValidExactMethod, isValidMethod, isValidMethod, isVargsMethod, isVargsMethod, setParametersTypes
 
Methods inherited from class Object
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll
 

Constructor Detail

MetaMethod

public MetaMethod()


MetaMethod

public MetaMethod(Class[] pt)


 
Method Detail

checkParameters

public void checkParameters(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 Object clone()


doMethodInvoke

public Object doMethodInvoke(Object object, Object[] argumentArray)


equal

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


equal

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


getDeclaringClass

public CachedClass getDeclaringClass()


getDescriptor

public String getDescriptor()


getModifiers

public int getModifiers()


getMopName

public String getMopName()


getName

public String getName()


getReturnType

public Class getReturnType()


getSignature

public String getSignature()


invoke

public Object invoke(Object object, 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 RuntimeException processDoMethodInvokeException(Exception e, Object object, Object[] argumentArray)


toString

public String toString()


 

Copyright © 2003-2013 The Codehaus. All rights reserved.