groovy.lang
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
- Version:
- $Revision: 1.3 $
- Author:
- James Strachan, Kim Pilho
Method Summary |
MetaMethod |
getGetter()
|
java.lang.Object |
getProperty(java.lang.Object object)
|
MetaMethod |
getSetter()
|
(package private) void |
setGetter(MetaMethod getter)
this is for MetaClass to patch up the object later when looking for get*() methods |
void |
setProperty(java.lang.Object object,
java.lang.Object newValue)
Sets the property on the given object to the new value |
(package private) void |
setSetter(MetaMethod setter)
this is for MetaClass to patch up the object later when looking for set*() methods |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
getter
private MetaMethod getter
setter
private MetaMethod setter
MetaBeanProperty
public MetaBeanProperty(java.lang.String name,
java.lang.Class type,
MetaMethod getter,
MetaMethod setter)
getProperty
public java.lang.Object getProperty(java.lang.Object object)
throws java.lang.Exception
- Specified by:
getProperty
in class MetaProperty
- Returns:
- the property of the given object
- Throws:
java.lang.Exception
- if the property could not be evaluated
setProperty
public void setProperty(java.lang.Object object,
java.lang.Object newValue)
- Sets the property on the given object to the new value
- Specified by:
setProperty
in class MetaProperty
- Parameters:
object
- on which to set the propertynewValue
- the new value of the property
- Throws:
java.lang.Exception
- if the property could not be set
getGetter
public MetaMethod getGetter()
getSetter
public MetaMethod getSetter()
setGetter
void setGetter(MetaMethod getter)
- this is for MetaClass to patch up the object later when looking for get*() methods
setSetter
void setSetter(MetaMethod setter)
- this is for MetaClass to patch up the object later when looking for set*() methods
Copyright © 2003-2005 The Codehaus. All Rights Reserved.