org.thewonderlemming.c4plantuml.linter.rules.builtin

## Class NoOrphanAliasInLayoutsListener

- java.lang.Object
- - org.thewonderlemming.c4plantuml.grammars.C4BaseListener
  - - org.thewonderlemming.c4plantuml.linter.rules.builtin.NoOrphanAliasInLayoutsListener

- All Implemented Interfaces:
    org.antlr.v4.runtime.tree.ParseTreeListener, C4L1ParserListenerDecorator, C4L2ParserListenerDecorator, C4L3ParserListenerDecorator, org.thewonderlemming.c4plantuml.grammars.generated.C4L1ParserListener, org.thewonderlemming.c4plantuml.grammars.generated.C4L2ParserListener, org.thewonderlemming.c4plantuml.grammars.generated.C4L3ParserListener

      public class NoOrphanAliasInLayoutsListener
      extends C4BaseListener

  An ANTLR 4 `ParseTreeListener` implementation that verifies that aliases in use in a C4 layouts are all referring to a valid entity.
  Author:
    thewonderlemming

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `NoOrphanAliasInLayoutsListener(NoOrphanAliasInLayoutsRule rule, org.thewonderlemming.c4plantuml.commons.Reporter reporter)` Default constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `checkThatNoAliasIsOrphanThenClearCollected()` Verifies that the aliases that were collected in layouts were all declared in an entity, or report them.
    `void` | `enterCloud(org.thewonderlemming.c4plantuml.grammars.generated.C4L1Parser.CloudContext ctx)` Collects the alias of a cloud definition in a `SourceType.C4_L1` grammar.
    `void` | `enterCloud(org.thewonderlemming.c4plantuml.grammars.generated.C4L2Parser.CloudContext ctx)` Collects the alias of a cloud definition in a `SourceType.C4_L2` grammar.
    `void` | `enterCloud(org.thewonderlemming.c4plantuml.grammars.generated.C4L3Parser.CloudContext ctx)` Collects the alias of a cloud definition in a `SourceType.C4_L3` grammar.
    `void` | `enterComponent(org.thewonderlemming.c4plantuml.grammars.generated.C4L3Parser.ComponentContext ctx)` Collects the alias of a component definition in a `SourceType.C4_L3` grammar.
    `void` | `enterContainer_boundary(org.thewonderlemming.c4plantuml.grammars.generated.C4L3Parser.Container_boundaryContext ctx)` Collects the aliases of a container boundary definition in a `SourceType.C4_L3` grammar.
    `void` | `enterContainer(org.thewonderlemming.c4plantuml.grammars.generated.C4L2Parser.ContainerContext ctx)` Collects the alias of a container definition in a `SourceType.C4_L2` grammar.
    `void` | `enterContainer(org.thewonderlemming.c4plantuml.grammars.generated.C4L3Parser.ContainerContext ctx)` Collects the alias of a container definition in a `SourceType.C4_L3` grammar.
    `void` | `enterEnterprise_boundary(org.thewonderlemming.c4plantuml.grammars.generated.C4L1Parser.Enterprise_boundaryContext ctx)` Collects the aliases of an enterprise boundary definition in a `SourceType.C4_L1` grammar.
    `void` | `enterEnterprise_boundary(org.thewonderlemming.c4plantuml.grammars.generated.C4L2Parser.Enterprise_boundaryContext ctx)` Collects the aliases of an enterprise boundary definition in a `SourceType.C4_L2` grammar.
    `void` | `enterEnterprise_boundary(org.thewonderlemming.c4plantuml.grammars.generated.C4L3Parser.Enterprise_boundaryContext ctx)` Collects the aliases of an enterprise boundary definition in a `SourceType.C4_L3` grammar.
    `void` | `enterLayout(org.thewonderlemming.c4plantuml.grammars.generated.C4L1Parser.LayoutContext ctx)` Collects the aliases of a layout in a `SourceType.C4_L1` grammar.
    `void` | `enterLayout(org.thewonderlemming.c4plantuml.grammars.generated.C4L2Parser.LayoutContext ctx)` Collects the aliases of a layout in a `SourceType.C4_L2` grammar.
    `void` | `enterLayout(org.thewonderlemming.c4plantuml.grammars.generated.C4L3Parser.LayoutContext ctx)` Collects the aliases of a layout in a `SourceType.C4_L3` grammar.
    `void` | `enterPerson_ext(org.thewonderlemming.c4plantuml.grammars.generated.C4L1Parser.Person_extContext ctx)` Collects the alias of an external person definition in a `SourceType.C4_L1` grammar.
    `void` | `enterPerson_ext(org.thewonderlemming.c4plantuml.grammars.generated.C4L2Parser.Person_extContext ctx)` Collects the alias of an external person definition in a `SourceType.C4_L2` grammar.
    `void` | `enterPerson_ext(org.thewonderlemming.c4plantuml.grammars.generated.C4L3Parser.Person_extContext ctx)` Collects the alias of an external person definition in a `SourceType.C4_L3` grammar.
    `void` | `enterPerson(org.thewonderlemming.c4plantuml.grammars.generated.C4L1Parser.PersonContext ctx)` Collects the alias of a person definition in a `SourceType.C4_L1` grammar.
    `void` | `enterPerson(org.thewonderlemming.c4plantuml.grammars.generated.C4L2Parser.PersonContext ctx)` Collects the alias of a person definition in a `SourceType.C4_L2` grammar.
    `void` | `enterPerson(org.thewonderlemming.c4plantuml.grammars.generated.C4L3Parser.PersonContext ctx)` Collects the alias of a person definition in a `SourceType.C4_L3` grammar.
    `void` | `enterSystem_boundary(org.thewonderlemming.c4plantuml.grammars.generated.C4L2Parser.System_boundaryContext ctx)` Collects the alias of a system boundary definition in a `SourceType.C4_L2` grammar.
    `void` | `enterSystem_ext(org.thewonderlemming.c4plantuml.grammars.generated.C4L1Parser.System_extContext ctx)` Collects the alias of an external system definition in a `SourceType.C4_L1` grammar.
    `void` | `enterSystem_ext(org.thewonderlemming.c4plantuml.grammars.generated.C4L2Parser.System_extContext ctx)` Collects the alias of an external system definition in a `SourceType.C4_L2` grammar.
    `void` | `enterSystem_ext(org.thewonderlemming.c4plantuml.grammars.generated.C4L3Parser.System_extContext ctx)` Collects the alias of an external system definition in a `SourceType.C4_L3` grammar.
    `void` | `enterSystem(org.thewonderlemming.c4plantuml.grammars.generated.C4L1Parser.SystemContext ctx)` Collects the alias of a system definition in a `SourceType.C4_L1` grammar.
    `void` | `enterSystem(org.thewonderlemming.c4plantuml.grammars.generated.C4L2Parser.SystemContext ctx)` Collects the alias of a system definition in a `SourceType.C4_L2` grammar.
    `void` | `enterSystem(org.thewonderlemming.c4plantuml.grammars.generated.C4L3Parser.SystemContext ctx)` Collects the alias of a system definition in a `SourceType.C4_L3` grammar.

    - ### Methods inherited from class org.thewonderlemming.c4plantuml.grammars.C4BaseListener

      `enterEveryRule, exitEveryRule, getDecoratedC4L1ParserListener, getDecoratedC4L2ParserListener, getDecoratedC4L3ParserListener, visitErrorNode, visitTerminal`

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

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

    - ### Methods inherited from interface org.thewonderlemming.c4plantuml.grammars.C4L1ParserListenerDecorator

      `enterBoundary, enterComma, enterDiagram, enterFooter, enterInclude, enterL1_title, enterRelationship, enterStatement, enterTitle, exitBoundary, exitCloud, exitComma, exitDiagram, exitEnterprise_boundary, exitFooter, exitInclude, exitL1_title, exitLayout, exitPerson_ext, exitPerson, exitRelationship, exitStatement, exitSystem_ext, exitSystem, exitTitle`

    - ### Methods inherited from interface org.thewonderlemming.c4plantuml.grammars.C4L2ParserListenerDecorator

      `enterBoundary, enterComma, enterDiagram, enterFooter, enterInclude, enterL2_title, enterRelationship, enterStatement, enterTitle, exitBoundary, exitCloud, exitComma, exitContainer, exitDiagram, exitEnterprise_boundary, exitFooter, exitInclude, exitL2_title, exitLayout, exitPerson_ext, exitPerson, exitRelationship, exitStatement, exitSystem_boundary, exitSystem_ext, exitSystem, exitTitle`

    - ### Methods inherited from interface org.thewonderlemming.c4plantuml.grammars.C4L3ParserListenerDecorator

      `enterBoundary, enterComma, enterDiagram, enterFooter, enterInclude, enterL3_title, enterRelationship, enterStatement, enterTitle, exitBoundary, exitCloud, exitComma, exitComponent, exitContainer_boundary, exitContainer, exitDiagram, exitEnterprise_boundary, exitFooter, exitInclude, exitL3_title, exitLayout, exitPerson_ext, exitPerson, exitRelationship, exitStatement, exitSystem_ext, exitSystem, exitTitle`

- - ### Constructor Detail

    - #### NoOrphanAliasInLayoutsListener

          public NoOrphanAliasInLayoutsListener(NoOrphanAliasInLayoutsRule rule,
                                                org.thewonderlemming.c4plantuml.commons.Reporter reporter)

      Default constructor.
      Parameters:
        `rule` - the `NoOrphanAliasInLayoutsRule` instance to refer to.
        `reporter` - `Reporter` instance to report to.

  - ### Method Detail

    - #### checkThatNoAliasIsOrphanThenClearCollected

          public void checkThatNoAliasIsOrphanThenClearCollected()

      Verifies that the aliases that were collected in layouts were all declared in an entity, or report them. Cleans the aliases list once done.

    - #### enterCloud

          public void enterCloud(org.thewonderlemming.c4plantuml.grammars.generated.C4L1Parser.CloudContext ctx)

      Collects the alias of a cloud definition in a `SourceType.C4_L1` grammar.

      Enter a parse tree produced by `C4L1Parser.cloud()`.

      Parameters:
        `ctx` - the parse tree

    - #### enterCloud

          public void enterCloud(org.thewonderlemming.c4plantuml.grammars.generated.C4L2Parser.CloudContext ctx)

      Collects the alias of a cloud definition in a `SourceType.C4_L2` grammar.

      Enter a parse tree produced by `C4L2Parser.cloud()`.

      Parameters:
        `ctx` - the parse tree

    - #### enterCloud

          public void enterCloud(org.thewonderlemming.c4plantuml.grammars.generated.C4L3Parser.CloudContext ctx)

      Collects the alias of a cloud definition in a `SourceType.C4_L3` grammar.

      Enter a parse tree produced by `C4L3Parser.cloud()`.

      Parameters:
        `ctx` - the parse tree

    - #### enterComponent

          public void enterComponent(org.thewonderlemming.c4plantuml.grammars.generated.C4L3Parser.ComponentContext ctx)

      Collects the alias of a component definition in a `SourceType.C4_L3` grammar.

      Enter a parse tree produced by `C4L3Parser.component()`.

      Parameters:
        `ctx` - the parse tree

    - #### enterContainer

          public void enterContainer(org.thewonderlemming.c4plantuml.grammars.generated.C4L2Parser.ContainerContext ctx)

      Collects the alias of a container definition in a `SourceType.C4_L2` grammar.

      Enter a parse tree produced by `C4L2Parser.container()`.

      Parameters:
        `ctx` - the parse tree

    - #### enterContainer

          public void enterContainer(org.thewonderlemming.c4plantuml.grammars.generated.C4L3Parser.ContainerContext ctx)

      Collects the alias of a container definition in a `SourceType.C4_L3` grammar.

      Enter a parse tree produced by `C4L3Parser.container()`.

      Parameters:
        `ctx` - the parse tree

    - #### enterContainer_boundary

          public void enterContainer_boundary(org.thewonderlemming.c4plantuml.grammars.generated.C4L3Parser.Container_boundaryContext ctx)

      Collects the aliases of a container boundary definition in a `SourceType.C4_L3` grammar.

      Enter a parse tree produced by `C4L3Parser.container_boundary()`.

      Parameters:
        `ctx` - the parse tree

    - #### enterEnterprise_boundary

          public void enterEnterprise_boundary(org.thewonderlemming.c4plantuml.grammars.generated.C4L1Parser.Enterprise_boundaryContext ctx)

      Collects the aliases of an enterprise boundary definition in a `SourceType.C4_L1` grammar.

      Enter a parse tree produced by `C4L1Parser.enterprise_boundary()`.

      Parameters:
        `ctx` - the parse tree

    - #### enterEnterprise_boundary

          public void enterEnterprise_boundary(org.thewonderlemming.c4plantuml.grammars.generated.C4L2Parser.Enterprise_boundaryContext ctx)

      Collects the aliases of an enterprise boundary definition in a `SourceType.C4_L2` grammar.

      Enter a parse tree produced by `C4L2Parser.enterprise_boundary()`.

      Parameters:
        `ctx` - the parse tree

    - #### enterEnterprise_boundary

          public void enterEnterprise_boundary(org.thewonderlemming.c4plantuml.grammars.generated.C4L3Parser.Enterprise_boundaryContext ctx)

      Collects the aliases of an enterprise boundary definition in a `SourceType.C4_L3` grammar.

      Enter a parse tree produced by `C4L3Parser.enterprise_boundary()`.

      Parameters:
        `ctx` - the parse tree

    - #### enterLayout

          public void enterLayout(org.thewonderlemming.c4plantuml.grammars.generated.C4L1Parser.LayoutContext ctx)

      Collects the aliases of a layout in a `SourceType.C4_L1` grammar.

      Enter a parse tree produced by `C4L1Parser.layout()`.

      Parameters:
        `ctx` - the parse tree

    - #### enterLayout

          public void enterLayout(org.thewonderlemming.c4plantuml.grammars.generated.C4L2Parser.LayoutContext ctx)

      Collects the aliases of a layout in a `SourceType.C4_L2` grammar.

      Enter a parse tree produced by `C4L2Parser.layout()`.

      Parameters:
        `ctx` - the parse tree

    - #### enterLayout

          public void enterLayout(org.thewonderlemming.c4plantuml.grammars.generated.C4L3Parser.LayoutContext ctx)

      Collects the aliases of a layout in a `SourceType.C4_L3` grammar.

      Enter a parse tree produced by `C4L3Parser.layout()`.

      Parameters:
        `ctx` - the parse tree

    - #### enterPerson

          public void enterPerson(org.thewonderlemming.c4plantuml.grammars.generated.C4L1Parser.PersonContext ctx)

      Collects the alias of a person definition in a `SourceType.C4_L1` grammar.

      Enter a parse tree produced by `C4L1Parser.person()`.

      Parameters:
        `ctx` - the parse tree

    - #### enterPerson

          public void enterPerson(org.thewonderlemming.c4plantuml.grammars.generated.C4L2Parser.PersonContext ctx)

      Collects the alias of a person definition in a `SourceType.C4_L2` grammar.

      Enter a parse tree produced by `C4L2Parser.person()`.

      Parameters:
        `ctx` - the parse tree

    - #### enterPerson

          public void enterPerson(org.thewonderlemming.c4plantuml.grammars.generated.C4L3Parser.PersonContext ctx)

      Collects the alias of a person definition in a `SourceType.C4_L3` grammar.

      Enter a parse tree produced by `C4L3Parser.person()`.

      Parameters:
        `ctx` - the parse tree

    - #### enterPerson_ext

          public void enterPerson_ext(org.thewonderlemming.c4plantuml.grammars.generated.C4L1Parser.Person_extContext ctx)

      Collects the alias of an external person definition in a `SourceType.C4_L1` grammar.

      Enter a parse tree produced by `C4L1Parser.person_ext()`.

      Parameters:
        `ctx` - the parse tree

    - #### enterPerson_ext

          public void enterPerson_ext(org.thewonderlemming.c4plantuml.grammars.generated.C4L2Parser.Person_extContext ctx)

      Collects the alias of an external person definition in a `SourceType.C4_L2` grammar.

      Enter a parse tree produced by `C4L2Parser.person_ext()`.

      Parameters:
        `ctx` - the parse tree

    - #### enterPerson_ext

          public void enterPerson_ext(org.thewonderlemming.c4plantuml.grammars.generated.C4L3Parser.Person_extContext ctx)

      Collects the alias of an external person definition in a `SourceType.C4_L3` grammar.

      Enter a parse tree produced by `C4L3Parser.person_ext()`.

      Parameters:
        `ctx` - the parse tree

    - #### enterSystem

          public void enterSystem(org.thewonderlemming.c4plantuml.grammars.generated.C4L1Parser.SystemContext ctx)

      Collects the alias of a system definition in a `SourceType.C4_L1` grammar.

      Enter a parse tree produced by `C4L1Parser.system()`.

      Parameters:
        `ctx` - the parse tree

    - #### enterSystem

          public void enterSystem(org.thewonderlemming.c4plantuml.grammars.generated.C4L2Parser.SystemContext ctx)

      Collects the alias of a system definition in a `SourceType.C4_L2` grammar.

      Enter a parse tree produced by `C4L2Parser.system()`.

      Parameters:
        `ctx` - the parse tree

    - #### enterSystem

          public void enterSystem(org.thewonderlemming.c4plantuml.grammars.generated.C4L3Parser.SystemContext ctx)

      Collects the alias of a system definition in a `SourceType.C4_L3` grammar.

      Enter a parse tree produced by `C4L3Parser.system()`.

      Parameters:
        `ctx` - the parse tree

    - #### enterSystem_boundary

          public void enterSystem_boundary(org.thewonderlemming.c4plantuml.grammars.generated.C4L2Parser.System_boundaryContext ctx)

      Collects the alias of a system boundary definition in a `SourceType.C4_L2` grammar.

      Enter a parse tree produced by `C4L2Parser.system_boundary()`.

      Parameters:
        `ctx` - the parse tree

    - #### enterSystem_ext

          public void enterSystem_ext(org.thewonderlemming.c4plantuml.grammars.generated.C4L1Parser.System_extContext ctx)

      Collects the alias of an external system definition in a `SourceType.C4_L1` grammar.

      Enter a parse tree produced by `C4L1Parser.system_ext()`.

      Parameters:
        `ctx` - the parse tree

    - #### enterSystem_ext

          public void enterSystem_ext(org.thewonderlemming.c4plantuml.grammars.generated.C4L2Parser.System_extContext ctx)

      Collects the alias of an external system definition in a `SourceType.C4_L2` grammar.

      Enter a parse tree produced by `C4L2Parser.system_ext()`.

      Parameters:
        `ctx` - the parse tree

    - #### enterSystem_ext

          public void enterSystem_ext(org.thewonderlemming.c4plantuml.grammars.generated.C4L3Parser.System_extContext ctx)

      Collects the alias of an external system definition in a `SourceType.C4_L3` grammar.

      Enter a parse tree produced by `C4L3Parser.system_ext()`.

      Parameters:
        `ctx` - the parse tree

Copyright © 2020. All rights reserved.