public class SwitchExpression extends Expression
| Modifier and Type | Class and Description |
|---|---|
static class |
SwitchExpression.Case
Case clause.
|
| Modifier and Type | Method and Description |
|---|---|
<T,E extends java.lang.Throwable> |
accept(ExpressionVisitor<T,E> visitor)
Accepts visitor.
|
protected java.lang.Object |
basicInterpret(Interpreter interpreter,
InterpreterStackTrace stackTrace)
Interpret expression.
|
static SwitchExpression |
create(ASTInfo info,
Expression expression,
java.util.Collection<SwitchExpression.Case> cases,
Expression defaultExpression)
Creates a new switch expression.
|
Expression |
getArgumentExpression()
Returns the switch argument expression.
|
ASTNode |
getArrowRange(int caseIndex) |
ASTNode |
getCaseKeywordRange(int caseIndex) |
java.util.List<SwitchExpression.Case> |
getCases()
Returns the list of cases.
|
ASTNode |
getDefaultArrowRange() |
Expression |
getDefaultExpression()
Returns the default expression.
|
ASTNode |
getDefaultKeywordRange() |
ASTNode |
getEndKeywordRange() |
java.util.List<Expression> |
getResultExpressions()
Returns the result expression.
|
ASTNode |
getSwitchKeywordRange() |
createANTLRParser, doInterpret, evalCondition, evaluateToExpressions, executeCompiled, getCompiled, getDebugLine, getIdentifierAst, getParseTimeConstant, getPrimaryRange, getPropertySelectorRange, getRange, getResultExpression, getType, interpret, interpretInCurrentNamespace, isCreatingNonModuleContextObjects, isParseTimeConstant, requiresNewNamespace, setCompiled, showInFullText, showInSurroundingText, showInText, toExpressionsgetFullText, getLine, getNodeText, getText, toStringcontains, getBeginIndex, getEndIndex, getLengthclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetFullText, getLine, getNodeText, getTextcontains, getBeginIndex, getEndIndex, getLengthpublic static SwitchExpression create(ASTInfo info, Expression expression, java.util.Collection<SwitchExpression.Case> cases, Expression defaultExpression)
info - expression - cases - defaultExpression - public Expression getArgumentExpression()
public Expression getDefaultExpression()
public java.util.List<SwitchExpression.Case> getCases()
public <T,E extends java.lang.Throwable> T accept(ExpressionVisitor<T,E> visitor) throws E extends java.lang.Throwable
Expressionaccept in class ExpressionEE extends java.lang.Throwableprotected java.lang.Object basicInterpret(Interpreter interpreter, InterpreterStackTrace stackTrace) throws ErrorException
ExpressionbasicInterpret in class ExpressionErrorExceptionpublic java.util.List<Expression> getResultExpressions()
ExpressiongetResultExpressions in class Expressionpublic ASTNode getSwitchKeywordRange()
public ASTNode getCaseKeywordRange(int caseIndex)
public ASTNode getArrowRange(int caseIndex)
public ASTNode getDefaultKeywordRange()
public ASTNode getDefaultArrowRange()
public ASTNode getEndKeywordRange()
Copyright © 2007-2020 Whitestein Technologies. All Rights Reserved.