public class WarningMessage extends LocatedMessage
A class for warning messages.
Modifiers | Name | Description |
---|---|---|
static int |
LIKELY_ERRORS |
|
static int |
NONE |
|
static int |
PARANOIA |
|
static int |
POSSIBLE_ERRORS |
Fields inherited from class | Fields |
---|---|
class SimpleMessage |
data, 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. |
Type Params | Return Type | Name and description |
---|---|---|
|
public static boolean |
isRelevant(int actual, int limit) Returns true if a warning would be relevant to the specified level. |
|
public boolean |
isRelevant(int importance) Returns true if this message is as or more important than the specified importance level. |
|
public void |
write(PrintWriter writer, Janitor janitor) |
Methods inherited from class | Name |
---|---|
class LocatedMessage |
getContext, write |
class SimpleMessage |
getMessage, write |
class Message |
create, create, create, write, write |
Creates a new warning message.
importance
- the warning levelmessage
- the message textcontext
- context information for locating the offending source textCreates a new warning message.
importance
- the warning levelmessage
- the message textdata
- additional data needed when generating the messagecontext
- context information for locating the offending source textReturns true if a warning would be relevant to the specified level.
Returns true if this message is as or more important than the specified importance level.
Copyright © 2003-2020 The Apache Software Foundation. All rights reserved.