psengines
Class ProgramLoader

java.lang.Object
  extended bypsengines.ProgramLoader

public class ProgramLoader
extends java.lang.Object

It describes the Program loader component of PS-View.

Program Loader is responsible the loading of the code and it's (run-time) clarifaction of what kind of components will use be. The Program Loader class uses the reflection mechanism to add dynamically new operators.


Constructor Summary
ProgramLoader(java.io.PipedWriter pw)
          Creates an instance of Program Loader.
ProgramLoader(java.lang.String fileName)
          Creates an instance of Program Loader.
 
Method Summary
 PSObject nextPSObject()
          Returns the next PSObject found in the stream.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProgramLoader

public ProgramLoader(java.lang.String fileName)
              throws java.io.FileNotFoundException
Creates an instance of Program Loader.

Precondition : A valid path to a PS file.
Postcondition : A new program loader will be created.


ProgramLoader

public ProgramLoader(java.io.PipedWriter pw)
Creates an instance of Program Loader.

Precondition : A valid pipe writer reference.
Postcondition : A new program loader will be created.

Method Detail

nextPSObject

public PSObject nextPSObject()
Returns the next PSObject found in the stream.

Precondition : A valid instance of program loader.
Postcondition : An instance of either a PSLiteral or a PSOperator.

Returns:
The next PSObject found in the stream.