GroovyObjectBooleanWrapper, ByteWrapper, CharWrapper, DoubleWrapper, FloatWrapper, IntWrapper, LongWrapper, ShortWrapperpublic class PojoWrapper extends Wrapper
| Modifier and Type | Field | Description |
|---|---|---|
protected MetaClass |
delegate |
|
protected Object |
wrapped |
constrainedType| Constructor | Description |
|---|---|
PojoWrapper(Object wrapped,
Class constrainedType) |
| Modifier and Type | Method | Description |
|---|---|---|
protected MetaClass |
getDelegatedMetaClass() |
|
Object |
getProperty(String property) |
Retrieves a property value.
|
protected Object |
getWrapped() |
|
Object |
invokeMethod(String methodName,
Object arguments) |
Invokes the given method.
|
void |
setMetaClass(MetaClass metaClass) |
Allows the MetaClass to be replaced with a derived implementation.
|
void |
setProperty(String property,
Object newValue) |
Sets the given property to the new value.
|
Object |
unwrap() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetMetaClass, getTypepublic Object getProperty(String property)
GroovyObjectproperty - the name of the property of interestpublic Object invokeMethod(String methodName, Object arguments)
GroovyObjectmethodName - the name of the method to callarguments - the arguments to use for the method callpublic void setMetaClass(MetaClass metaClass)
GroovyObjectmetaClass - the new metaclasspublic void setProperty(String property, Object newValue)
GroovyObjectproperty - the name of the property of interestnewValue - the new value for the propertyprotected Object getWrapped()
getWrapped in class Wrapperprotected MetaClass getDelegatedMetaClass()
getDelegatedMetaClass in class Wrapper