Package groovy.util
Class Expando
- java.lang.Object
- 
- groovy.lang.GroovyObjectSupport
- 
- groovy.util.Expando
 
 
- 
- All Implemented Interfaces:
- GroovyObject
 
 public class Expando extends GroovyObjectSupport Represents a dynamically expandable bean.
- 
- 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected MapcreateMap()Factory method to create a new Map used to store the expando properties mapbooleanequals(Object obj)This allows equals to be overridden by a closure field method attached to the expando object.ListgetMetaPropertyValues()MapgetProperties()ObjectgetProperty(String property)Retrieves a property value.inthashCode()This allows hashCode to be overridden by a closure field method attached to the expando object.ObjectinvokeMethod(String name, Object args)Invokes the given method.voidsetProperty(String property, Object newValue)Sets the given property to the new value.StringtoString()This allows toString to be overridden by a closure field method attached to the expando object.- 
Methods inherited from class groovy.lang.GroovyObjectSupportgetMetaClass, setMetaClass
 
- 
 
- 
- 
- 
Constructor Detail- 
Expandopublic Expando() 
 - 
Expandopublic Expando(Map expandoProperties) 
 
- 
 - 
Method Detail- 
getPropertiespublic Map getProperties() - Returns:
- the dynamically expanded properties
 
 - 
getMetaPropertyValuespublic List getMetaPropertyValues() 
 - 
getPropertypublic Object getProperty(String property) Description copied from interface:GroovyObjectRetrieves a property value.- Parameters:
- property- the name of the property of interest
- Returns:
- the given property
 
 - 
setPropertypublic void setProperty(String property, Object newValue) Description copied from interface:GroovyObjectSets the given property to the new value.- Parameters:
- property- the name of the property of interest
- newValue- the new value for the property
 
 - 
invokeMethodpublic Object invokeMethod(String name, Object args) Description copied from interface:GroovyObjectInvokes the given method.- Parameters:
- name- the name of the method to call
- args- the arguments to use for the method call
- Returns:
- the result of invoking the method
 
 - 
toStringpublic String toString() This allows toString to be overridden by a closure field method attached to the expando object.- Overrides:
- toStringin class- Object
- See Also:
- Object.toString()
 
 - 
equalspublic boolean equals(Object obj) This allows equals to be overridden by a closure field method attached to the expando object.- Overrides:
- equalsin class- Object
- See Also:
- Object.equals(java.lang.Object)
 
 - 
hashCodepublic int hashCode() This allows hashCode to be overridden by a closure field method attached to the expando object.- Overrides:
- hashCodein class- Object
- See Also:
- Object.hashCode()
 
 - 
createMapprotected Map createMap() Factory method to create a new Map used to store the expando properties map- Returns:
- a newly created Map implementation
 
 
- 
 
-