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