Groovy Documentation

## groovy.lang
[Java] Class MetaBeanProperty

    java.lang.Object
      groovy.lang.MetaProperty
          groovy.lang.MetaBeanProperty

    public class MetaBeanProperty
    extends MetaProperty

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

Authors:
  James Strachan
  Pilho Kim

Version:
  \$Revision\$

Field Summary

Fields inherited from class MetaProperty
PROPERTY_SET_PREFIX, name, type

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

Method Summary
`CachedField` | `getField()`
`MetaMethod` | `getGetter()` Get the getter method.
`int` | `getModifiers()`
`java.lang.Object` | `getProperty(java.lang.Object object)` Get the property of the given object.
`MetaMethod` | `getSetter()` Get the setter method.
`void` | `setField(CachedField f)`
`void` | `setProperty(java.lang.Object object, java.lang.Object newValue)` Set the property on the given object to the new value.

Methods inherited from class MetaProperty
getGetterName, getModifiers, getName, getProperty, getSetterName, getType, setProperty

Methods inherited from class java.lang.Object
java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()

Constructor Detail

### MetaBeanProperty

    public MetaBeanProperty(java.lang.String name, java.lang.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 java.lang.Object getProperty(java.lang.Object object)

  Get the property of the given object.
  throws:
    RuntimeException if the property could not be evaluated
  Parameters:
    `object` - which to be got
  Returns:
    the property of the given object

### getSetter

    public MetaMethod getSetter()

  Get the setter method.

### setField

    public void setField(CachedField f)

### setProperty

    public void setProperty(java.lang.Object object, java.lang.Object newValue)

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

Groovy Documentation