@Beta public abstract class AbstractConstraintEffectiveStatement<A,D extends DeclaredStatement<A>> extends AbstractEffectiveDocumentedNodeWithoutStatus<A,D> implements ConstraintMetaDefinition
DocumentedNode.WithStatus
Modifier | Constructor and Description |
---|---|
protected |
AbstractConstraintEffectiveStatement(StmtContext<A,D,?> ctx) |
Modifier and Type | Method and Description |
---|---|
A |
argument()
Returns statement argument.
|
protected abstract A |
createConstraints(A argument) |
Optional<String> |
getErrorAppTag()
Returns the value of the argument of YANG
error-app-tag keyword. |
Optional<String> |
getErrorMessage()
Returns the value of the argument of YANG
error-message keyword. |
ModifierKind |
getModifier() |
boolean |
isCustomizedStatement() |
protected static @NonNull Object |
maskList(ImmutableList<?> list)
Utility method for squashing singleton lists into single objects.
|
protected static <T> @NonNull ImmutableList<T> |
unmaskList(@NonNull Object masked,
@NonNull Class<T> type)
Utility method for recovering singleton lists squashed by
maskList(ImmutableList) . |
getDescription, getReference, nullableDescription, nullableReference
getDeclared, getStatementSource, statementDefinition
allSubstatementsOfType, effectiveSubstatements, firstEffectiveSubstatementOfType, firstSchemaNode, firstSubstatementOfType, firstSubstatementOfType, initSubstatements, initSubstatements
get, getAll, getNamespaceContents, unmaskList
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDescription, getReference, getUnknownSchemaNodes
findAll, findFirstEffectiveSubstatement, findFirstEffectiveSubstatementArgument, streamEffectiveSubstatements
protected AbstractConstraintEffectiveStatement(StmtContext<A,D,?> ctx)
public final A argument()
ModelStatement
argument
in interface ModelStatement<A>
argument
in class DeclaredEffectiveStatementBase<A,D extends DeclaredStatement<A>>
public final boolean isCustomizedStatement()
public final ModifierKind getModifier()
public final Optional<String> getErrorAppTag()
ConstraintMetaDefinition
error-app-tag
keyword.getErrorAppTag
in interface ConstraintMetaDefinition
public final Optional<String> getErrorMessage()
ConstraintMetaDefinition
error-message
keyword.getErrorMessage
in interface ConstraintMetaDefinition
protected static final @NonNull Object maskList(ImmutableList<?> list)
list
- list to maskNullPointerException
- if list is nullprotected static final <T> @NonNull ImmutableList<T> unmaskList(@NonNull Object masked, @NonNull Class<T> type)
maskList(ImmutableList)
.masked
- list to unmaskNullPointerException
- if any argument is nullClassCastException
- if masked object does not match expected classCopyright © 2020 OpenDaylight. All rights reserved.