Top Fields Constructors Methods
org.codehaus.groovy.runtime.metaclass

public Class MixedInMetaClass

extends OwnedMetaClass
Class Inheritance
Imports
groovy.lang.GroovySystem, .MetaClass, org.codehaus.groovy.runtime.InvokerHelper, .MetaClassHelper, java.lang.ref.WeakReference

Field Summary

Modifier and TypeField and Description
private final WeakReference<T>

Constructor Summary

AccessConstructor and Description
public
MixedInMetaClass(Object instance, Object owner)

Method Summary

Modifier and TypeMethod and Description
protected Object
protected MetaClass
public Object
invokeMethod(Class<T>
The java.lang.Class instance that invoked the method
sender
,
Object
The object which the method was invoked on
receiver
,
String
The name of the method
methodName
,
Object[]
The arguments to the method
arguments
,
boolean
Whether the method is a call to a super class method
isCallToSuper
,
boolean
Whether the call was invoked from the inside or the outside of the class
fromInsideClass
)

Overrides org.codehaus.groovy.runtime.metaclass.OwnedMetaClass.invokeMethod.

Implements groovy.lang.MetaClass.invokeMethod.

Invokes a method on the given receiver for the specified arguments.

Inherited from org.codehaus.groovy.runtime.metaclass.OwnedMetaClass:
equalsgetAttributegetAttributegetClassNodegetMetaMethodgetMetaMethodgetMetaMethodsgetMetaPropertygetMethodsgetPropertiesgetPropertygetPropertygetStaticMetaMethodgetStaticMetaMethodgetTheClasshashCodehasPropertyinvokeConstructorinvokeMethodinvokeMethodinvokeMissingMethodinvokeMissingPropertyinvokeStaticMethodisGroovyObjectrespondsTorespondsToselectConstructorAndTransformArgumentssetAttributesetAttributesetPropertysetPropertytoString

Field Detail

ownerback to summary
private final WeakReference<T> owner

Constructor Detail

MixedInMetaClassback to summary
public MixedInMetaClass(Object instance, Object owner)

Method Detail

getOwnerback to summary
protected Object getOwner()

Implements abstract org.codehaus.groovy.runtime.metaclass.OwnedMetaClass.getOwner.

getOwnerMetaClassback to summary
protected MetaClass getOwnerMetaClass(Object owner)

Implements abstract org.codehaus.groovy.runtime.metaclass.OwnedMetaClass.getOwnerMetaClass.

invokeMethodback to summary
public Object invokeMethod(Class<T> sender, Object receiver, String methodName, Object[] arguments, boolean isCallToSuper, boolean fromInsideClass)

Overrides org.codehaus.groovy.runtime.metaclass.OwnedMetaClass.invokeMethod.

Implements groovy.lang.MetaClass.invokeMethod.

Doc from groovy.lang.MetaClass.invokeMethod.

Invokes a method on the given receiver for the specified arguments. The sender is the class that invoked the method on the object. The MetaClass will attempt to establish the method to invoke based on the name and arguments provided.

The isCallToSuper and fromInsideClass help the Groovy runtime perform optimisations on the call to go directly to the super class if necessary

Parameters
sender:Class<T>

The java.lang.Class instance that invoked the method

receiver:Object

The object which the method was invoked on

methodName:String

The name of the method

arguments:Object[]

The arguments to the method

isCallToSuper:boolean

Whether the method is a call to a super class method

fromInsideClass:boolean

Whether the call was invoked from the inside or the outside of the class

Returns:Object

The return value of the method