|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.rice.cs.drjava.model.compiler.CompilerError
A class to represent compiler errors. Having this class allows DrJava to make the errors as legible as possible.
Field Summary | |
private File |
_file
|
private boolean |
_isWarning
|
private int |
_lineNumber
zero-based line number. |
private String |
_message
|
private int |
_startColumn
zero-based column number. |
Constructor Summary | |
CompilerError(File file,
int lineNumber,
int startColumn,
String message,
boolean isWarning)
Constructor. |
|
CompilerError(String message,
boolean isWarning)
Constructor for CompilerErrors without files. |
Method Summary | |
private int |
compareByPosition(CompilerError other)
Compares this error with the given one, based first on line number, and then by column. |
int |
compareTo(Object o)
Compares by file, then by line, then by column. |
File |
file()
Gets the file. |
String |
fileName()
Gets the full name of the file. |
boolean |
isWarning()
Determines if the error is a warning. |
int |
lineNumber()
Gets the line number of the error. |
String |
message()
Gets the error message. |
int |
startColumn()
Gets the column where the error begins. |
String |
toString()
Gets a String representation of the error. |
Methods inherited from class java.lang.Object |
|
Field Detail |
private File _file
private int _lineNumber
private int _startColumn
private String _message
private boolean _isWarning
Constructor Detail |
public CompilerError(File file, int lineNumber, int startColumn, String message, boolean isWarning)
File
- file the file where the error occurredint
- lineNumber the line number of the errorint
- startColumn the starting column of the errorString
- message the error messageboolean
- isWarning true if the error is a warningpublic CompilerError(String message, boolean isWarning)
String
- message the error messageboolean
- isWarning true if the error is a warningMethod Detail |
public String toString()
toString
in class Object
public File file()
public String fileName()
public int lineNumber()
public int startColumn()
public String message()
public boolean isWarning()
public int compareTo(Object o)
compareTo
in interface Comparable
private int compareByPosition(CompilerError other)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |