org.codehaus.plexus.compiler

## Class CompilerMessage

- java.lang.Object
- - org.codehaus.plexus.compiler.CompilerMessage

- Direct Known Subclasses:
    CompilerError

      public class CompilerMessage
      extends Object

  This class encapsulates a message produced by a programming language processor (whether interpreted or compiled).
  Since:
    2.0
  Author:
    Stefano Mazzocchi

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `CompilerMessage.Kind` As we are still 1.5 required we use a wrapper to Diagnostic.Kind and some compilers don't know jdk constants.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `CompilerMessage(String message)` Deprecated. Use `CompilerMessage(String, Kind)` instead
    `CompilerMessage(String message, boolean error)` Deprecated. Use `CompilerMessage(String, Kind)` instead
    `CompilerMessage(String file, boolean error, int startline, int startcolumn, int endline, int endcolumn, String message)` Deprecated. Use `CompilerMessage(String, Kind, int, int, int, int, String)` instead
    `CompilerMessage(String message, CompilerMessage.Kind kind)` Constructs a compiler message.
    `CompilerMessage(String file, CompilerMessage.Kind kind, int startline, int startcolumn, int endline, int endcolumn, String message)` Constructs a compiler message.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getEndColumn()` Returns the ending column number of the program text originating this compiler message.
    `int` | `getEndLine()` Return the ending line number of the program text originating this compiler message.
    `String` | `getFile()` Returns the filename associated with this compiler message.
    `CompilerMessage.Kind` | `getKind()` Returns the kind of the compiler message.
    `String` | `getMessage()` Returns the message produced by the language processor.
    `int` | `getStartColumn()` Returns the starting column number of the program text originating this compiler message.
    `int` | `getStartLine()` Returns the starting line number of the program text originating this compiler message.
    `boolean` | `isError()` Asserts whether this is an error message or not.
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### CompilerMessage

          @Deprecated
          public CompilerMessage(String file,
                                    boolean error,
                                    int startline,
                                    int startcolumn,
                                    int endline,
                                    int endcolumn,
                                    String message)

      Deprecated. Use `CompilerMessage(String, Kind, int, int, int, int, String)` instead
      Constructs a compiler message.
      Parameters:
        `file` - The name of the file containing the offending program text
        `error` - `true` if this is a error message, or `false` if it is a warning message
        `startline` - The start line number of the offending program text
        `startcolumn` - The start column number of the offending program text
        `endline` - The end line number of the offending program text
        `endcolumn` - The end column number of the offending program text
        `message` - The actual message text produced by the language processor

    - #### CompilerMessage

          public CompilerMessage(String file,
                         CompilerMessage.Kind kind,
                         int startline,
                         int startcolumn,
                         int endline,
                         int endcolumn,
                         String message)

      Constructs a compiler message.
      Parameters:
        `file` - The name of the file containing the offending program text
        `kind` - The kind of message
        `startline` - The start line number of the offending program text
        `startcolumn` - The start column number of the offending program text
        `endline` - The end line number of the offending program text
        `endcolumn` - The end column number of the offending program text
        `message` - The actual message text produced by the language processor

    - #### CompilerMessage

          @Deprecated
          public CompilerMessage(String message)

      Deprecated. Use `CompilerMessage(String, Kind)` instead
      The warning message constructor.
      Parameters:
        `message` - The actual message text produced by the language processor

    - #### CompilerMessage

          @Deprecated
          public CompilerMessage(String message,
                                    boolean error)

      Deprecated. Use `CompilerMessage(String, Kind)` instead
      Constructs a compiler message.
      Parameters:
        `message` - The actual message text produced by the language processor
        `error` - `true` if this is a error message, or `false` if it is a warning message

    - #### CompilerMessage

          public CompilerMessage(String message,
                         CompilerMessage.Kind kind)

      Constructs a compiler message.
      Parameters:
        `message` - The actual message text produced by the language processor
        `kind` - The kind of message
      Since:
        2.0

  - ### Method Detail

    - #### getFile

          public String getFile()

      Returns the filename associated with this compiler message.
      Returns:
        The filename associated with this compiler message

    - #### isError

          public boolean isError()

      Asserts whether this is an error message or not.
      Returns:
        Whether the message is an error message

    - #### getStartLine

          public int getStartLine()

      Returns the starting line number of the program text originating this compiler message.
      Returns:
        The starting line number of the program text originating this message

    - #### getStartColumn

          public int getStartColumn()

      Returns the starting column number of the program text originating this compiler message.
      Returns:
        The starting column number of the program text originating this message

    - #### getEndLine

          public int getEndLine()

      Return the ending line number of the program text originating this compiler message.
      Returns:
        The ending line number of the program text originating this message

    - #### getEndColumn

          public int getEndColumn()

      Returns the ending column number of the program text originating this compiler message.
      Returns:
        The ending column number of the program text originating this message

    - #### getMessage

          public String getMessage()

      Returns the message produced by the language processor.
      Returns:
        The message produced by the language processor

    - #### getKind

          public CompilerMessage.Kind getKind()

      Returns the kind of the compiler message.
      Returns:
        the kind of the message
      Since:
        2.0

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2015. All rights reserved.