Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.codehaus.groovy.control.messages
[Java] 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.

Authors:
  Chris Poirier

Version:
  \$Id\$

Field Summary
`static int` | `LIKELY_ERRORS`
`static int` | `NONE`
`static int` | `PARANOIA` Returns true if a warning would be relevant to the specified level.
`static int` | `POSSIBLE_ERRORS`

Fields inherited from class LocatedMessage
context

Fields inherited from class SimpleMessage
data, message, owner

Constructor Summary
`WarningMessage(int importance, java.lang.String message, CSTNode context, SourceUnit owner)`
`WarningMessage(int importance, java.lang.String message, java.lang.Object data, CSTNode context, SourceUnit owner)`

Method Summary
`static boolean` | `isRelevant(int actual, int limit)`
`boolean` | `isRelevant(int importance)` Returns true if this message is as or more important than the specified importance level.
`void` | `write(java.io.PrintWriter writer, Janitor janitor)`

Methods inherited from class LocatedMessage
write

Methods inherited from class SimpleMessage
getMessage, write

Methods inherited from class Message
create, create, create, write, write

Methods inherited from class java.lang.Object
java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()

Field Detail

### LIKELY_ERRORS

    public static final int LIKELY_ERRORS

### NONE

    public static final int NONE

### PARANOIA

    public static final int PARANOIA

  Returns true if a warning would be relevant to the specified level.

### POSSIBLE_ERRORS

    public static final int POSSIBLE_ERRORS

Constructor Detail

### WarningMessage

    public WarningMessage(int importance, java.lang.String message, CSTNode context, SourceUnit owner)

### WarningMessage

    public WarningMessage(int importance, java.lang.String message, java.lang.Object data, CSTNode context, SourceUnit owner)

Method Detail

### isRelevant

    public static boolean isRelevant(int actual, int limit)

### isRelevant

    public boolean isRelevant(int importance)

  Returns true if this message is as or more important than the specified importance level.

### write

    public void write(java.io.PrintWriter writer, Janitor janitor)

Groovy Documentation