Class YangDataStatementSupport
java.lang.Object
org.opendaylight.yangtools.yang.parser.spi.meta.StatementSupport<A,D,E>
org.opendaylight.yangtools.yang.parser.spi.meta.AbstractStatementSupport<YangDataName,YangDataStatement,YangDataEffectiveStatement>
org.opendaylight.yangtools.rfc8040.parser.YangDataStatementSupport
- All Implemented Interfaces:
StatementFactory<YangDataName,
YangDataStatement, YangDataEffectiveStatement>
@Beta
public final class YangDataStatementSupport
extends AbstractStatementSupport<YangDataName,YangDataStatement,YangDataEffectiveStatement>
-
Nested Class Summary
Nested classes/interfaces inherited from class org.opendaylight.yangtools.yang.parser.spi.meta.StatementSupport
StatementSupport.CopyPolicy, StatementSupport.StatementEquality<A,
D extends DeclaredStatement<A>>, StatementSupport.StatementPolicy<A, D extends DeclaredStatement<A>> -
Field Summary
Fields inherited from class org.opendaylight.yangtools.yang.parser.spi.meta.StatementSupport
NAMESPACE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected YangDataStatement
attachDeclarationReference
(YangDataStatement stmt, DeclarationReference reference) Attach specifiedDeclarationReference
to a baseline declared statement.protected YangDataStatement
createDeclared
(BoundStmtCtx<YangDataName> ctx, ImmutableList<DeclaredStatement<?>> substatements) protected YangDataEffectiveStatement
createEffective
(EffectiveStmtCtx.Current<YangDataName, YangDataStatement> stmt, ImmutableList<? extends EffectiveStatement<?, ?>> substatements) boolean
Returns true if this statement support and all its substatements ignore config statements (e.g.boolean
Returns true if this statement support and all its substatements ignore if-feature statements (e.g.void
onFullDefinitionDeclared
(StmtContext.Mutable<YangDataName, YangDataStatement, YangDataEffectiveStatement> ctx) Invoked when statement is closed duringModelProcessingPhase.FULL_DECLARATION
phase, only substatements from this phase are available.void
onStatementAdded
(StmtContext.Mutable<YangDataName, YangDataStatement, YangDataEffectiveStatement> ctx) Invoked when a statement supported by this instance is added to build context.parseArgumentValue
(StmtContext<?, ?, ?> ctx, String value) Parses textual representation of argument in object representation.Methods inherited from class org.opendaylight.yangtools.yang.parser.spi.meta.AbstractStatementSupport
buildEffectiveSubstatements, copyEffective, createDeclared, createEffective, findFirstArgument, findFirstStatement, statementsToBuild, substatementValidator
Methods inherited from class org.opendaylight.yangtools.yang.parser.spi.meta.StatementSupport
adaptArgumentValue, argumentName, canReuseCurrent, copyPolicy, definition, extractEffectiveState, getArgumentDefinition, getPublicView, getSupportSpecificForArgument, hasArgumentSpecificSupports, internArgument, onLinkageDeclared, onPreLinkageDeclared, onStatementDefinitionDeclared, statementName
-
Constructor Details
-
YangDataStatementSupport
-
-
Method Details
-
parseArgumentValue
Description copied from class:StatementSupport
Parses textual representation of argument in object representation.- Specified by:
parseArgumentValue
in classStatementSupport<YangDataName,
YangDataStatement, YangDataEffectiveStatement> - Parameters:
ctx
- Context, which may be used to access source-specific namespaces required for parsing.value
- String representation of value, as was present in text source.- Returns:
- Parsed value
-
onStatementAdded
public void onStatementAdded(StmtContext.Mutable<YangDataName, YangDataStatement, YangDataEffectiveStatement> ctx) Description copied from class:StatementSupport
Invoked when a statement supported by this instance is added to build context. This allows implementations of this interface to start tracking the statement and perform any modifications to the build context hierarchy, accessible viaStmtContext.getParentContext()
. One such use is populating the parent's namespaces to allow it to locate this child statement.- Overrides:
onStatementAdded
in classStatementSupport<YangDataName,
YangDataStatement, YangDataEffectiveStatement> - Parameters:
ctx
- Context of added statement. No substatements are available.
-
onFullDefinitionDeclared
public void onFullDefinitionDeclared(StmtContext.Mutable<YangDataName, YangDataStatement, YangDataEffectiveStatement> ctx) Description copied from class:StatementSupport
Invoked when statement is closed duringModelProcessingPhase.FULL_DECLARATION
phase, only substatements from this phase are available.Implementation may use method to perform actions on this event or register modification action using
StmtContext.Mutable.newInferenceAction(ModelProcessingPhase)
.- Overrides:
onFullDefinitionDeclared
in classStatementSupport<YangDataName,
YangDataStatement, YangDataEffectiveStatement> - Parameters:
ctx
- Context of added statement. Argument and statement parent is accessible.
-
isIgnoringIfFeatures
public boolean isIgnoringIfFeatures()Description copied from class:StatementSupport
Returns true if this statement support and all its substatements ignore if-feature statements (e.g. yang-data extension defined in RFC 8040). Default implementation returns false.- Overrides:
isIgnoringIfFeatures
in classStatementSupport<YangDataName,
YangDataStatement, YangDataEffectiveStatement> - Returns:
- true if this statement support ignores if-feature statements, otherwise false.
-
isIgnoringConfig
public boolean isIgnoringConfig()Description copied from class:StatementSupport
Returns true if this statement support and all its substatements ignore config statements (e.g. yang-data extension defined in RFC 8040). Default implementation returns false.- Overrides:
isIgnoringConfig
in classStatementSupport<YangDataName,
YangDataStatement, YangDataEffectiveStatement> - Returns:
- true if this statement support ignores config statements, otherwise false.
-
createDeclared
protected YangDataStatement createDeclared(BoundStmtCtx<YangDataName> ctx, ImmutableList<DeclaredStatement<?>> substatements) - Specified by:
createDeclared
in classAbstractStatementSupport<YangDataName,
YangDataStatement, YangDataEffectiveStatement>
-
attachDeclarationReference
protected YangDataStatement attachDeclarationReference(YangDataStatement stmt, DeclarationReference reference) Description copied from class:AbstractStatementSupport
Attach specifiedDeclarationReference
to a baseline declared statement. If an implementation does not support attaching DeclarationReferences, it should return the statement unchanged.- Specified by:
attachDeclarationReference
in classAbstractStatementSupport<YangDataName,
YangDataStatement, YangDataEffectiveStatement> - Parameters:
stmt
- Declared statementreference
-DeclarationReference
to attach- Returns:
- Equivalent of stmt, potentially with specified reference attached.
-
createEffective
protected YangDataEffectiveStatement createEffective(EffectiveStmtCtx.Current<YangDataName, YangDataStatement> stmt, ImmutableList<? extends EffectiveStatement<?, ?>> substatements) - Specified by:
createEffective
in classAbstractStatementSupport<YangDataName,
YangDataStatement, YangDataEffectiveStatement>
-