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
A class for warning messages.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final intWarning indicates likely errorstatic final intIgnore all (for querying)static final intWarning indicates paranoia on the part of the compilerstatic final intWarning indicates possible errorFields inherited from class org.codehaus.groovy.control.messages.SimpleMessagedata, message, owner
- 
Constructor SummaryConstructorsConstructorDescriptionWarningMessage(int importance, String message, Object data, CSTNode context, SourceUnit owner) Creates a new warning message.WarningMessage(int importance, String message, CSTNode context, SourceUnit owner) Creates a new warning message.
- 
Method SummaryModifier and TypeMethodDescriptionbooleanisRelevant(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(PrintWriter writer, Janitor janitor) Writes this message to the specifiedPrintWriter.Methods inherited from class org.codehaus.groovy.control.messages.LocatedMessagegetContextMethods inherited from class org.codehaus.groovy.control.messages.SimpleMessagegetMessage
- 
Field Details- 
NONEpublic static final int NONEIgnore all (for querying)- See Also:
 
- 
LIKELY_ERRORSpublic static final int LIKELY_ERRORSWarning indicates likely error- See Also:
 
- 
POSSIBLE_ERRORSpublic static final int POSSIBLE_ERRORSWarning indicates possible error- See Also:
 
- 
PARANOIApublic static final int PARANOIAWarning indicates paranoia on the part of the compiler- See Also:
 
 
- 
- 
Constructor Details- 
WarningMessageCreates a new warning message.- Parameters:
- importance- the warning level
- message- the message text
- context- for locating the offending source text
 
- 
WarningMessagepublic WarningMessage(int importance, String message, Object data, CSTNode context, SourceUnit owner) Creates a new warning message.- Parameters:
- importance- the warning level
- message- the message text
- data- data needed for generating the message
- context- for locating the offending source text
 
 
- 
- 
Method Details- 
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.
- 
writeDescription copied from class:MessageWrites this message to the specifiedPrintWriter.- Overrides:
- writein class- LocatedMessage
 
 
-