org.thewonderlemming.c4plantuml.mojo.linting.rules.builtin

## Enum BuiltInLintingRulesFactory

- java.lang.Object
- - java.lang.Enum<BuiltInLintingRulesFactory>
  - - org.thewonderlemming.c4plantuml.mojo.linting.rules.builtin.BuiltInLintingRulesFactory

- All Implemented Interfaces:
    Serializable, Comparable<BuiltInLintingRulesFactory>

      public enum BuiltInLintingRulesFactory
      extends Enum<BuiltInLintingRulesFactory>

  Maps `AbstractLintingRule` classes to their `AbstractRuleParametersFactory` and their name.
  Author:
    thewonderlemming

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `ALIASES_SHOULD_BE_LISTED_IN_DICTIONARY` The `AliasesShouldBeListedInDictionaryRule` mapping.
    `ALIASES_SHOULD_BE_UNIQUE` The `AliasesShouldBeUniqueRule` mapping.
    `ALIASES_SHOULD_FOLLOW_STANDARD_CONVENTION` The `AliasesShouldFollowStandardConventionRule` mapping.
    `NO_DUPLICATES_IN_RELATIONSHIPS` The `NoDuplicateRelationshipsRule` mapping.
    `NO_ORPHAN_ALIAS_IN_BOUNDARIES` The `NoOrphanAliasInBoundariesRule` mapping.
    `NO_ORPHAN_ALIAS_IN_LAYOUTS` The `NoOrphanAliasInLayoutsRule` mapping.
    `NO_ORPHAN_ALIAS_IN_RELATIONSHIPS` The `NoOrphanAliasInRelationshipsRule` mapping.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static Optional<AbstractLintingRule>` | `createInstanceForName(String ruleName, BuiltInRules parameters)` Builds a `AbstractLintingRule` instance, given its name and the `BuiltInRules` parameters POJO.
    `String` | `getRuleName()` Returns the name of the current mapping.
    `static Optional<String>` | `getRuleNameForType(Class<? extends AbstractLintingRule> ruleType)` Returns the mapped name of a `AbstractLintingRule`, given its type.
    `Class<? extends AbstractLintingRule>` | `getRuleType()` Returns the `AbstractLintingRule` type of the current mapping.
    `static boolean` | `isBuiltInLintingRule(Class<? extends AbstractLintingRule> lintingRuleType)` Tells whether or not the given `AbstractLintingRule` is a built-in rule, or a custom one, which requires a different building process.
    `static BuiltInLintingRulesFactory` | `valueOf(String name)` Returns the enum constant of this type with the specified name.
    `static BuiltInLintingRulesFactory[]` | `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

    - #### ALIASES_SHOULD_BE_LISTED_IN_DICTIONARY

          public static final BuiltInLintingRulesFactory ALIASES_SHOULD_BE_LISTED_IN_DICTIONARY

      The `AliasesShouldBeListedInDictionaryRule` mapping.

    - #### ALIASES_SHOULD_BE_UNIQUE

          public static final BuiltInLintingRulesFactory ALIASES_SHOULD_BE_UNIQUE

      The `AliasesShouldBeUniqueRule` mapping.

    - #### ALIASES_SHOULD_FOLLOW_STANDARD_CONVENTION

          public static final BuiltInLintingRulesFactory ALIASES_SHOULD_FOLLOW_STANDARD_CONVENTION

      The `AliasesShouldFollowStandardConventionRule` mapping.

    - #### NO_DUPLICATES_IN_RELATIONSHIPS

          public static final BuiltInLintingRulesFactory NO_DUPLICATES_IN_RELATIONSHIPS

      The `NoDuplicateRelationshipsRule` mapping.

    - #### NO_ORPHAN_ALIAS_IN_BOUNDARIES

          public static final BuiltInLintingRulesFactory NO_ORPHAN_ALIAS_IN_BOUNDARIES

      The `NoOrphanAliasInBoundariesRule` mapping.

    - #### NO_ORPHAN_ALIAS_IN_LAYOUTS

          public static final BuiltInLintingRulesFactory NO_ORPHAN_ALIAS_IN_LAYOUTS

      The `NoOrphanAliasInLayoutsRule` mapping.

    - #### NO_ORPHAN_ALIAS_IN_RELATIONSHIPS

          public static final BuiltInLintingRulesFactory NO_ORPHAN_ALIAS_IN_RELATIONSHIPS

      The `NoOrphanAliasInRelationshipsRule` mapping.

  - ### Method Detail

    - #### values

          public static BuiltInLintingRulesFactory[] 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 (BuiltInLintingRulesFactory c : BuiltInLintingRulesFactory.values())
              System.out.println(c);

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

    - #### valueOf

          public static BuiltInLintingRulesFactory 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

    - #### createInstanceForName

          public static Optional<AbstractLintingRule> createInstanceForName(String ruleName,
                                                                            BuiltInRules parameters)

      Builds a `AbstractLintingRule` instance, given its name and the `BuiltInRules` parameters POJO.
      Parameters:
        `ruleName` - the name of the rule to build.
        `parameters` - the `pom.xml` configuration.
      Returns:
        an `Optional` of the built rule on success, or empty else.

    - #### getRuleNameForType

          public static Optional<String> getRuleNameForType(Class<? extends AbstractLintingRule> ruleType)

      Returns the mapped name of a `AbstractLintingRule`, given its type.
      Parameters:
        `ruleType` - the type of the rule to retrieve the name from.
      Returns:
        an `Optional` of the name of the rule if found, empty else.

    - #### isBuiltInLintingRule

          public static boolean isBuiltInLintingRule(Class<? extends AbstractLintingRule> lintingRuleType)

      Tells whether or not the given `AbstractLintingRule` is a built-in rule, or a custom one, which requires a different building process.
      Parameters:
        `lintingRuleType` - the type of the rule to check for.
      Returns:
        `true` if the rule is a built-in one, `false` else.

    - #### getRuleName

          public String getRuleName()

      Returns the name of the current mapping.
      Returns:
        the name of the mapping.

    - #### getRuleType

          public Class<? extends AbstractLintingRule> getRuleType()

      Returns the `AbstractLintingRule` type of the current mapping.
      Returns:
        the type of the current mapping.

Copyright © 2020. All rights reserved.