|
ESC/Java2 © 2003,2004,2005 David Cok and Joseph Kiniry © 2005 UCD Dublin © 2003,2004 Radboud University Nijmegen © 1999,2000 Compaq Computer Corporation © 1997,1998,1999 Digital Equipment Corporation All Rights Reserved |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavafe.reader.Reader
javafe.reader.SrcReader
A SrcReader is a Reader
that reads in a CompilationUnit
from a source file (.java files) using the
javafe.parser
package.
SrcReaders do not cache the results of their reading.
Field Summary | |
private Lex |
readLex
* Creation: * * |
private Parse |
readParser
|
Constructor Summary | |
SrcReader()
|
|
SrcReader(PragmaParser p)
|
Method Summary | |
static void |
main(java.lang.String[] args)
* Test methods: * * |
CompilationUnit |
read(GenericFile target,
boolean avoidSpec)
Attempt to read and parse a CompilationUnit from *source* target. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private Lex readLex
private Parse readParser
Constructor Detail |
public SrcReader()
public SrcReader(PragmaParser p)
Method Detail |
public CompilationUnit read(GenericFile target, boolean avoidSpec)
By default, we attempt to read only a spec (e.g., specOnly is set in the resulting CompilationUnit) to save time. If avoidSpec is true, we always return a non-spec (if the file is a .java file).
The result of this function is not cached.
Target must be non-null.
read
in class Reader
target
- The source to be readavoidSpec
- If true, then bodies are parsed as well, if possible;
if false, no method bodies are parsed.
public static void main(java.lang.String[] args)
|
ESC/Java2 © 2003,2004,2005 David Cok and Joseph Kiniry © 2005 UCD Dublin © 2003,2004 Radboud University Nijmegen © 1999,2000 Compaq Computer Corporation © 1997,1998,1999 Digital Equipment Corporation All Rights Reserved |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |