polyglot.frontend
Class FileSource

java.lang.Object
  extended by polyglot.frontend.Source
      extended by polyglot.frontend.FileSource

public class FileSource
extends Source

A Source represents a source file.


Field Summary
protected  java.io.File file
           
protected  java.io.FileReader reader
           
 
Fields inherited from class polyglot.frontend.Source
lastModified, name, path, userSpecified
 
Constructor Summary
FileSource(java.io.File file)
           
FileSource(java.io.File file, boolean userSpecified)
           
 
Method Summary
 void close()
          Close the source file.
 boolean equals(java.lang.Object o)
           
 int hashCode()
           
 java.io.Reader open()
          Open the source file.
 java.lang.String toString()
           
 
Methods inherited from class polyglot.frontend.Source
lastModified, name, path, setUserSpecified, userSpecified
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

file

protected final java.io.File file

reader

protected java.io.FileReader reader
Constructor Detail

FileSource

public FileSource(java.io.File file)
           throws java.io.IOException
Throws:
java.io.IOException

FileSource

public FileSource(java.io.File file,
                  boolean userSpecified)
           throws java.io.IOException
Throws:
java.io.IOException
Method Detail

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class Source

hashCode

public int hashCode()
Overrides:
hashCode in class Source

open

public java.io.Reader open()
                    throws java.io.IOException
Open the source file.

Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
Close the source file.

Throws:
java.io.IOException

toString

public java.lang.String toString()
Overrides:
toString in class Source