Groovy Documentation

groovy.model
[Java] Class ValueHolder

java.lang.Object
  groovy.model.ValueHolder
All Implemented Interfaces:
ValueModel

public class ValueHolder

A simple ValueModel implementation which is a holder of an object value. Used to share local variables with closures

Authors:
James Strachan
Version:
\$Revision\$


Constructor Summary
ValueHolder()

ValueHolder(java.lang.Class type)

ValueHolder(java.lang.Object value)

 
Method Summary
void addPropertyChangeListener(java.beans.PropertyChangeListener listener)

Add a PropertyChangeListener to the listener list.

java.lang.Class getType()

java.lang.Object getValue()

boolean isEditable()

void removePropertyChangeListener(java.beans.PropertyChangeListener listener)

Removes a PropertyChangeListener from the listener list.

void setEditable(boolean editable)

void setValue(java.lang.Object value)

 
Methods inherited from class java.lang.Object
java.lang.Object#wait(long, int), java.lang.Object#wait(long), 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

ValueHolder

public ValueHolder()


ValueHolder

public ValueHolder(java.lang.Class type)


ValueHolder

public ValueHolder(java.lang.Object value)


 
Method Detail

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Add a PropertyChangeListener to the listener list.
Parameters:
listener - The listener to add.


getType

public java.lang.Class getType()


getValue

public java.lang.Object getValue()


isEditable

public boolean isEditable()


removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Removes a PropertyChangeListener from the listener list.
Parameters:
listener - The listener to remove.


setEditable

public void setEditable(boolean editable)


setValue

public void setValue(java.lang.Object value)


 

Groovy Documentation