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

public Class GroovyObjectWrapper

extends Wrapper
Class Inheritance
Imports
groovy.lang.GroovyObject, .MetaClass

Field Summary

Modifier and TypeField and Description
protected final GroovyObject
Inherited from org.codehaus.groovy.runtime.wrappers.Wrapper:
constrainedType

Constructor Summary

AccessConstructor and Description
public
GroovyObjectWrapper(final GroovyObject wrapped, final Class<T> constrainedType)

Method Summary

Modifier and TypeMethod and Description
protected MetaClass
public Object
getProperty(final String
the name of the property of interest
property
)

Overrides default groovy.lang.GroovyObject.getProperty.

Retrieves a property value.
protected Object
public Object
invokeMethod(final String
the name of the method to call
name
,
final Object
the arguments to use for the method call
args
)

Overrides default groovy.lang.GroovyObject.invokeMethod.

Invokes the given method.
public void
setMetaClass(final MetaClass
the new metaclass
metaClass
)

Implements groovy.lang.GroovyObject.setMetaClass.

Allows the MetaClass to be replaced with a derived implementation.
public void
setProperty(final String
the name of the property of interest
property
,
final Object
the new value for the property
newValue
)

Overrides default groovy.lang.GroovyObject.setProperty.

Sets the given property to the new value.
public Object
Inherited from org.codehaus.groovy.runtime.wrappers.Wrapper:
getMetaClassgetType

Field Detail

wrappedback to summary
protected final GroovyObject wrapped

Constructor Detail

GroovyObjectWrapperback to summary
public GroovyObjectWrapper(final GroovyObject wrapped, final Class<T> constrainedType)

Method Detail

getDelegatedMetaClassback to summary
protected MetaClass getDelegatedMetaClass()

Implements abstract org.codehaus.groovy.runtime.wrappers.Wrapper.getDelegatedMetaClass.

getPropertyback to summary
public Object getProperty(final String property)

Overrides default groovy.lang.GroovyObject.getProperty.

Doc from groovy.lang.GroovyObject.getProperty.

Retrieves a property value.

Parameters
property:String

the name of the property of interest

Returns:Object

the given property

getWrappedback to summary
protected Object getWrapped()

Implements abstract org.codehaus.groovy.runtime.wrappers.Wrapper.getWrapped.

invokeMethodback to summary
public Object invokeMethod(final String name, final Object args)

Overrides default groovy.lang.GroovyObject.invokeMethod.

Doc from groovy.lang.GroovyObject.invokeMethod.

Invokes the given method.

Parameters
name:String

the name of the method to call

args:Object

the arguments to use for the method call

Returns:Object

the result of invoking the method

setMetaClassback to summary
public void setMetaClass(final MetaClass metaClass)

Implements groovy.lang.GroovyObject.setMetaClass.

Doc from groovy.lang.GroovyObject.setMetaClass.

Allows the MetaClass to be replaced with a derived implementation.

Parameters
metaClass:MetaClass

the new metaclass

setPropertyback to summary
public void setProperty(final String property, final Object newValue)

Overrides default groovy.lang.GroovyObject.setProperty.

Doc from groovy.lang.GroovyObject.setProperty.

Sets the given property to the new value.

Parameters
property:String

the name of the property of interest

newValue:Object

the new value for the property

unwrapback to summary
public Object unwrap()

Implements abstract org.codehaus.groovy.runtime.wrappers.Wrapper.unwrap.