public class WarningMessage extends LocatedMessage
| Modifier and Type | Field and Description |
|---|---|
static int |
LIKELY_ERRORS |
static int |
NONE |
static int |
PARANOIA |
static int |
POSSIBLE_ERRORS |
contextdata, message, owner| Constructor and Description |
|---|
WarningMessage(int importance,
String message,
CSTNode context,
SourceUnit owner)
Creates a new warning message.
|
WarningMessage(int importance,
String message,
Object data,
CSTNode context,
SourceUnit owner)
Creates a new warning message.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
isRelevant(int importance)
Returns true if this message is as or more important than the
specified importance level.
|
static boolean |
isRelevant(int actual,
int limit)
Returns true if a warning would be relevant to the specified level.
|
void |
write(PrintWriter writer,
Janitor janitor)
Writes the message to the specified PrintWriter.
|
getMessagepublic static final int NONE
public static final int LIKELY_ERRORS
public static final int POSSIBLE_ERRORS
public static final int PARANOIA
public WarningMessage(int importance,
String message,
CSTNode context,
SourceUnit owner)
importance - the warning levelmessage - the message textcontext - context information for locating the offending source textpublic WarningMessage(int importance,
String message,
Object data,
CSTNode context,
SourceUnit owner)
importance - the warning levelmessage - the message textdata - additional data needed when generating the messagecontext - context information for locating the offending source textpublic static boolean isRelevant(int actual,
int limit)
public boolean isRelevant(int importance)
public void write(PrintWriter writer, Janitor janitor)
Messagewrite in class LocatedMessage