Interface CommonStmtCtx
- All Known Subinterfaces:
BoundStmtCtx<A>,BoundStmtCtxCompat<A,,D> EffectiveStmtCtx,EffectiveStmtCtx.Current<A,,D> EffectiveStmtCtx.Parent,EffectiveStmtCtx.UndeclaredCurrent<A,,D> NamespaceStmtCtx,RootStmtContext<A,,D, E> RootStmtContext.Mutable<A,,D, E> StmtContext<A,,D, E> StmtContext.Mutable<A,,D, E> StmtContextCompat
@Beta
public interface CommonStmtCtx
Common interface for all statement contexts, exposing information which is always available. Note this includes only
stateless information -- hence we have
rawArgument() but do not have an equivalent argument().-
Method Summary
Modifier and TypeMethodDescriptiondefault @NonNull StringReturn the statement argument in literal format.default <D extends org.opendaylight.yangtools.yang.model.api.meta.DeclaredStatement<?>>
booleanproducesDeclared(Class<? super D> type) Return true if this context produces specifiedDeclaredStatementrepresentation.default <E extends org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement<?,?>>
booleanproducesEffective(Class<? super E> type) Return true if this context produces specifiedEffectiveStatementrepresentation.@NonNull org.opendaylight.yangtools.yang.model.api.meta.StatementDefinition@Nullable StringReturn the statement argument in literal format.@NonNull StatementSourceReferenceReturns a reference to statement source.
-
Method Details
-
publicDefinition
@NonNull org.opendaylight.yangtools.yang.model.api.meta.StatementDefinition publicDefinition() -
producesDeclared
default <D extends org.opendaylight.yangtools.yang.model.api.meta.DeclaredStatement<?>> boolean producesDeclared(Class<? super D> type) Return true if this context produces specifiedDeclaredStatementrepresentation.- Type Parameters:
D- Declared Statement representation- Parameters:
type- DeclaredStatement representation- Returns:
- True if this context results in specified
DeclaredStatementrepresentation
-
producesEffective
default <E extends org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement<?,?>> boolean producesEffective(Class<? super E> type) Return true if this context produces specifiedEffectiveStatementrepresentation.- Type Parameters:
E- Effective Statement representation- Parameters:
type- EffectiveStatement representation- Returns:
- True if this context results in specified
EffectiveStatementrepresentation
-
sourceReference
@NonNull StatementSourceReference sourceReference()Returns a reference to statement source.- Returns:
- reference of statement source
-
rawArgument
@Nullable String rawArgument()Return the statement argument in literal format.- Returns:
- raw statement argument string, or null if this statement does not have an argument.
-
getRawArgument
Return the statement argument in literal format.- Returns:
- raw statement argument string
- Throws:
com.google.common.base.VerifyException- if this statement does not have an argument
-