groovy.model
Class ValueHolder
java.lang.Object
groovy.model.ValueHolder
- All Implemented Interfaces:
- ValueModel
public class ValueHolder
- extends java.lang.Object
- implements ValueModel
A simple ValueModel implementation which is a holder of an object value.
Used to share local variables with closures
- Version:
- $Revision: 7922 $
- Author:
- James Strachan
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
value
private java.lang.Object value
type
private final java.lang.Class type
propertyChangeSupport
private java.beans.PropertyChangeSupport propertyChangeSupport
editable
private boolean editable
ValueHolder
public ValueHolder()
ValueHolder
public ValueHolder(java.lang.Class type)
ValueHolder
public ValueHolder(java.lang.Object value)
addPropertyChangeListener
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
- Add a PropertyChangeListener to the listener list.
- Parameters:
listener
- The listener to add.
removePropertyChangeListener
public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
- Removes a PropertyChangeListener from the listener list.
- Parameters:
listener
- The listener to remove.
getValue
public java.lang.Object getValue()
- Specified by:
getValue
in interface ValueModel
setValue
public void setValue(java.lang.Object value)
- Specified by:
setValue
in interface ValueModel
getType
public java.lang.Class getType()
- Specified by:
getType
in interface ValueModel
isEditable
public boolean isEditable()
- Specified by:
isEditable
in interface ValueModel
setEditable
public void setEditable(boolean editable)
Copyright © ${year} The Codehaus. All Rights Reserved.