edu.rice.cs.drjava.config
Class ConstantProperty

java.lang.Object
  extended by edu.rice.cs.drjava.config.DrJavaProperty
      extended by edu.rice.cs.drjava.config.EagerProperty
          extended by edu.rice.cs.drjava.config.ConstantProperty
All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
VariableProperty

public class ConstantProperty
extends EagerProperty

Class representing values that are constant and that can be inserted as variables in external processes.

Version:
$Id$

Nested Class Summary
 
Nested classes/interfaces inherited from class edu.rice.cs.drjava.config.DrJavaProperty
DrJavaProperty.InfiniteLoopException
 
Field Summary
 
Fields inherited from class edu.rice.cs.drjava.config.DrJavaProperty
_attributes, _help, _isCurrent, _listening, _name, _value, DEACTIVATED_DUE_TO_ERROR
 
Constructor Summary
ConstantProperty(String name, String value, String help)
          Create a constant property.
 
Method Summary
 String getCurrent(PropertyMaps pm)
          Return the value of the property.
 void invalidate()
          Mark the value as stale.
 boolean isCurrent()
          Return true if the value is current.
 String toString()
          Return the value.
 void update(PropertyMaps pm)
          Update the property so the value is current.
 
Methods inherited from class edu.rice.cs.drjava.config.EagerProperty
getLazy
 
Methods inherited from class edu.rice.cs.drjava.config.DrJavaProperty
_invalidate, equals, getAttribute, getHelp, getName, hashCode, invalidateOthers, listenToInvalidatesOf, resetAttributes, setAttribute, setAttributes
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConstantProperty

public ConstantProperty(String name,
                        String value,
                        String help)
Create a constant property.

Method Detail

update

public void update(PropertyMaps pm)
Update the property so the value is current.

Specified by:
update in class DrJavaProperty
Parameters:
pm - PropertyMaps used for substitution when replacing variables

getCurrent

public String getCurrent(PropertyMaps pm)
Return the value of the property. If it is not current, update first.

Overrides:
getCurrent in class DrJavaProperty
Parameters:
pm - PropertyMaps used for substitution when replacing variables

toString

public String toString()
Return the value.

Overrides:
toString in class DrJavaProperty

isCurrent

public boolean isCurrent()
Return true if the value is current.

Overrides:
isCurrent in class EagerProperty
Returns:
always false.

invalidate

public void invalidate()
Mark the value as stale.

Overrides:
invalidate in class DrJavaProperty