org.thewonderlemming.c4plantuml.syntaxchecker

## Enum SyntaxErrorMessageMapper

- java.lang.Object
- - java.lang.Enum<SyntaxErrorMessageMapper>
  - - org.thewonderlemming.c4plantuml.syntaxchecker.SyntaxErrorMessageMapper

- All Implemented Interfaces:
    Serializable, Comparable<SyntaxErrorMessageMapper>

      public enum SyntaxErrorMessageMapper
      extends Enum<SyntaxErrorMessageMapper>

  Maps ANTLR4 grammars specific errors to readable errors.
  Author:
    thewonderlemming

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `EXPECTING_INCLUDE` An error message related to the !include instruction.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getDisplayMessage()` Returns the readable message.
    `static Optional<SyntaxErrorMessageMapper>` | `getMappingForParserMessage(String message)` Returns an instance of `SyntaxErrorMessageMapper` given a parser message, if found.
    `static String` | `getMappingForParserMessageOrGetDefault(String message)` Returns a readable message given a parser message if found.
    `String` | `getParserMessage()` Returns the parser original message.
    `static SyntaxErrorMessageMapper` | `valueOf(String name)` Returns the enum constant of this type with the specified name.
    `static SyntaxErrorMessageMapper[]` | `values()` Returns an array containing the constants of this enum type, in the order they are declared.

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

      `clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

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

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Enum Constant Detail

    - #### EXPECTING_INCLUDE

          public static final SyntaxErrorMessageMapper EXPECTING_INCLUDE

      An error message related to the !include instruction.

  - ### Method Detail

    - #### values

          public static SyntaxErrorMessageMapper[] values()

      Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

          for (SyntaxErrorMessageMapper c : SyntaxErrorMessageMapper.values())
              System.out.println(c);

      Returns:
        an array containing the constants of this enum type, in the order they are declared

    - #### valueOf

          public static SyntaxErrorMessageMapper valueOf(String name)

      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
        `name` - the name of the enum constant to be returned.
      Returns:
        the enum constant with the specified name
      Throws:
        `IllegalArgumentException` - if this enum type has no constant with the specified name
        `NullPointerException` - if the argument is null

    - #### getMappingForParserMessage

          public static Optional<SyntaxErrorMessageMapper> getMappingForParserMessage(String message)

      Returns an instance of `SyntaxErrorMessageMapper` given a parser message, if found.
      Parameters:
        `message` - the parser message.
      Returns:
        the `SyntaxErrorMessageMapper` instance if found, empty else.

    - #### getMappingForParserMessageOrGetDefault

          public static String getMappingForParserMessageOrGetDefault(String message)

      Returns a readable message given a parser message if found.
      Parameters:
        `message` - the parser message.
      Returns:
        the readable message if found, or the given message else.

    - #### getDisplayMessage

          public String getDisplayMessage()

      Returns the readable message.
      Returns:
        the readable message.

    - #### getParserMessage

          public String getParserMessage()

      Returns the parser original message.
      Returns:
        the parser original message.

Copyright © 2020. All rights reserved.