WarningMessage (groovy 2.4.3 API)
Date: 2015-03-23

Package: org.codehaus.groovy.control.messages

## [Java] Class WarningMessage

- org.codehaus.groovy.control.messages.WarningMessage

- A class for warning messages.

  Authors:
    Chris Poirier
  Version:
    \$Id\$

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `static int` | `LIKELY_ERRORS` |
    `static int` | `NONE` |
    `static int` | `PARANOIA` |
    `static int` | `POSSIBLE_ERRORS` |

  - Inherited fields
    Fields inherited from class | Fields
    --- | ---
    `class LocatedMessage` | `context`
    `class SimpleMessage` | `data, message, owner`

  - ### Constructor Summary

    Constructors
    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.

  - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `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)`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class LocatedMessage` | `write`
    `class SimpleMessage` | `getMessage, write`
    `class Message` | `create, create, create, write, write`
    `class Object` | `wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll`

- - ### Field Detail

    - #### public static final int LIKELY_ERRORS

    - #### public static final int NONE

    - #### public static final int PARANOIA

    - #### public static final int POSSIBLE_ERRORS

  - ### Constructor Detail

    - #### public WarningMessage(int importance, 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

    - #### public 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` - additional data needed when generating the message
        `context` - context information for locating the offending source text

  - ### Method Detail

    - #### 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)