org.thewonderlemming.c4plantuml.linter

## Class SyntaxError

- java.lang.Object
- - org.thewonderlemming.c4plantuml.linter.SyntaxError

-     public class SyntaxError
      extends Object

  Represents a parsing syntax error and holds information such as the line of the error, the offending symbol and so on.
  Author:
    thewonderlemming

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SyntaxError(org.antlr.v4.runtime.Recognizer<?,?> recognizer, Object offendingSymbol, int line, int charPositionInLine, String msg, org.antlr.v4.runtime.RecognitionException e)` Default constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getCharPositionInLine()` Returns the position of the offending character in the error line.
    `org.antlr.v4.runtime.RecognitionException` | `getE()` returns the error associated exception.
    `int` | `getLine()` Returns the line of the error in the source file.
    `String` | `getMsg()` returns the message of the syntax error.
    `Object` | `getOffendingSymbol()` Returns the unexpected symbol that caused that error.
    `org.antlr.v4.runtime.Recognizer<?,?>` | `getRecognizer()` Returns the ANTLR4 object that recognizes the input and handles the errors.
    `String` | `toString()` Returns a human understandable representation of the current instance.

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

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

- - ### Constructor Detail

    - #### SyntaxError

          public SyntaxError(org.antlr.v4.runtime.Recognizer<?,?> recognizer,
                             Object offendingSymbol,
                             int line,
                             int charPositionInLine,
                             String msg,
                             org.antlr.v4.runtime.RecognitionException e)

      Default constructor.
      Parameters:
        `recognizer` - the ANTLR4 object that recognizes the input and handles the errors.
        `offendingSymbol` - the unexpected symbol that caused the syntax error.
        `line` - the line of the syntax error in the source file.
        `charPositionInLine` - the position of the offending symbol in the error line.
        `msg` - the error message.
        `e` - the error `RecognitionException`.

  - ### Method Detail

    - #### getCharPositionInLine

          public int getCharPositionInLine()

      Returns the position of the offending character in the error line.
      Returns:
        the position of the offending character.

    - #### getE

          public org.antlr.v4.runtime.RecognitionException getE()

      returns the error associated exception.
      Returns:
        the current exception.

    - #### getLine

          public int getLine()

      Returns the line of the error in the source file.
      Returns:
        the line of the error.

    - #### getMsg

          public String getMsg()

      returns the message of the syntax error.
      Returns:
        the error message.

    - #### getOffendingSymbol

          public Object getOffendingSymbol()

      Returns the unexpected symbol that caused that error.
      Returns:
        the unexpected symbol.

    - #### getRecognizer

          public org.antlr.v4.runtime.Recognizer<?,?> getRecognizer()

      Returns the ANTLR4 object that recognizes the input and handles the errors.
      Returns:
        the ANTLR4 recognizer instance.

    - #### toString

          public String toString()

      Returns a human understandable representation of the current instance.
      Overrides:
        `toString` in class `Object`

Copyright © 2020. All rights reserved.