org.thewonderlemming.c4plantuml.linter.rules.builtin

## Class AbstractC4Rule

- java.lang.Object
- - org.thewonderlemming.c4plantuml.linter.rules.AbstractLintingRule
  - - org.thewonderlemming.c4plantuml.linter.rules.builtin.AbstractC4Rule

- Direct Known Subclasses:
    AliasesShouldBeListedInDictionaryRule, AliasesShouldBeUniqueRule, AliasesShouldFollowStandardConventionRule, NoDuplicateRelationshipsRule, NoOrphanAliasInBoundariesRule, NoOrphanAliasInLayoutsRule, NoOrphanAliasInRelationshipsRule

      public abstract class AbstractC4Rule
      extends AbstractLintingRule

  A base implementation of `AbstractLintingRule` that provides default support for C4 levels 1 to 3.
  Author:
    thewonderlemming

- - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `AbstractC4Rule(RuleParameters parameters)` Default constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Set<Class<? extends org.antlr.v4.runtime.Parser>>` | `acceptableParsersTypes()` Returns a list of supported ANTLR4 `Parser`.
    `Optional<org.antlr.v4.runtime.tree.ParseTree>` | `selectParseTree(org.antlr.v4.runtime.Parser parser)` Selects a `ParseTree` to process, given a `Parser` grammar.
    `void` | `wrapUp()` A call that takes place after the parsing process of a file.

    - ### Methods inherited from class org.thewonderlemming.c4plantuml.linter.rules.AbstractLintingRule

      `clearSyntaxErrors, createParseTreeListener, getLogger, getParameters, getSyntaxErrors, reportSyntaxError`

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

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

- - ### Constructor Detail

    - #### AbstractC4Rule

          protected AbstractC4Rule(RuleParameters parameters)

      Default constructor.
      Parameters:
        `parameters` - the `RuleParameters` to pass to control the behavior of the rule.

  - ### Method Detail

    - #### acceptableParsersTypes

          public Set<Class<? extends org.antlr.v4.runtime.Parser>> acceptableParsersTypes()

      Description copied from class: `AbstractLintingRule`
      Returns a list of supported ANTLR4 `Parser`.
      Specified by:
        `acceptableParsersTypes` in class `AbstractLintingRule`
      Returns:
        the list of supported `Parser`.

    - #### selectParseTree

          public Optional<org.antlr.v4.runtime.tree.ParseTree> selectParseTree(org.antlr.v4.runtime.Parser parser)

      Description copied from class: `AbstractLintingRule`
      Selects a `ParseTree` to process, given a `Parser` grammar.
      Specified by:
        `selectParseTree` in class `AbstractLintingRule`
      Parameters:
        `parser` - the `Parser` instance to parse the current grammar.
      Returns:
        the `ParseTree` that matches the current grammar.

    - #### wrapUp

          public void wrapUp()

      Description copied from class: `AbstractLintingRule`
      A call that takes place after the parsing process of a file.

      Implements that call if you need post processing at the end of the linting operation.

      Specified by:
        `wrapUp` in class `AbstractLintingRule`

Copyright © 2020. All rights reserved.