polyglot.frontend
Class FileSource
java.lang.Object
polyglot.frontend.Source
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
|
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 java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
file
protected final java.io.File file
reader
protected java.io.FileReader reader
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
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