Class AbstractSchemaTreeStatementSupport<D extends org.opendaylight.yangtools.yang.model.api.meta.DeclaredStatement<QName>,E extends org.opendaylight.yangtools.yang.model.api.stmt.SchemaTreeEffectiveStatement<D>>

Type Parameters:
D - Declared Statement representation
E - 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.
  • 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 the StatementSupport.StatementPolicy corresponding to a potentially-instantiated YANG statement. Statements are reused as long as:

      Typical users include container and leaf.

      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 the StatementSupport.StatementPolicy corresponding to an uninstantiated YANG statement. Statements are reused as long as:

      Typical users include action and notification (in its YANG 1.1 form).

      Type Parameters:
      D - Declared Statement representation
      Returns:
      A StatementPolicy
    • onStatementAdded

      public void onStatementAdded(StmtContext.Mutable<QName,D,E> stmt)
      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 via StmtContext.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:
      onStatementAdded in class StatementSupport<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

      public QName parseArgumentValue(StmtContext<?,?,?> ctx, String value)
      Description copied from class: StatementSupport
      Parses textual representation of argument in object representation.
      Specified by:
      parseArgumentValue in class StatementSupport<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