|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--at.dms.compiler.Compiler
This class defines the common behaviour of all KOPI compilers.
Constructor Summary | |
protected |
Compiler()
Creates a new compiler instance. |
Method Summary | |
protected java.lang.String |
checkDestination(java.lang.String destination)
Checks if destination is absolute or relative to working directory. |
long |
getTimestamp()
Returns the timestamp of the compilation session, identifying it uniquely. |
void |
inform(Message message)
Write a message to the diagnostic output. |
void |
inform(MessageDescription description)
Write a message to the diagnostic output. |
void |
inform(MessageDescription description,
java.lang.Object parameter)
Write a message to the diagnostic output. |
void |
inform(MessageDescription description,
java.lang.Object[] parameters)
Write a message to the diagnostic output. |
void |
inform(MessageDescription description,
java.lang.Object parameter1,
java.lang.Object parameter2)
Write a message to the diagnostic output. |
void |
inform(PositionedError trouble)
Write a message to the diagnostic output. |
void |
inform(java.lang.Throwable trouble)
Write a message to the diagnostic output. |
abstract boolean |
parseComments()
Returns true iff comments should be parsed (false if to be skipped). |
abstract void |
reportTrouble(PositionedError trouble)
Reports a trouble (error or warning). |
abstract boolean |
run(java.lang.String[] args)
Runs a compilation session. |
boolean |
run(java.lang.String dir,
java.io.PrintWriter err,
java.lang.String[] args)
Runs a compilation session |
void |
setDebug(boolean debug)
Changes 'verbose debugging output' flag. |
void |
setErr(java.io.PrintStream err)
Sets the error stream. |
protected void |
setWorkingDirectory(java.lang.String dir)
Sets the directory where to search for source files. |
abstract boolean |
verboseMode()
Returns true iff compilation runs in verbose mode. |
java.util.List |
verifyFiles(java.util.List names)
Takes a the command-line list of source files, expands list files and and checks that each exists. |
Methods inherited from class java.lang.Object |
|
Constructor Detail |
protected Compiler()
Method Detail |
protected void setWorkingDirectory(java.lang.String dir)
dir
- the name of the directorypublic final long getTimestamp()
public void setErr(java.io.PrintStream err)
public void setDebug(boolean debug)
public java.util.List verifyFiles(java.util.List names) throws UnpositionedError
files
- A list of source files from the command line.UnpositionedError
- At least one file does not exist.protected java.lang.String checkDestination(java.lang.String destination)
public boolean run(java.lang.String dir, java.io.PrintWriter err, java.lang.String[] args)
dir
- the working directoryerr
- the diagnostic output streamargs
- the arguments to the compilerpublic abstract boolean run(java.lang.String[] args)
args
- the arguments to the compilerpublic abstract void reportTrouble(PositionedError trouble)
trouble
- a description of the trouble to report.public abstract boolean parseComments()
public abstract boolean verboseMode()
public void inform(java.lang.Throwable trouble)
trouble
- the error caught.public void inform(PositionedError trouble)
trouble
- the error caught.public void inform(Message message)
message
- the formatted messagepublic void inform(MessageDescription description, java.lang.Object[] parameters)
description
- the message description.parameters
- the array of parameters.public void inform(MessageDescription description, java.lang.Object parameter1, java.lang.Object parameter2)
description
- the message description.parameter1
- the first parameter.parameter2
- the second parameter.public void inform(MessageDescription description, java.lang.Object parameter)
description
- the message description.parameter
- the parameter.public void inform(MessageDescription description)
description
- the message description.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |