| java.lang.Object edu.rice.cs.drjava.model.compiler.CompilerError
All known Subclasses: edu.rice.cs.drjava.model.junit.JUnitError,
CompilerError | public class CompilerError implements Comparable,Serializable(Code) | | A class to represent compilerr errors and warnings. Having this class allows DrJava
to make the errors as legible as possible.
version: $Id: CompilerError.java 4255 2007-08-28 19:17:37Z mgricken $ |
Method Summary | |
public int | compareTo(Object o) Compares by file, then by line, then by column. | public File | file() Gets the file. | public String | fileName() Gets the full name of the file. | public 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. | public 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. | public boolean | hasNoLocation() | public boolean | isWarning() Determines if the error is a warning. | public int | lineNumber() Gets the zero-based line number of the error. | public String | message() Gets the error message. | public int | startColumn() Gets the column where the error begins. | public String | toString() Gets a String representation of the error. |
CompilerError | public CompilerError(File file, int lineNumber, int startColumn, String message, boolean isWarning)(Code) | | Constructor.
Parameters: file - the file where the error occurred Parameters: lineNumber - the line number of the error Parameters: startColumn - the starting column of the error Parameters: message - the error message |
CompilerError | public CompilerError(File file, String message, boolean isWarning)(Code) | | Constructor for an CompilerError with an associated file but no location in the source
|
CompilerError | public CompilerError(String message, boolean isWarning)(Code) | | Constructor for CompilerErrors without files.
Parameters: message - the error message |
compareTo | public int compareTo(Object o)(Code) | | Compares by file, then by line, then by column. Errors without files are considered equal, but less than any
errors with files. Warnings are considered greater than errors when they are otherwise equal.
|
file | public File file()(Code) | | Gets the file.
the file with errors. |
fileName | public String fileName()(Code) | | Gets the full name of the file.
the file name. |
getFileMessage | public String getFileMessage()(Code) | | 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.
|
getLineMessage | public String getLineMessage()(Code) | | 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. This is adjusted to show one-based numbers,
since internally we store a zero-based index.
|
hasNoLocation | public boolean hasNoLocation()(Code) | | This function returns true if and only if the given error has no location
|
isWarning | public boolean isWarning()(Code) | | Determines if the error is a warning.
true if the error is a warning. |
lineNumber | public int lineNumber()(Code) | | Gets the zero-based line number of the error. NOTE: javac/javadoc produces zero-based line numbers internally,
but prints one-based line numbers to the command line.
the zero-based line number |
message | public String message()(Code) | | Gets the error message.
the error message. |
startColumn | public int startColumn()(Code) | | Gets the column where the error begins.
the starting column |
toString | public String toString()(Code) | | Gets a String representation of the error. Abstract.
the error as a String |
|
|