edu.vub.at.objects.natives
Class SAFWorkingDirectory

java.lang.Object
  extended byedu.vub.at.actors.natives.SharedActorField
      extended byedu.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

Field Summary
private  java.io.File workingDirectory_
           
 
Fields inherited from class edu.vub.at.actors.natives.SharedActorField
 
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 edu.vub.at.actors.natives.SharedActorField
getName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

workingDirectory_

private final java.io.File workingDirectory_
Constructor Detail

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)
Method Detail

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