groovy.lang
Class MetaProperty
java.lang.Object
groovy.lang.MetaProperty
- public class MetaProperty
- extends java.lang.Object
Represents a property on a bean which may have a getter and/or a setter
- Version:
- $Revision: 1.1 $
- Author:
- James Strachan
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MetaProperty
public MetaProperty(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
- 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)
throws java.lang.Exception
- Sets the property on the given object to the new value
- 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()
getName
public java.lang.String getName()
getSetter
public MetaMethod getSetter()
getType
public java.lang.Class getType()
- Returns:
- the type of the property
Copyright © 2003-2004 The Codehaus. All Rights Reserved.