public final class SwitchExpression extends Expression
Modifier and Type | Class and Description |
---|---|
static class |
SwitchExpression.Case
Case clause.
|
Constructor and Description |
---|
SwitchExpression(ASTInfo info,
Expression expression,
Collection<SwitchExpression.Case> cases,
Expression defaultExpression)
Creates new instance.
|
Modifier and Type | Method and Description |
---|---|
<T,E extends Throwable> |
accept(ExpressionVisitor<T,E> visitor)
Accepts visitor.
|
protected Object |
basicInterpret(Interpreter interpreter,
InterpreterStackTrace stackTrace)
Interpret expression.
|
Expression |
getArgumentExpression()
Returns the switch argument expression.
|
List<SwitchExpression.Case> |
getCases()
Returns the list of cases.
|
Expression |
getDefaultExpression()
Returns the default expression.
|
List<Expression> |
getResultExpressions()
Returns the result expression.
|
createANTLRParser, doInterpret, evalCondition, evaluate, evaluateToExpressions, executeCompiled, getCompiled, getDebugLine, getParseTimeConstant, getPrimaryRange, getPropertySelectorRange, getResultExpression, getType, interpret, interpretInCurrentNamespace, isCreatingNonModuleContextObjects, isParseTimeConstant, requiresNewNamespace, setCompiled, showInFullText, showInSurroundingText, showInText, toExpressions
getFullText, getLine, getNodeText, getText, toString
contains, getBeginIndex, getEndIndex, getLength
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getFullText, getLine, getNodeText, getText
contains, getBeginIndex, getEndIndex, getLength
public SwitchExpression(ASTInfo info, Expression expression, Collection<SwitchExpression.Case> cases, Expression defaultExpression)
info
- expression
- cases
- defaultExpression
- NullPointerException
- if fullText
or expression
or cases
is
nullpublic Expression getArgumentExpression()
public Expression getDefaultExpression()
public List<SwitchExpression.Case> getCases()
public <T,E extends Throwable> T accept(ExpressionVisitor<T,E> visitor) throws E extends Throwable
Expression
accept
in class Expression
E
E extends Throwable
protected Object basicInterpret(Interpreter interpreter, InterpreterStackTrace stackTrace) throws ErrorException
Expression
basicInterpret
in class Expression
ErrorException
public List<Expression> getResultExpressions()
Expression
getResultExpressions
in class Expression
Copyright © 2007-2018 Whitestein Technologies. All Rights Reserved.