Class ContextReferenceStatementSupport
- java.lang.Object
-
- org.opendaylight.yangtools.yang.parser.spi.meta.StatementSupport<A,D,E>
-
- org.opendaylight.yangtools.yang.parser.spi.meta.AbstractStatementSupport<QName,D,E>
-
- org.opendaylight.yangtools.odlext.parser.ContextReferenceStatementSupport
-
- All Implemented Interfaces:
Immutable
,MutationBehaviour<Immutable>
,StatementDefinition
,StatementFactory<QName,ContextReferenceStatement,ContextReferenceEffectiveStatement>
@Beta public final class ContextReferenceStatementSupport extends AbstractStatementSupport<QName,D,E>
-
-
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>>
-
-
Constructor Summary
Constructors Constructor Description ContextReferenceStatementSupport(YangParserConfiguration config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ContextReferenceStatement
attachDeclarationReference(ContextReferenceStatement stmt, DeclarationReference reference)
Attach specifiedDeclarationReference
to a baseline declared statement.protected ContextReferenceStatement
createDeclared(StmtContext<QName,ContextReferenceStatement,?> ctx, ImmutableList<? extends DeclaredStatement<?>> substatements)
protected E
createEffective(EffectiveStmtCtx.Current<QName,D> stmt, ImmutableList<? extends EffectiveStatement<?,?>> substatements)
void
onStatementDefinitionDeclared(StmtContext.Mutable<QName,D,E> stmt)
Invoked when statement is closed duringModelProcessingPhase.STATEMENT_DEFINITION
phase, only substatements from this phase are available.QName
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, canReuseCurrent, copyPolicy, getArgumentDefinition, getDeclaredRepresentationClass, getEffectiveRepresentationClass, getPublicView, getStatementName, getSupportSpecificForArgument, hasArgumentSpecificSupports, internArgument, isIgnoringConfig, isIgnoringIfFeatures, onFullDefinitionDeclared, onLinkageDeclared, onPreLinkageDeclared, onStatementAdded
-
-
-
-
Constructor Detail
-
ContextReferenceStatementSupport
public ContextReferenceStatementSupport(YangParserConfiguration config)
-
-
Method Detail
-
createDeclared
protected ContextReferenceStatement createDeclared(StmtContext<QName,ContextReferenceStatement,?> ctx, ImmutableList<? extends DeclaredStatement<?>> substatements)
- Specified by:
createDeclared
in classAbstractStatementSupport<QName,ContextReferenceStatement,ContextReferenceEffectiveStatement>
-
attachDeclarationReference
protected ContextReferenceStatement attachDeclarationReference(ContextReferenceStatement 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<QName,ContextReferenceStatement,ContextReferenceEffectiveStatement>
- Parameters:
stmt
- Declared statementreference
-DeclarationReference
to attach- Returns:
- Equivalent of stmt, potentially with specified reference attached.
-
parseArgumentValue
public final QName parseArgumentValue(StmtContext<?,?,?> ctx, String value)
Description copied from class:StatementSupport
Parses textual representation of argument in object representation.- Specified by:
parseArgumentValue
in classStatementSupport<QName,D extends DeclaredStatement<QName>,E extends EffectiveStatement<QName,D>>
- 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
-
onStatementDefinitionDeclared
public void onStatementDefinitionDeclared(StmtContext.Mutable<QName,D,E> stmt)
Description copied from class:StatementSupport
Invoked when statement is closed duringModelProcessingPhase.STATEMENT_DEFINITION
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:
onStatementDefinitionDeclared
in classStatementSupport<QName,D extends DeclaredStatement<QName>,E extends EffectiveStatement<QName,D>>
- Parameters:
stmt
- Context of added statement. Argument and statement parent is accessible.
-
createEffective
protected final E createEffective(EffectiveStmtCtx.Current<QName,D> stmt, ImmutableList<? extends EffectiveStatement<?,?>> substatements)
- Specified by:
createEffective
in classAbstractStatementSupport<QName,D extends DeclaredStatement<QName>,E extends EffectiveStatement<QName,D>>
-
-