Class WarningMessage
- java.lang.Object
- 
- org.codehaus.groovy.control.messages.Message
- 
- org.codehaus.groovy.control.messages.SimpleMessage
- 
- org.codehaus.groovy.control.messages.LocatedMessage
- 
- org.codehaus.groovy.control.messages.WarningMessage
 
 
 
 
- 
 public class WarningMessage extends LocatedMessage A class for warning messages.
- 
- 
Field SummaryFields Modifier and Type Field Description static intLIKELY_ERRORSstatic intNONEstatic intPARANOIAstatic intPOSSIBLE_ERRORS- 
Fields inherited from class org.codehaus.groovy.control.messages.LocatedMessagecontext
 - 
Fields inherited from class org.codehaus.groovy.control.messages.SimpleMessagedata, message, owner
 
- 
 - 
Constructor SummaryConstructors Constructor Description WarningMessage(int importance, java.lang.String message, java.lang.Object data, CSTNode context, SourceUnit owner)Creates a new warning message.WarningMessage(int importance, java.lang.String message, CSTNode context, SourceUnit owner)Creates a new warning message.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisRelevant(int importance)Returns true if this message is as or more important than the specified importance level.static booleanisRelevant(int actual, int limit)Returns true if a warning would be relevant to the specified level.voidwrite(java.io.PrintWriter writer, Janitor janitor)Writes the message to the specified PrintWriter.- 
Methods inherited from class org.codehaus.groovy.control.messages.LocatedMessagegetContext
 - 
Methods inherited from class org.codehaus.groovy.control.messages.SimpleMessagegetMessage
 
- 
 
- 
- 
- 
Field Detail- 
NONEpublic static final int NONE - See Also:
- Constant Field Values
 
 - 
LIKELY_ERRORSpublic static final int LIKELY_ERRORS - See Also:
- Constant Field Values
 
 - 
POSSIBLE_ERRORSpublic static final int POSSIBLE_ERRORS - See Also:
- Constant Field Values
 
 - 
PARANOIApublic static final int PARANOIA - See Also:
- Constant Field Values
 
 
- 
 - 
Constructor Detail- 
WarningMessagepublic WarningMessage(int importance, java.lang.String message, CSTNode context, SourceUnit owner)Creates a new warning message.- Parameters:
- importance- the warning level
- message- the message text
- context- context information for locating the offending source text
 
 - 
WarningMessagepublic WarningMessage(int importance, java.lang.String message, java.lang.Object data, CSTNode context, SourceUnit owner)Creates a new warning message.- Parameters:
- importance- the warning level
- message- the message text
- data- additional data needed when generating the message
- context- context information for locating the offending source text
 
 
- 
 - 
Method Detail- 
isRelevantpublic static boolean isRelevant(int actual, int limit)Returns true if a warning would be relevant to the specified level.
 - 
isRelevantpublic boolean isRelevant(int importance) Returns true if this message is as or more important than the specified importance level.
 - 
writepublic void write(java.io.PrintWriter writer, Janitor janitor)Description copied from class:MessageWrites the message to the specified PrintWriter. The supplied ProcessingUnit is the unit that holds this Message.- Overrides:
- writein class- LocatedMessage
 
 
- 
 
-