Overview | Package | Class
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.codehaus.groovy.control.messages
Class WarningMessage

A class for warning messages.

author:
  Chris Poirier

version:
  $Id: WarningMessage.java 6778 2007-07-02 10:40:33Z glaforge $

Field Summary
`int` | `LIKELY_ERRORS`
`int` | `NONE`
`int` | `PARANOIA`
`int` | `POSSIBLE_ERRORS`
`int` | `importance`

Constructor Summary
`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.

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

Constructor Detail

### WarningMessage

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

  Creates a new warning message.
  param:
    importance the warning level
  param:
    message the message text
  param:
    context context information for locating the offending source text

### WarningMessage

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

  Creates a new warning message.
  param:
    importance the warning level
  param:
    message the message text
  param:
    data additional data needed when generating the message
  param:
    context context information for locating the offending source text

Method Detail

### isRelevant

    public static boolean isRelevant(int actual, int limit)

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

### 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(PrintWriter writer, Janitor janitor)