Class MixinInstanceMetaMethod
java.lang.Object
org.codehaus.groovy.reflection.ParameterTypes
groovy.lang.MetaMethod
org.codehaus.groovy.runtime.metaclass.MixinInstanceMetaMethod
- All Implemented Interfaces:
MetaMember,Cloneable
MetaMethod for mixed in classes.
This method delegates to the underlying method on the mixin instance.
-
Field Summary
Fields inherited from class groovy.lang.MetaMethod
EMPTY_ARRAY -
Constructor Summary
ConstructorsConstructorDescriptionMixinInstanceMetaMethod(MetaMethod method, MixinInMetaClass mixinInMetaClass) Constructs a new MixinInstanceMetaMethod. -
Method Summary
Modifier and TypeMethodDescriptionReturns the class that declares this mixin method.intReturns the modifiers of the underlying metamethod.getName()Returns the name of the underlying metamethod.protected Class[]getPT()Protected method subclasses override to provide parameter types.Returns the return type of the underlying metamethod.Invokes the underlying method on the mixin instance associated with the given object.Methods inherited from class groovy.lang.MetaMethod
checkParameters, clone, doMethodInvoke, equal, equal, getDescriptor, getMopName, getSignature, isAbstract, isCacheable, isDefault, isMethod, isSame, processDoMethodInvokeException, toStringMethods inherited from class org.codehaus.groovy.reflection.ParameterTypes
coerceArgumentsToClasses, correctArguments, getNativeParameterTypes, getParameterTypes, isValidExactMethod, isValidExactMethod, isValidMethod, isValidMethod, isVargsMethod, isVargsMethod, setParametersTypesMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface groovy.lang.MetaMember
isFinal, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic, isSynthetic
-
Constructor Details
-
MixinInstanceMetaMethod
Constructs a new MixinInstanceMetaMethod.- Parameters:
method- the underlying metamethod from the mixinmixinInMetaClass- the mixin metadata
-
-
Method Details
-
getModifiers
public int getModifiers()Returns the modifiers of the underlying metamethod.- Specified by:
getModifiersin interfaceMetaMember- Specified by:
getModifiersin classMetaMethod- Returns:
- the method modifiers
-
getName
Returns the name of the underlying metamethod.- Specified by:
getNamein interfaceMetaMember- Specified by:
getNamein classMetaMethod- Returns:
- the method name
-
getReturnType
Returns the return type of the underlying metamethod.- Specified by:
getReturnTypein classMetaMethod- Returns:
- the return type
-
getDeclaringClass
Returns the class that declares this mixin method.- Specified by:
getDeclaringClassin classMetaMethod- Returns:
- the declaring class (from the mixin)
-
invoke
Invokes the underlying method on the mixin instance associated with the given object.- Specified by:
invokein classMetaMethod- Parameters:
object- the object to invoke the method onarguments- the method arguments- Returns:
- the method return value
-
getPT
Description copied from class:ParameterTypesProtected method subclasses override to provide parameter types. Default implementation throwsUnsupportedOperationException.- Overrides:
getPTin classParameterTypes- Returns:
- the native parameter class array
-