Package: org.codehaus.groovy.control.messages

## [Java] Class WarningMessage

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

-     public class WarningMessage
      extends LocatedMessage

  A class for warning messages.

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `static int` | `LIKELY_ERRORS` | Warning indicates likely error
    `static int` | `NONE` | Ignore all (for querying)
    `static int` | `PARANOIA` | Warning indicates paranoia on the part of the compiler
    `static int` | `POSSIBLE_ERRORS` | Warning indicates possible error

  - Inherited fields
    Fields inherited from class | Fields
    --- | ---
    `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 Params | Return Type | Name and description
    --- | --- | ---
    `` | `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)`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class LocatedMessage` | `getContext, write`
    `class SimpleMessage` | `getMessage, write`
    `class Message` | `create, create, create, write, write`

- - ### Field Detail

    - #### public static final int LIKELY_ERRORS

      Warning indicates likely error

    - #### public static final int NONE

      Ignore all (for querying)

    - #### public static final int PARANOIA

      Warning indicates paranoia on the part of the compiler

    - #### public static final int POSSIBLE_ERRORS

      Warning indicates possible error

  - ### 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` - 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` - data needed for generating the message
        `context` - 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.

    - #### @Override
      public void write(PrintWriter writer, Janitor janitor)