|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.rice.cs.drjava.model.DJError
public class DJError
A class to represent source errors and warnings generated by the compiler, JUnit, etc. This class enables DrJava to highlight the error text.
Constructor Summary | |
---|---|
DJError(File file,
int lineNumber,
int startColumn,
String message,
boolean isWarning)
Constructor. |
|
DJError(File file,
String message,
boolean isWarning)
Constructor for an DJError with an associated file but no location in the source |
|
DJError(String message,
boolean isWarning)
Constructor for CompilerErrors without files. |
Method Summary | |
---|---|
int |
compareTo(DJError other)
Compares by file, then by line, then by column. |
File |
file()
Gets the file. |
String |
fileName()
Gets the full name of the file. |
String |
getFileMessage()
This function returns a message telling the file this error is from appropriate to display to a user, indicating if there is no file associated with this error. |
String |
getLineMessage()
This function returns a message telling the line this error is from appropriate to display to a user, indicating if there is no file associated with this error. |
boolean |
hasNoLocation()
This function returns true if and only if the given error has no location |
boolean |
isWarning()
Determines if the error is a warning. |
int |
lineNumber()
Gets the zero-based 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 |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DJError(File file, int lineNumber, int startColumn, String message, boolean isWarning)
file
- the file where the error occurredlineNumber
- the line number of the errorstartColumn
- the starting column of the errormessage
- the error messagepublic DJError(File file, String message, boolean isWarning)
public DJError(String message, boolean isWarning)
message
- the error messageMethod Detail |
---|
public boolean hasNoLocation()
public String toString()
toString
in class Object
public File file()
public String fileName()
public int lineNumber()
public int startColumn()
public String message()
public String getFileMessage()
public String getLineMessage()
public boolean isWarning()
public int compareTo(DJError other)
compareTo
in interface Comparable<DJError>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |