Package org.mvel2.ast
Class SwitchNode
- java.lang.Object
-
- org.mvel2.ast.ASTNode
-
- org.mvel2.ast.BlockNode
-
- org.mvel2.ast.SwitchNode
-
- All Implemented Interfaces:
Serializable,Cloneable,NestedStatement
public class SwitchNode extends BlockNode implements NestedStatement
- Author:
- Nick
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected intblocSwitchEndprotected ExecutableStatementconditionprotected StringconditionOperatorprotected StringconditionSwitchKeyprotected List<String>conditionValuesprotected ExecutableStatementdefaultBlockprotected booleanidxAllocprotected ExecutableStatementnestedStatementprotected SwitchNodeswitchCase-
Fields inherited from class org.mvel2.ast.BlockNode
blockOffset, blockStart, compiledBlock
-
Fields inherited from class org.mvel2.ast.ASTNode
accessor, ARRAY_TYPE_LITERAL, ASSIGN, BLOCK_DO, BLOCK_DO_UNTIL, BLOCK_FOR, BLOCK_FOREACH, BLOCK_IF, BLOCK_SWITCH, BLOCK_UNTIL, BLOCK_WHILE, BLOCK_WITH, COLLECTION, COMPILE_IMMEDIATE, cursorPosition, DEEP_PROPERTY, DEFERRED_TYPE_RES, DEOP, DISCARD, egressType, endOfName, expr, fields, firstUnion, FQCN, IDENTIFIER, INLINE_COLLECTION, INVERT, literal, LITERAL, nameCache, nextASTNode, NOJIT, NUMERIC, offset, OPERATOR, OPT_SUBTR, pCtx, PCTX_STORED, safeAccessor, STACKLANG, start, STRONG_TYPING, THISREF
-
-
Constructor Summary
Constructors Constructor Description SwitchNode(char[] expr, int start, int offset, int blockStart, int blockOffset, int fields, ParserContext pCtx, int blocSwitchEnd, String conditionSwitchKey, List<String> conditionValues)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetBlocSwitchEnd()StringgetConditionSwitchKey()ExecutableStatementgetDefaultBlock()ExecutableStatementgetNestedStatement()ObjectgetReducedValue(Object ctx, Object thisValue, VariableResolverFactory factory)ObjectgetReducedValueAccelerated(Object ctx, Object thisValue, VariableResolverFactory factory)SwitchNodesetCase(SwitchNode switchCase)SwitchNodesetDefaultBlock(char[] block, int cursor, int offset, ParserContext ctx)StringtoString()-
Methods inherited from class org.mvel2.ast.BlockNode
getBlockOffset, getBlockStart, getCompiledBlock
-
Methods inherited from class org.mvel2.ast.ASTNode
canSerializeAccessor, checkArray, checkAssignGlobalVariable, checkAssignLocalVariable, checkExecution, discard, enterStack, getAbsoluteName, getAbsoluteRootElement, getAccessor, getClassLoader, getCursorPosition, getEgressType, getExpr, getFields, getLiteralValue, getName, getNameAsArray, getOffset, getOperator, getStart, getStatementString, isAssignment, isCollection, isDebuggingSymbol, isDeepProperty, isDiscard, isFQCN, isIdentifier, isLiteral, isOperator, isOperator, isThisVal, leaveStack, setAccessor, setAsFQCNReference, setAsLiteral, setCursorPosition, setEgressType, setLiteralValue, setName, storeInLiteralRegister, storePctx, strongTyping
-
-
-
-
Field Detail
-
condition
protected ExecutableStatement condition
-
nestedStatement
protected ExecutableStatement nestedStatement
-
switchCase
protected SwitchNode switchCase
-
defaultBlock
protected ExecutableStatement defaultBlock
-
idxAlloc
protected boolean idxAlloc
-
conditionSwitchKey
protected String conditionSwitchKey
-
conditionOperator
protected String conditionOperator
-
blocSwitchEnd
protected int blocSwitchEnd
-
-
Constructor Detail
-
SwitchNode
public SwitchNode(char[] expr, int start, int offset, int blockStart, int blockOffset, int fields, ParserContext pCtx, int blocSwitchEnd, String conditionSwitchKey, List<String> conditionValues)
-
-
Method Detail
-
getReducedValueAccelerated
public Object getReducedValueAccelerated(Object ctx, Object thisValue, VariableResolverFactory factory)
- Overrides:
getReducedValueAcceleratedin classASTNode
-
getReducedValue
public Object getReducedValue(Object ctx, Object thisValue, VariableResolverFactory factory)
- Overrides:
getReducedValuein classASTNode
-
getNestedStatement
public ExecutableStatement getNestedStatement()
- Specified by:
getNestedStatementin interfaceNestedStatement
-
setCase
public SwitchNode setCase(SwitchNode switchCase)
-
getDefaultBlock
public ExecutableStatement getDefaultBlock()
-
setDefaultBlock
public SwitchNode setDefaultBlock(char[] block, int cursor, int offset, ParserContext ctx)
-
getBlocSwitchEnd
public int getBlocSwitchEnd()
-
getConditionSwitchKey
public String getConditionSwitchKey()
-
-