Interface StatementFactory<A,D extends org.opendaylight.yangtools.yang.model.api.meta.DeclaredStatement<A>,E extends org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement<A,D>>

Type Parameters:
A - Argument type
D - Declared Statement representation
E - Effective Statement representation
All Known Implementing Classes:
AbstractBooleanStatementSupport, AbstractEmptyStatementSupport, AbstractInternedStatementSupport, AbstractInternedStringStatementSupport, AbstractQNameStatementSupport, AbstractSchemaTreeStatementSupport, AbstractStatementSupport, AbstractStringStatementSupport, AbstractUnqualifiedStatementSupport, ForwardingStatementSupport, StatementSupport

public interface StatementFactory<A,D extends org.opendaylight.yangtools.yang.model.api.meta.DeclaredStatement<A>,E extends org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement<A,D>>
An entity capable of creating DeclaredStatement and EffectiveStatement instances for a particular type. This interface is usually realized as an implementation-specific combination with StatementSupport.
  • Method Details

    • createDeclared

      @NonNull D createDeclared(@NonNull BoundStmtCtx<A> ctx, @NonNull Stream<org.opendaylight.yangtools.yang.model.api.meta.DeclaredStatement<?>> substatements)
      Create a DeclaredStatement for specified context.
      Parameters:
      ctx - Statement context
      substatements - Declared substatements
      Returns:
      A declared statement instance.
    • createEffective

      @NonNull E createEffective(@NonNull EffectiveStmtCtx.Current<A,D> stmt, Stream<? extends StmtContext<?,?,?>> declaredSubstatements, Stream<? extends StmtContext<?,?,?>> inferredSubstatements)
      Create a EffectiveStatement for specified context.
      Parameters:
      stmt - Effective capture of this statement's significant state
      declaredSubstatements - effectively-visible declared substatements
      inferredSubstatements - effectively-visible inferred substatements
      Returns:
      An effective statement instance
    • copyEffective

      @NonNull E copyEffective(@NonNull EffectiveStmtCtx.Current<A,D> stmt, @NonNull E original)
      Create a EffectiveStatement copy of provided original for specified context.
      Parameters:
      stmt - Effective capture of this statement's significant state
      original - Original effective statement
      Returns:
      An effective statement instance
      Throws:
      NullPointerException - if any argument is null
    • canReuseCurrent

      boolean canReuseCurrent(@NonNull EffectiveStmtCtx.Current<A,D> copy, @NonNull EffectiveStmtCtx.Current<A,D> current, @NonNull Collection<? extends org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement<?,?>> substatements)
      Determine reactor copy behaviour of a statement instance. Implementations classes are required to determine their operations with regard to their statements being replicated into different contexts -- potentially sharing instantiations.

      Implementations are examine copy as to whether it would result in the same semantics as current does, provided that current's substatements are properly propagated.

      Parameters:
      copy - Copy of current effective context
      current - Current effective context
      substatements - Current effective substatements
      Returns:
      True if the differences between copy and current do not affect this statement's effective semantics.
      Throws:
      NullPointerException - if any argument is null
    • extractEffectiveState

      @Nullable EffectiveStatementState extractEffectiveState(@NonNull E stmt)
      Return the EffectiveStatementState for a particular statement. This acts as a summary for comparison with statements created by this factory, without taking substatements into account. This is an optional operation, it is always safe to return null.
      Parameters:
      stmt - EffectiveStatement to examine
      Returns:
      EffectiveStatementState or null if the statement cannot be expressed