Interface IExpression
-
- All Known Implementing Classes:
Axis
public interface IExpression
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description ISequence<? extends IItem>
accept(DynamicContext dynamicContext, ISequence<?> focus)
Provides a double dispatch callback for visitor handling.<RESULT,CONTEXT>
RESULTaccept(gov.nist.secauto.metaschema.core.metapath.IExpressionVisitor<RESULT,CONTEXT> visitor, CONTEXT context)
Provides a double dispatch callback for visitor handling.default Class<? extends IItem>
getBaseResultType()
The minimum expected result type to be produced when evaluating the expression.List<? extends IExpression>
getChildren()
Retrieve the child expressions associated with this expression.default Class<? extends IItem>
getStaticResultType()
The expected result type produced by evaluating the expression.default String
toASTString()
Produce a string representation of this expression including the expression's name.
-
-
-
Method Detail
-
getChildren
@NonNull List<? extends IExpression> getChildren()
Retrieve the child expressions associated with this expression.- Returns:
- a list of expressions, which may be empty
-
getBaseResultType
@NonNull default Class<? extends IItem> getBaseResultType()
The minimum expected result type to be produced when evaluating the expression. The result may be a sub-class or sub-interface of this value.- Returns:
- the base result type
-
getStaticResultType
@NonNull default Class<? extends IItem> getStaticResultType()
The expected result type produced by evaluating the expression. The result must be the same or a sub-class or sub-interface of the value provided bygetBaseResultType()
.This method can be overloaded to provide static analysis of the expression to determine a more specific result type.
- Returns:
- the result type
-
toASTString
@NonNull default String toASTString()
Produce a string representation of this expression including the expression's name.This method can be overloaded to provide a more appropriate representation of the expression.
- Returns:
- a string representing the data elements of the expression
-
accept
@NonNull ISequence<? extends IItem> accept(@NonNull DynamicContext dynamicContext, @NonNull ISequence<?> focus)
Provides a double dispatch callback for visitor handling.- Parameters:
dynamicContext
- the dynamic evaluation contextfocus
- the outer focus of the expression- Returns:
- the result of evaluation
-
accept
<RESULT,CONTEXT> RESULT accept(@NonNull gov.nist.secauto.metaschema.core.metapath.IExpressionVisitor<RESULT,CONTEXT> visitor, @NonNull CONTEXT context)
Provides a double dispatch callback for visitor handling.- Type Parameters:
RESULT
- the type of the evaluation resultCONTEXT
- the type of the visitor context- Parameters:
visitor
- the visitor calling this methodcontext
- the visitor context- Returns:
- the result of evaluation
-
-