Package: org.codehaus.groovy.control.messages

## [Java] Class SimpleMessage

- org.codehaus.groovy.control.messages.SimpleMessage

-     public class SimpleMessage
      extends Message

  A base class for compilation messages.

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `protected Object` | `data` | used when message is an I18N identifier
    `protected String` | `message` | Message text to render.
    `protected ProcessingUnit` | `owner` | Processing unit that owns the message.

  - ### Constructor Summary

    Constructors
    Constructor and description
    `SimpleMessage(String message, ProcessingUnit owner)` Creates a simple message with no auxiliary data.
    `SimpleMessage(String message, Object data, ProcessingUnit owner)` Creates a simple message with optional auxiliary data.

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public String` | `getMessage()` Returns the message text.
    `` | `public void` | `write(PrintWriter writer, Janitor janitor)` Writes this message, prefixing it with the source name when available.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Message` | `create, create, create, write, write`

- - ### Field Detail

    - #### protected Object data

      used when message is an I18N identifier

    - #### protected String message

      Message text to render.

    - #### protected ProcessingUnit owner

      Processing unit that owns the message.

  - ### Constructor Detail

    - #### public SimpleMessage(String message, ProcessingUnit owner)

      Creates a simple message with no auxiliary data.

      Parameters:
        `message` - the message text
        `owner` - the owning processing unit

    - #### public SimpleMessage(String message, Object data, ProcessingUnit owner)

      Creates a simple message with optional auxiliary data.

      Parameters:
        `message` - the message text
        `data` - supplemental message data
        `owner` - the owning processing unit

  - ### Method Detail

    - #### public String getMessage()

      Returns the message text.

      Returns:
        the message text

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

      Writes this message, prefixing it with the source name when available.

      Parameters:
        `writer` - the destination writer
        `janitor` - the cleanup helper for temporary source access