Class EffectiveStmtUtils
- java.lang.Object
-
- org.opendaylight.yangtools.yang.parser.rfc7950.stmt.EffectiveStmtUtils
-
-
Method Summary
-
-
-
Method Detail
-
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 versiontypeStmt
- type statement which should be checkeddefaultValues
- 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 versiontypeStmt
- type statement which should be checkeddefaultValue
- 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)
-
-