|
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
A Reader is an object that reads then parses a GenericFile
,
returning a CompilationUnit
. Iff problems arise, errors
will be reported via ErrorSet
and then
null
will be returned.
Readers may or may not cache the results of their reading.
The class CachedReader
can be used to turn a noncaching
Reader into a caching Reader.
Constructor Summary | |
Reader()
|
Method Summary | |
abstract CompilationUnit |
read(GenericFile target,
boolean avoidSpec)
Attempt to read and parse a CompilationUnit from target. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Reader()
Method Detail |
public abstract 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 attempt to return a non-spec, although this may not always be possible.
The result of this function may or may not be cached.
If it is cached, then only the value of avoidSpec used the first time a given file is read is used. This may result in a spec being returned unnecessarily when avoidSpec is true.
Target must be non-null.
target
- The source to be readavoidSpec
- If true, then bodies are parsed as well, if possible;
if false, no method bodies are parsed.
|
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 |