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

public Class PojoWrapper

extends Wrapper
Class Inheritance
Known Direct Subclasses
org.codehaus.groovy.runtime.wrappers.ShortWrapper, org.codehaus.groovy.runtime.wrappers.BooleanWrapper, org.codehaus.groovy.runtime.wrappers.ByteWrapper, org.codehaus.groovy.runtime.wrappers.CharWrapper, org.codehaus.groovy.runtime.wrappers.DoubleWrapper, org.codehaus.groovy.runtime.wrappers.FloatWrapper, org.codehaus.groovy.runtime.wrappers.IntWrapper, org.codehaus.groovy.runtime.wrappers.LongWrapper
Imports
groovy.lang.MetaClass

Field Summary

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

Constructor Summary

AccessConstructor and Description
public
PojoWrapper(final Object 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
methodName
,
final Object
the arguments to use for the method call
arguments
)

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

delegateback to summary
protected MetaClass delegate
wrappedback to summary
protected final Object wrapped

Constructor Detail

PojoWrapperback to summary
public PojoWrapper(final Object 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 methodName, final Object arguments)

Overrides default groovy.lang.GroovyObject.invokeMethod.

Doc from groovy.lang.GroovyObject.invokeMethod.

Invokes the given method.

Parameters
methodName:String

the name of the method to call

arguments: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.