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
|
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.lang.String name)
throws java.io.IOException
FileSource
public FileSource(java.lang.String name,
boolean userSpecified)
throws java.io.IOException
FileSource
public FileSource(java.io.File file)
FileSource
public FileSource(java.io.File file,
boolean userSpecified)
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