|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectat.dms.compiler.Compiler
public abstract class Compiler
This class defines the common behaviour of all KOPI compilers.
| Constructor Summary | |
|---|---|
protected |
Compiler()
Creates a new compiler instance. |
| Method Summary | |
|---|---|
protected String |
checkDestination(String destination)
Checks if destination is absolute or relative to working directory. |
Object |
deepClone()
Returns a deep clone of this object. |
protected void |
deepCloneInto(Compiler other)
Clones all fields of this into |
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,
Object parameter)
Write a message to the diagnostic output. |
void |
inform(MessageDescription description,
Object[] parameters)
Write a message to the diagnostic output. |
void |
inform(MessageDescription description,
Object parameter1,
Object parameter2)
Write a message to the diagnostic output. |
void |
inform(PositionedError error)
Write a message to the diagnostic output. |
void |
inform(UnpositionedError error)
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(String[] args)
Runs a compilation session |
boolean |
run(String dir,
PrintWriter err,
String[] args)
Runs a compilation session |
protected void |
setWorkingDirectory(String dir)
Sets the directory where to search for source files. |
abstract boolean |
verboseMode()
Returns true iff compilation runs in verbose mode. |
File[] |
verifyFiles(String[] names)
Creates an array of files from the specified array of file names. |
Vector |
verifyFiles(Vector names)
Takes a vector of file names an checks that each exists. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected Compiler()
| Method Detail |
|---|
protected void setWorkingDirectory(String dir)
dir - the name of the directorypublic final long getTimestamp()
public File[] verifyFiles(String[] names)
throws UnpositionedError
names - an array of file names
UnpositionedError - at least one file does not exist
public Vector verifyFiles(Vector names)
throws UnpositionedError
names - a vector of names
UnpositionedError - at least one file does not existprotected String checkDestination(String destination)
public boolean run(String dir,
PrintWriter err,
String[] args)
dir - the working directoryerr - the diagnostic output streamargs - the arguments to the compiler
public abstract boolean run(String[] args)
args - the arguments to the compiler
public abstract void reportTrouble(PositionedError trouble)
trouble - a description of the trouble to report.public abstract boolean parseComments()
public abstract boolean verboseMode()
public void inform(UnpositionedError error)
error - the formatted messagepublic void inform(PositionedError error)
error - the formatted messagepublic void inform(Message message)
message - the formatted message
public void inform(MessageDescription description,
Object[] parameters)
description - the message descriptionparameters - the array of parameters
public void inform(MessageDescription description,
Object parameter1,
Object parameter2)
description - the message descriptionparameter1 - the first parameterparameter2 - the second parameter
public void inform(MessageDescription description,
Object parameter)
description - the message descriptionparameter - the parameterpublic void inform(MessageDescription description)
description - the message descriptionpublic Object deepClone()
deepClone in interface DeepCloneableprotected void deepCloneInto(Compiler other)
other
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||