Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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.

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

Constructor Summary
Constructor and Description
`Expando()`
`Expando(Map expandoProperties)`

Method Summary
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.

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(Map expandoProperties)

Method Detail

### getProperties

    public Map getProperties()

  Returns:
    the dynamically expanded properties

### getMetaPropertyValues

    public List getMetaPropertyValues()

### getProperty

    public Object getProperty(String property)

  Description copied from interface: `GroovyObject`
  Retrieves a property value.

  Specified by:
    `getProperty` in interface `GroovyObject`
  Overrides:
    `getProperty` in class `GroovyObjectSupport`
  Parameters:
    `property` - the name of the property of interest
  Returns:
    the given property

### setProperty

    public void setProperty(String property,
                            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`
  Parameters:
    `property` - the name of the property of interest
    `newValue` - the new value for the property

### invokeMethod

    public Object invokeMethod(String name,
                               Object args)

  Description copied from interface: `GroovyObject`
  Invokes the given method.

  Specified by:
    `invokeMethod` in interface `GroovyObject`
  Overrides:
    `invokeMethod` in class `GroovyObjectSupport`
  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

### toString

    public String toString()

  This allows toString to be overridden by a closure field method attached to the expando object.

  Overrides:
    `toString` in class `Object`
  See Also:
    `Object.toString()`

### equals

    public boolean equals(Object obj)

  This allows equals to be overridden by a closure field method attached to the expando object.

  Overrides:
    `equals` in class `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 `Object`
  See Also:
    `Object.hashCode()`

### createMap

    protected Map createMap()

  Factory method to create a new Map used to store the expando properties map

  Returns:
    a newly created Map implementation

Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright © 2003-2010 The Codehaus. All rights reserved.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD