|
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.Tool
javafe.FrontEndTool
javafe.SrcTool
SrcTool
is an abstract class for tools that use
our Java front end to process the CompilationUnit
s
found in source files.
It adds to FrontEndTool
code for processing a series of
source files specified on the command line.
If processRecursively is set, then files are processed
recursively. (I.e., files loaded in the course of processing one
file are also processed.)
The remaining processing, if any, is front-end-tool specific.
Field Summary | |
java.util.Vector |
loaded
A list of all the CompilationUnit s we have loaded
so far. |
Fields inherited from class javafe.FrontEndTool |
compositeClassPath, compositeSourcePath |
Fields inherited from class javafe.Tool |
badUsageExitCode, errorExitCode, okExitCode, options, outOfMemoryExitCode |
Constructor Summary | |
SrcTool()
|
Method Summary | |
void |
frontEndToolProcessing(java.util.ArrayList args)
Main processing loop for SrcTool . |
void |
handleAllCUs()
Iterates, calling handleCU for each loaded CU. |
void |
handleCU(CompilationUnit cu)
This method is called on each CompilationUnit
that this tool processes. |
void |
handleTD(TypeDecl td)
This method is called on the TypeDecl of each outside type that SrcTool is to process. |
void |
loadAllFiles(java.util.ArrayList args)
* SrcTool-instance specific processing: * * |
void |
loadInputEntry(InputEntry ie)
|
Options |
makeOptions()
* Main processing code: * * |
void |
notify(CompilationUnit justLoaded)
Add a CompilationUnit to loaded . |
private static SrcToolOptions |
options()
|
void |
postload()
Called for any work after loading files |
void |
postprocess()
Hook for any work needed after handleCU has been called
on each CompilationUnit to process them. |
void |
preload()
Hook for any work needed before any files are loaded. |
void |
preprocess()
Hook for any work needed after files are loaded but before handleCU is called
on each CompilationUnit to process them. |
java.util.ArrayList |
resolveInputEntry(InputEntry iee)
|
java.util.ArrayList |
resolveList(java.lang.String argumentFileName)
|
Methods inherited from class javafe.FrontEndTool |
clear, handleOptions, main, makePragmaParser, makePrettyPrint, makeStandardTypeReader, makeTypeCheck, processOptions, run, setup, setupPaths |
Methods inherited from class javafe.Tool |
badOptionUsage, currentTime, name, spaceUsed, timeUsed, usage |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public java.util.Vector loaded
CompilationUnit
s we have loaded
so far. This list is extended automatically at the end as new
CompilationUnit
s are loaded using notification from
OutsideEnv
.
Constructor Detail |
public SrcTool()
Method Detail |
public void notify(CompilationUnit justLoaded)
CompilationUnit
to loaded
.
This should only be called by OutsideEnv
using the
Listener
interface.
notify
in interface Listener
public Options makeOptions()
makeOptions
in class FrontEndTool
private static SrcToolOptions options()
public void frontEndToolProcessing(java.util.ArrayList args)
SrcTool
.
The remaining arguments are args[offset]
,
args[offset+1]
, ...
This method calls preload, loadAllFiles, postload, preprocess, handleAllCU, postprocess.
frontEndToolProcessing
in class FrontEndTool
public void loadAllFiles(java.util.ArrayList args)
public java.util.ArrayList resolveInputEntry(InputEntry iee)
public void loadInputEntry(InputEntry ie)
public java.util.ArrayList resolveList(java.lang.String argumentFileName)
public void handleAllCUs()
public void preload()
public void postload()
public void preprocess()
handleCU
is called
on each CompilationUnit
to process them.
public void postprocess()
handleCU
has been called
on each CompilationUnit
to process them.
public void handleCU(CompilationUnit cu)
CompilationUnit
that this tool processes.
The default implementation is simply to call
handleTD
on each TypeDecl
present in
cu. It is intended that subclassers override this method.
public void handleTD(TypeDecl td)
|
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 |