Class EffectiveStmtUtils

java.lang.Object
org.opendaylight.yangtools.yang.parser.rfc7950.stmt.EffectiveStmtUtils

@Beta public final class EffectiveStmtUtils extends Object
  • Method Details

    • createNameCollisionSourceException

      public static SourceException createNameCollisionSourceException(EffectiveStmtCtx.Current<?,?> stmt, EffectiveStatement<?,?> effectiveStatement)
    • createElementCountConstraint

      public static Optional<ElementCountConstraint> createElementCountConstraint(EffectiveStatement<?,?> stmt)
    • createElementCountConstraint

      public static Optional<ElementCountConstraint> createElementCountConstraint(ImmutableList<? extends EffectiveStatement<?,?>> substatements)
    • hasDefaultValueMarkedWithIfFeature

      public static boolean hasDefaultValueMarkedWithIfFeature(YangVersion yangVersion, TypeEffectiveStatement<?> typeStmt, Set<String> defaultValues)
      Checks whether supplied type has any of specified default values marked with an if-feature. This method creates mutable copy of supplied set of default values.
      Parameters:
      yangVersion - yang version
      typeStmt - type statement which should be checked
      defaultValues - set of default values which should be checked. The method creates mutable copy of this set
      Returns:
      true if any of specified default values is marked with an if-feature, otherwise false
    • hasDefaultValueMarkedWithIfFeature

      public static boolean hasDefaultValueMarkedWithIfFeature(YangVersion yangVersion, TypeEffectiveStatement<?> typeStmt, String defaultValue)
      Checks whether supplied type has specified default value marked with an if-feature. This method creates mutable set of supplied default value.
      Parameters:
      yangVersion - yang version
      typeStmt - type statement which should be checked
      defaultValue - default value to be checked
      Returns:
      true if specified default value is marked with an if-feature, otherwise false
    • checkUniqueGroupings

      public static void checkUniqueGroupings(EffectiveStmtCtx.Current<?,?> stmt, Collection<? extends EffectiveStatement<?,?>> statements)
    • checkUniqueTypedefs

      public static void checkUniqueTypedefs(EffectiveStmtCtx.Current<?,?> stmt, Collection<? extends EffectiveStatement<?,?>> statements)
    • checkUniqueUses

      public static void checkUniqueUses(EffectiveStmtCtx.Current<?,?> stmt, Collection<? extends EffectiveStatement<?,?>> statements)
    • historyAndStatusFlags

      public static int historyAndStatusFlags(CopyableNode history, Collection<? extends EffectiveStatement<?,?>> substatements)
    • historyAndStatusFlags

      public static <T extends CopyableNode & DocumentedNode.WithStatus> int historyAndStatusFlags(T stmt)