public class GroovyObjectWrapper
extends Wrapper
Wraps an existing GroovyObject while constraining the type it should present to the runtime.
| Modifiers | Name | Description |
|---|---|---|
protected GroovyObject |
wrapped |
The wrapped Groovy object. |
| Fields inherited from class | Fields |
|---|---|
class Wrapper |
constrainedType |
| Constructor and description |
|---|
GroovyObjectWrapper(GroovyObject wrapped, Class constrainedType)Creates a wrapper for a Groovy object constrained to the supplied type. |
| Type Params | Return Type | Name and description |
|---|---|---|
|
protected MetaClass |
getDelegatedMetaClass()* Returns the meta class that should handle GroovyObject operations for the * wrapped value. * *
|
|
public Object |
getProperty(String property)Returns a property value from the wrapped Groovy object. |
|
protected Object |
getWrapped()* Returns the object used as the delegation target for meta-class-based * operations. * *
|
|
public Object |
invokeMethod(String name, Object args)Invokes a method on the wrapped Groovy object. |
|
public void |
setMetaClass(MetaClass metaClass)Updates the wrapped object's meta class. |
|
public void |
setProperty(String property, Object newValue)Sets a property on the wrapped Groovy object. |
|
public Object |
unwrap()* Returns the wrapped value. * *
|
| Methods inherited from class | Name |
|---|---|
class Wrapper |
getDelegatedMetaClass, getMetaClass, getType, getWrapped, unwrap |
The wrapped Groovy object.
Creates a wrapper for a Groovy object constrained to the supplied type.
wrapped - the wrapped Groovy objectconstrainedType - the type the wrapped object should report* Returns the meta class that should handle GroovyObject operations for the * wrapped value. * *
Returns a property value from the wrapped Groovy object.
property - the property name* Returns the object used as the delegation target for meta-class-based * operations. * *
Invokes a method on the wrapped Groovy object.
name - the method nameargs - the invocation argumentsUpdates the wrapped object's meta class.
metaClass - the new meta classSets a property on the wrapped Groovy object.
property - the property namenewValue - the new property value* Returns the wrapped value. * *
Copyright © 2003-2026 The Apache Software Foundation. All rights reserved.