groovy.util
Class Expando

java.lang.Object
  extended by groovy.lang.GroovyObjectSupport
      extended by groovy.util.Expando
All Implemented Interfaces:
GroovyObject

public class Expando
extends GroovyObjectSupport

Represents a dynamically expandable bean.

Version:
$Revision: 4578 $
Author:
James Strachan, Hein Meling, Pilho Kim

Constructor Summary
Expando()
           
Expando(java.util.Map expandoProperties)
           
 
Method Summary
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)
           
 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.
 
Methods inherited from class groovy.lang.GroovyObjectSupport
getMetaClass, setMetaClass
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Expando

public Expando()

Expando

public Expando(java.util.Map expandoProperties)
Method Detail

getProperties

public java.util.Map getProperties()
Returns:
the dynamically expanded properties

getMetaPropertyValues

public java.util.List getMetaPropertyValues()

getProperty

public java.lang.Object getProperty(java.lang.String property)
Specified by:
getProperty in interface GroovyObject
Overrides:
getProperty in class GroovyObjectSupport
Returns:
the given property

setProperty

public void setProperty(java.lang.String property,
                        java.lang.Object newValue)
Description copied from interface: GroovyObject
Sets the given property to the new value

Specified by:
setProperty in interface GroovyObject
Overrides:
setProperty in class GroovyObjectSupport

invokeMethod

public java.lang.Object invokeMethod(java.lang.String name,
                                     java.lang.Object args)
Description copied from interface: GroovyObject
Invokes the given method

Specified by:
invokeMethod in interface GroovyObject
Overrides:
invokeMethod in class GroovyObjectSupport

toString

public java.lang.String toString()
This allows toString to be overridden by a closure field method attached to the expando object.

Overrides:
toString in class java.lang.Object
See Also:
Object.toString()

equals

public boolean equals(java.lang.Object obj)
This allows equals to be overridden by a closure field method attached to the expando object.

Overrides:
equals in class java.lang.Object
See Also:
Object.equals(java.lang.Object)

hashCode

public int hashCode()
This allows hashCode to be overridden by a closure field method attached to the expando object.

Overrides:
hashCode in class java.lang.Object
See Also:
Object.hashCode()

createMap

protected java.util.Map createMap()
Factory method to create a new Map used to store the expando properties map

Returns:
a newly created Map implementation


Copyright © 2003-2011 The Codehaus. All Rights Reserved.