public class Expando extends GroovyObjectSupport
Constructor and Description |
---|
Expando() |
Expando(Map expandoProperties) |
Modifier and Type | Method and Description |
---|---|
protected Map |
createMap()
Factory method to create a new Map used to store the expando properties map
|
boolean |
equals(Object obj)
This allows equals to be overridden by a closure field method attached
to the expando object.
|
List |
getMetaPropertyValues() |
Map |
getProperties() |
Object |
getProperty(String property)
Retrieves a property value.
|
int |
hashCode()
This allows hashCode to be overridden by a closure field method attached
to the expando object.
|
Object |
invokeMethod(String name,
Object args)
Invokes the given method.
|
void |
setProperty(String property,
Object newValue)
Sets the given property to the new value.
|
String |
toString()
This allows toString to be overridden by a closure field method attached
to the expando object.
|
getMetaClass, setMetaClass
public Expando()
public Expando(Map expandoProperties)
public Map getProperties()
public List getMetaPropertyValues()
public Object getProperty(String property)
GroovyObject
getProperty
in interface GroovyObject
getProperty
in class GroovyObjectSupport
property
- the name of the property of interestpublic void setProperty(String property, Object newValue)
GroovyObject
setProperty
in interface GroovyObject
setProperty
in class GroovyObjectSupport
property
- the name of the property of interestnewValue
- the new value for the propertypublic Object invokeMethod(String name, Object args)
GroovyObject
invokeMethod
in interface GroovyObject
invokeMethod
in class GroovyObjectSupport
name
- the name of the method to callargs
- the arguments to use for the method callpublic String toString()
toString
in class Object
Object.toString()
public boolean equals(Object obj)
equals
in class Object
Object.equals(java.lang.Object)
public int hashCode()
hashCode
in class Object
Object.hashCode()
protected Map createMap()