|
ESC/Java2 © 2003,2004,2005,2006 David Cok and Joseph Kiniry © 2005,2006 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.TypeReader
javafe.reader.StandardTypeReader
escjava.reader.EscTypeReader
An EscTypeReader is a StandardTypeReader
extended to understand ".spec" files.
| Field Summary | |
(package private) java.lang.String[] |
activeSuffixes
|
(package private) java.lang.String[] |
nonJavaSuffixes
|
| Fields inherited from class javafe.reader.StandardTypeReader |
binaryReader, javaFileSpace, javaSrcFileSpace, sourceReader |
| Constructor Summary | |
protected |
EscTypeReader(Query engine,
Query srcEngine,
CachedReader srcReader,
CachedReader binReader)
Create an ESCTypeReader from a query engine, a
source reader, and a binary reader. |
| Method Summary | |
(package private) boolean |
containsSpecOnly(CompilationUnit cu)
Does a CompilationUnit contain a specOnly TypeDecl? |
boolean |
exists(java.lang.String[] P,
java.lang.String T)
Return true iff the fully-qualified outside type P.T exists. |
java.io.FilenameFilter |
filter()
|
GenericFile |
findBinFile(java.lang.String[] P,
java.lang.String filename)
|
GenericFile |
findFirst(java.lang.String[] P,
java.lang.String T)
|
GenericFile |
findSrcFile(java.lang.String[] P,
java.lang.String filename)
|
GenericFile |
findType(java.lang.String[] P,
java.lang.String T)
Returns a (source or binary) file for the given type. |
static void |
main(java.lang.String[] args)
|
static StandardTypeReader |
make()
Create a EscTypeReader using the default Java
classpath for our underlying Java file space and no pragma
parser.
|
static StandardTypeReader |
make(PragmaParser pragmaP)
Create a EscTypeReader using a the default Java
classpath for our underlying Java file space and a given pragma
parser.
|
static StandardTypeReader |
make(Query engine,
Query srcEngine,
CachedReader srcReader,
CachedReader binReader)
Create a EscTypeReader from a query engine, a
source reader, and a binary reader. |
static StandardTypeReader |
make(Query Q,
Query sourceQ,
PragmaParser pragmaP,
AnnotationHandler ah)
Create a EscTypeReader from a non-null query
engine and a pragma parser. |
static StandardTypeReader |
make(java.lang.String classPath,
java.lang.String srcPath,
PragmaParser pragmaP,
AnnotationHandler ah)
Create a EscTypeReader using a given Java
classpath for our underlying Java file space and a given pragma
parser. |
CompilationUnit |
read(GenericFile f,
boolean avoidSpec)
Attempt to read and parse a CompilationUnit from
|
CompilationUnit |
read(java.lang.String[] P,
java.lang.String T,
boolean avoidSpec)
Override StandardTypeReader.read(String[], String, boolean)
method to include ".spec" files. |
| Methods inherited from class javafe.reader.StandardTypeReader |
accessable, clear, findFiles, locateBinary, locateSource, make, make, make, queryFromClasspath, readTypeBinaries, readTypeSrc |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
java.lang.String[] activeSuffixes
java.lang.String[] nonJavaSuffixes
| Constructor Detail |
protected EscTypeReader(Query engine,
Query srcEngine,
CachedReader srcReader,
CachedReader binReader)
ESCTypeReader from a query engine, a
source reader, and a binary reader. All arguments must be
non-null.
| Method Detail |
public static StandardTypeReader make(Query engine,
Query srcEngine,
CachedReader srcReader,
CachedReader binReader)
EscTypeReader from a query engine, a
source reader, and a binary reader. All arguments must be
non-null.
public static StandardTypeReader make(Query Q,
Query sourceQ,
PragmaParser pragmaP,
AnnotationHandler ah)
EscTypeReader from a non-null query
engine and a pragma parser. The pragma parser may be null.
public static StandardTypeReader make(java.lang.String classPath,
java.lang.String srcPath,
PragmaParser pragmaP,
AnnotationHandler ah)
EscTypeReader using a given Java
classpath for our underlying Java file space and a given pragma
parser. If the given path is null, the default Java classpath
is used.
A fatal error will be reported via ErrorSet if
an I/O error occurs while initially scanning the filesystem.
public static StandardTypeReader make(PragmaParser pragmaP)
EscTypeReader using a the default Java
classpath for our underlying Java file space and a given pragma
parser.
A fatal error will be reported via ErrorSet if
an I/O error occurs while initially scanning the filesystem.
public static StandardTypeReader make()
EscTypeReader using the default Java
classpath for our underlying Java file space and no pragma
parser.
A fatal error will be reported via ErrorSet if
an I/O error occurs while initially scanning the filesystem.
public boolean exists(java.lang.String[] P,
java.lang.String T)
exists in class StandardTypeReader
public GenericFile findFirst(java.lang.String[] P,
java.lang.String T)
public GenericFile findSrcFile(java.lang.String[] P,
java.lang.String filename)
public GenericFile findBinFile(java.lang.String[] P,
java.lang.String filename)
public GenericFile findType(java.lang.String[] P,
java.lang.String T)
TypeReader
findType in class StandardTypeReaderpublic java.io.FilenameFilter filter()
filter in class StandardTypeReader
public CompilationUnit read(GenericFile f,
boolean avoidSpec)
StandardTypeReaderCompilationUnit from
ErrorSet. Null is returned iff an error
was encountered.
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 return a non-spec, except in the case where we have
previously read in the same source file with
avoidSpec false. (See notes on caching below.)
There are 2 safe ways to ensure source files yield non-spec
files: (1) always use avoidSpec, or (2) read all
desired non-spec's at the beginning with avoidSpec
set. [these instructions apply to both versions of read.]
The result of this function is cached. Note that StandardTypeReader.read(String[], String, boolean) may implicitly call this
function, resulting in caching of source files.
Only the value of avoidSpec used the first time
a given file is read is used (including implicit calls). This
may result in a spec being returned unnecessarily when
avoidSpec is true.
Target must be non-null.
read in class StandardTypeReader
public CompilationUnit read(java.lang.String[] P,
java.lang.String T,
boolean avoidSpec)
StandardTypeReader.read(String[], String, boolean)
method to include ".spec" files.
read in class StandardTypeReaderboolean containsSpecOnly(CompilationUnit cu)
public static void main(java.lang.String[] args)
throws java.io.IOException
java.io.IOException
|
ESC/Java2 © 2003,2004,2005,2006 David Cok and Joseph Kiniry © 2005,2006 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 | ||||||||||