edu.rice.cs.drjava.config
Class FileProperty

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

public class FileProperty
extends DrJavaProperty

Property that evaluates to a file 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
protected  Thunk<File> _getFile
           
 
Fields inherited from class edu.rice.cs.drjava.config.DrJavaProperty
_attributes, _help, _isCurrent, _listening, _name, _value, DEACTIVATED_DUE_TO_ERROR
 
Constructor Summary
FileProperty(String name, Thunk<File> getFile, String help)
          Create an eager file 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.
 void resetAttributes()
          Reset attributes to their defaults.
 String toString()
          Return the value.
 void update(PropertyMaps pm)
          Update the value of the property.
 
Methods inherited from class edu.rice.cs.drjava.config.DrJavaProperty
_invalidate, equals, getAttribute, getHelp, getLazy, getName, hashCode, invalidateOthers, listenToInvalidatesOf, setAttribute, setAttributes
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

_getFile

protected Thunk<File> _getFile
Constructor Detail

FileProperty

public FileProperty(String name,
                    Thunk<File> getFile,
                    String help)
Create an eager file property.

Method Detail

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 DrJavaProperty

invalidate

public void invalidate()
Mark the value as stale.

Overrides:
invalidate in class DrJavaProperty

update

public void update(PropertyMaps pm)
Update the value of the property.

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

resetAttributes

public void resetAttributes()
Description copied from class: DrJavaProperty
Reset attributes to their defaults. Should be overridden by properties that use attributes.

Overrides:
resetAttributes in class DrJavaProperty