edu.vub.at.objects.natives
Class SAFWorkingDirectory
java.lang.Object
edu.vub.at.actors.natives.SharedActorField
edu.vub.at.objects.natives.SAFWorkingDirectory
- public class SAFWorkingDirectory
- extends SharedActorField
SAFWorkingDirectory initialises the field "~" to the current directory, allowing a file to
refer to its peers using a relative id.
- Author:
- smostinc
Constructor Summary |
SAFWorkingDirectory()
Default constructor: when no working directory can be derived, use the directory from which
the (java) virtual machine was started. |
SAFWorkingDirectory(java.io.File path)
|
Method Summary |
ATObject |
initialize()
Hook to be overridden in order to initialize the field which should be installed in every
actor's lexical root object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
workingDirectory_
private final java.io.File workingDirectory_
SAFWorkingDirectory
public SAFWorkingDirectory()
- Default constructor: when no working directory can be derived, use the directory from which
the (java) virtual machine was started.
SAFWorkingDirectory
public SAFWorkingDirectory(java.io.File path)
initialize
public ATObject initialize()
throws InterpreterException
- Description copied from class:
SharedActorField
- Hook to be overridden in order to initialize the field which should be installed in every
actor's lexical root object. The method is executed by the thread of the newly created
actor, which can thus be accessed using ELActor.currentActor().
NOTE: if the return value is null, the field will not be added to the lexical root.
- Specified by:
initialize
in class SharedActorField
- Returns:
- the object to be assigned to the field with the specified name in the current actor's lexical root
- Throws:
InterpreterException