Interface BoundStmtCtx<A>

Type Parameters:
A - Argument type
All Superinterfaces:
CommonStmtCtx
All Known Subinterfaces:
BoundStmtCtxCompat<A,D>, EffectiveStmtCtx.Current<A,D>, EffectiveStmtCtx.UndeclaredCurrent<A,D>, RootStmtContext<A,D,E>, RootStmtContext.Mutable<A,D,E>, StmtContext<A,D,E>, StmtContext.Mutable<A,D,E>

@Beta public interface BoundStmtCtx<A> extends CommonStmtCtx
A CommonStmtCtx which has additionally been bound to a StatementSupport. It provides argument() as interpreted by that support.
  • Method Details

    • argument

      @Nullable A argument()
      Return the statement argument.
      Returns:
      statement argument, or null if this statement does not have an argument
    • getArgument

      default @NonNull A getArgument()
      Return the statement argument in literal format.
      Returns:
      raw statement argument string
      Throws:
      VerifyException - if this statement does not have an argument
    • yangVersion

      @NonNull YangVersion yangVersion()
      Return the YangVersion associated with this statement.
      Returns:
      YANG version used to bind this statement
    • findSubstatementArgument

      <X, Z extends EffectiveStatement<X, ?>> @NonNull Optional<X> findSubstatementArgument(@NonNull Class<Z> type)
      Search of any child statement context of specified type and return its argument. If such a statement exists, it is assumed to have the right argument. Users should be careful to use this method for statements which have cardinality 0..1, otherwise this method can return any one of the statement's argument.
      Type Parameters:
      X - Substatement argument type
      Z - Substatement effective statement representation
      Parameters:
      type - Effective statement representation being look up
      Returns:
      Optional.empty() if no statement exists, otherwise the argument value
    • hasSubstatement

      boolean hasSubstatement(@NonNull Class<? extends EffectiveStatement<?,?>> type)
      Check if there is any child statement context of specified type.
      Parameters:
      type - Effective statement representation being look up
      Returns:
      True if such a child statement exists, false otherwise