Class AbstractSchemaTreeStatementSupport<D extends org.opendaylight.yangtools.yang.model.api.meta.DeclaredStatement<QName>,E extends org.opendaylight.yangtools.yang.model.api.stmt.SchemaTreeEffectiveStatement<D>>
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.yang.parser.spi.meta.AbstractQNameStatementSupport<D,E>
org.opendaylight.yangtools.yang.parser.spi.meta.AbstractSchemaTreeStatementSupport<D,E>
- Type Parameters:
D- Declared Statement representationE- Effective Statement representation
- All Implemented Interfaces:
StatementFactory<QName,D, E>
@Beta
public abstract class AbstractSchemaTreeStatementSupport<D extends org.opendaylight.yangtools.yang.model.api.meta.DeclaredStatement<QName>,E extends org.opendaylight.yangtools.yang.model.api.stmt.SchemaTreeEffectiveStatement<D>>
extends AbstractQNameStatementSupport<D,E>
Specialization of
AbstractQNameStatementSupport for SchemaTreeEffectiveStatement implementations.
Every statement automatically participates in SchemaTreeNamespace.-
Nested Class Summary
Nested classes/interfaces inherited from class org.opendaylight.yangtools.yang.parser.spi.meta.StatementSupport
StatementSupport.CopyPolicy, StatementSupport.StatementEquality<A,D extends org.opendaylight.yangtools.yang.model.api.meta.DeclaredStatement<A>>, StatementSupport.StatementPolicy<A, D extends org.opendaylight.yangtools.yang.model.api.meta.DeclaredStatement<A>> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractSchemaTreeStatementSupport(org.opendaylight.yangtools.yang.model.api.meta.StatementDefinition publicDefinition, StatementSupport.StatementPolicy<QName, D> policy, org.opendaylight.yangtools.yang.parser.api.YangParserConfiguration config, @Nullable SubstatementValidator validator) -
Method Summary
Modifier and TypeMethodDescriptionstatic final <D extends org.opendaylight.yangtools.yang.model.api.meta.DeclaredStatement<QName>>
StatementSupport.StatementPolicy<QName,D> Return theStatementSupport.StatementPolicycorresponding to a potentially-instantiated YANG statement.voidonStatementAdded(StmtContext.Mutable<QName, D, E> stmt) 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.static final <D extends org.opendaylight.yangtools.yang.model.api.meta.DeclaredStatement<QName>>
StatementSupport.StatementPolicy<QName,D> Return theStatementSupport.StatementPolicycorresponding to an uninstantiated YANG statement.Methods inherited from class org.opendaylight.yangtools.yang.parser.spi.meta.AbstractQNameStatementSupport
adaptArgumentValueMethods inherited from class org.opendaylight.yangtools.yang.parser.spi.meta.AbstractStatementSupport
attachDeclarationReference, buildEffectiveSubstatements, copyEffective, createDeclared, createDeclared, createEffective, createEffective, findFirstArgument, findFirstStatement, statementsToBuild, substatementValidatorMethods inherited from class org.opendaylight.yangtools.yang.parser.spi.meta.StatementSupport
argumentName, canReuseCurrent, copyPolicy, definition, extractEffectiveState, getArgumentDefinition, getPublicView, getSupportSpecificForArgument, hasArgumentSpecificSupports, internArgument, isIgnoringConfig, isIgnoringIfFeatures, onFullDefinitionDeclared, onLinkageDeclared, onPreLinkageDeclared, onStatementDefinitionDeclared, statementName
-
Constructor Details
-
AbstractSchemaTreeStatementSupport
protected AbstractSchemaTreeStatementSupport(org.opendaylight.yangtools.yang.model.api.meta.StatementDefinition publicDefinition, StatementSupport.StatementPolicy<QName, D> policy, org.opendaylight.yangtools.yang.parser.api.YangParserConfiguration config, @Nullable SubstatementValidator validator)
-
-
Method Details
-
instantiatedPolicy
public static final <D extends org.opendaylight.yangtools.yang.model.api.meta.DeclaredStatement<QName>> StatementSupport.StatementPolicy<QName,D> instantiatedPolicy()Return theStatementSupport.StatementPolicycorresponding to a potentially-instantiated YANG statement. Statements are reused as long as:BoundStmtCtx.argument()does not changeStmtContextCompat.history()does not change as far asCopyableNodeis concernedEffectiveStmtCtx.Parent.effectiveConfig()does not change
Typical users include
containerandleaf.- Type Parameters:
D- Declared Statement representation- Returns:
- A StatementPolicy
-
uninstantiatedPolicy
public static final <D extends org.opendaylight.yangtools.yang.model.api.meta.DeclaredStatement<QName>> StatementSupport.StatementPolicy<QName,D> uninstantiatedPolicy()Return theStatementSupport.StatementPolicycorresponding to an uninstantiated YANG statement. Statements are reused as long as:BoundStmtCtx.argument()does not changeStmtContextCompat.history()does not change as far asCopyableNodeis concerned
Typical users include
actionandnotification(in its YANG 1.1 form).- Type Parameters:
D- Declared Statement representation- Returns:
- A StatementPolicy
-
onStatementAdded
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.This method ensures the statement is added to its parent
SchemaTreeNamespace.- Overrides:
onStatementAddedin classStatementSupport<QName,D extends org.opendaylight.yangtools.yang.model.api.meta.DeclaredStatement<QName>, E extends org.opendaylight.yangtools.yang.model.api.stmt.SchemaTreeEffectiveStatement<D>> - Parameters:
stmt- Context of added statement. No substatements are available.
-
parseArgumentValue
Description copied from class:StatementSupportParses textual representation of argument in object representation.- Specified by:
parseArgumentValuein classStatementSupport<QName,D extends org.opendaylight.yangtools.yang.model.api.meta.DeclaredStatement<QName>, E extends org.opendaylight.yangtools.yang.model.api.stmt.SchemaTreeEffectiveStatement<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
-