|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectmars.ErrorMessage
public class ErrorMessage
Represents occurrance of an error detected during tokenizing, assembly or simulation.
| Field Summary | |
|---|---|
static boolean |
ERROR
Constant to indicate this message is error not warning |
static boolean |
WARNING
Constant to indicate this message is warning not error |
| Constructor Summary | |
|---|---|
ErrorMessage(boolean isWarning,
MIPSprogram sourceMIPSprogram,
int line,
int position,
String message)
Constructor for ErrorMessage. |
|
ErrorMessage(boolean isWarning,
String filename,
int line,
int position,
String message)
Constructor for ErrorMessage. |
|
ErrorMessage(MIPSprogram sourceMIPSprogram,
int line,
int position,
String message)
Constructor for ErrorMessage. |
|
ErrorMessage(String filename,
int line,
int position,
String message)
Constructor for ErrorMessage. |
|
| Method Summary | |
|---|---|
String |
getFilename()
Produce name of file containing error. |
int |
getLine()
Produce line number of error. |
String |
getMessage()
Produce error message. |
int |
getPosition()
Produce position within erroneous line. |
boolean |
isWarning()
Determine whether this message represents error or warning. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final boolean WARNING
public static final boolean ERROR
| Constructor Detail |
|---|
public ErrorMessage(String filename,
int line,
int position,
String message)
filename - String containing name of source file in which this error appears.line - Line number in source program being processed when error occurred.position - Position within line being processed when error occurred. Normally is starting
position of source token.message - String containing appropriate error message.
public ErrorMessage(boolean isWarning,
String filename,
int line,
int position,
String message)
isWarning - set to WARNING if message is a warning not error, else set to ERROR or omit.filename - String containing name of source file in which this error appears.line - Line number in source program being processed when error occurred.position - Position within line being processed when error occurred. Normally is starting
position of source token.message - String containing appropriate error message.
public ErrorMessage(MIPSprogram sourceMIPSprogram,
int line,
int position,
String message)
sourceMIPSprogram - MIPSprogram object of source file in which this error appears.line - Line number in source program being processed when error occurred.position - Position within line being processed when error occurred. Normally is starting
position of source token.message - String containing appropriate error message.
public ErrorMessage(boolean isWarning,
MIPSprogram sourceMIPSprogram,
int line,
int position,
String message)
isWarning - set to WARNING if message is a warning not error, else set to ERROR or omit.sourceMIPSprogram - MIPSprogram object of source file in which this error appears.line - Line number in source program being processed when error occurred.position - Position within line being processed when error occurred. Normally is starting
position of source token.message - String containing appropriate error message.| Method Detail |
|---|
public String getFilename()
public int getLine()
public int getPosition()
public String getMessage()
public boolean isWarning()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||