Class SimpleMessage

java.lang.Object
org.codehaus.groovy.control.messages.Message
org.codehaus.groovy.control.messages.SimpleMessage
Direct Known Subclasses:
LocatedMessage

public class SimpleMessage extends Message
A base class for compilation messages.
  • Field Details

    • data

      protected Object data
      used when message is an I18N identifier
    • message

      protected String message
      Message text to render.
    • owner

      protected ProcessingUnit owner
      Processing unit that owns the message.
  • Constructor Details

    • SimpleMessage

      public SimpleMessage(String message, ProcessingUnit owner)
      Creates a simple message with no auxiliary data.
      Parameters:
      message - the message text
      owner - the owning processing unit
    • SimpleMessage

      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 Details

    • getMessage

      public String getMessage()
      Returns the message text.
      Returns:
      the message text
    • write

      public void write(PrintWriter writer, Janitor janitor)
      Writes this message, prefixing it with the source name when available.
      Specified by:
      write in class Message
      Parameters:
      writer - the destination writer
      janitor - the cleanup helper for temporary source access