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