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
- All Known Implementing Classes:
RootStatementContext
@Beta public interface CommonStmtCtx
Common interface for all statement contexts, exposing information which is always available. Note this includes only stateless information -- hence we haverawArgument()
but do not have an equivalentargument()
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default @NonNull String
getRawArgument()
Return the statement argument in literal format.default <D extends DeclaredStatement<?>>
booleanproducesDeclared(Class<? super D> type)
Return true if this context produces specifiedDeclaredStatement
representation.default <E extends EffectiveStatement<?,?>>
booleanproducesEffective(Class<? super E> type)
Return true if this context produces specifiedEffectiveStatement
representation.@NonNull StatementDefinition
publicDefinition()
@Nullable String
rawArgument()
Return the statement argument in literal format.@NonNull StatementSourceReference
sourceReference()
Returns a reference to statement source.
-
-
-
Method Detail
-
publicDefinition
@NonNull StatementDefinition publicDefinition()
-
producesDeclared
default <D extends DeclaredStatement<?>> boolean producesDeclared(Class<? super D> type)
Return true if this context produces specifiedDeclaredStatement
representation.- Type Parameters:
D
- Declared Statement representation- Parameters:
type
- DeclaredStatement representation- Returns:
- True if this context results in specified
DeclaredStatement
representation
-
producesEffective
default <E extends EffectiveStatement<?,?>> boolean producesEffective(Class<? super E> type)
Return true if this context produces specifiedEffectiveStatement
representation.- Type Parameters:
E
- Effective Statement representation- Parameters:
type
- EffectiveStatement representation- Returns:
- True if this context results in specified
EffectiveStatement
representation
-
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
default @NonNull String getRawArgument()
Return the statement argument in literal format.- Returns:
- raw statement argument string
- Throws:
VerifyException
- if this statement does not have an argument
-
-