Overview | Package | Class
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## groovy.lang
Class MetaBeanProperty

Represents a property on a bean which may have a getter and/or a setter

author:
  James Strachan

author:
  Pilho Kim

version:
  $Revision: 9750 $

Field Summary
`CachedField` | `field`
`MetaMethod` | `getter`
`MetaMethod` | `setter`

Constructor Summary
`MetaBeanProperty(String name, Class type, MetaMethod getter, MetaMethod setter)`

Method Summary
`CachedField` | `getField()`
`MetaMethod` | `getGetter()` Get the getter method.
`int` | `getModifiers()`
`Object` | `getProperty(Object object)` Get the property of the given object.
`MetaMethod` | `getSetter()` Get the setter method.
`void` | `setField(CachedField f)`
`void` | `setGetter(MetaMethod getter)` This is for MetaClass to patch up the object later when looking for get*() methods.
`void` | `setProperty(Object object, Object newValue)` Set the property on the given object to the new value.
`void` | `setSetter(MetaMethod setter)` This is for MetaClass to patch up the object later when looking for set*() methods.

Constructor Detail

### MetaBeanProperty

    public MetaBeanProperty(String name, Class type, MetaMethod getter, MetaMethod setter)

Method Detail

### getField

    public CachedField getField()

### getGetter

    public MetaMethod getGetter()

  Get the getter method.

### getModifiers

    public int getModifiers()

### getProperty

    public Object getProperty(Object object)

  Get the property of the given object.
  param:
    object which to be got
  return:
    the property of the given object
  throws:
    Exception if the property could not be evaluated

### getSetter

    public MetaMethod getSetter()

  Get the setter method.

### setField

    public void setField(CachedField f)

### setGetter

    public void setGetter(MetaMethod getter)

  This is for MetaClass to patch up the object later when looking for get*() methods.

### setProperty

    public void setProperty(Object object, Object newValue)

  Set the property on the given object to the new value.
  param:
    object on which to set the property
  param:
    newValue the new value of the property
  throws:
    RuntimeException if the property could not be set

### setSetter

    public void setSetter(MetaMethod setter)

  This is for MetaClass to patch up the object later when looking for set*() methods.