private Object[] getArguments(ExpressionState state) { Object[] arguments = new Object[getChildCount()]; for (int i = 0; i < arguments.length; i++) { // Make the root object the active context again for evaluating the parameter expressions try { state.pushActiveContextObject(state.getScopeRootContextObject()); arguments[i] = this.children[i].getValueInternal(state).getValue(); } finally { state.popActiveContextObject(); } } return arguments; }
for (Map.Entry<?, ?> entry : mapData.entrySet()) { try { state.pushActiveContextObject(new TypedValue(entry)); state.enterScope(); result.add(this.children[0].getValueInternal(state).getValue()); for (Object element : data) { try { state.pushActiveContextObject(new TypedValue(element)); state.enterScope("index", idx); Object value = this.children[0].getValueInternal(state).getValue();
for (int i = 1; i < cc - 1; i++) { try { state.pushActiveContextObject(result); nextNode = this.children[i]; result = nextNode.getValueInternal(state); state.pushActiveContextObject(result); nextNode = this.children[cc - 1]; return nextNode.getValueRef(state);
try { TypedValue kvPair = new TypedValue(entry); state.pushActiveContextObject(kvPair); state.enterScope(); Object val = selectionCriteria.getValueInternal(state).getValue(); for (Object element : data) { try { state.pushActiveContextObject(new TypedValue(element)); state.enterScope("index", index); Object val = selectionCriteria.getValueInternal(state).getValue();
private Object[] getArguments(ExpressionState state) { Object[] arguments = new Object[getChildCount()]; for (int i = 0; i < arguments.length; i++) { // Make the root object the active context again for evaluating the parameter expressions try { state.pushActiveContextObject(state.getScopeRootContextObject()); arguments[i] = this.children[i].getValueInternal(state).getValue(); } finally { state.popActiveContextObject(); } } return arguments; }
for (int i = 1; i < cc - 1; i++) { try { state.pushActiveContextObject(result); nextNode = this.children[i]; result = nextNode.getValueInternal(state); state.pushActiveContextObject(result); nextNode = this.children[cc - 1]; return nextNode.getValueRef(state);
for (Map.Entry<?, ?> entry : mapData.entrySet()) { try { state.pushActiveContextObject(new TypedValue(entry)); state.enterScope(); result.add(this.children[0].getValueInternal(state).getValue()); for (Object element : data) { try { state.pushActiveContextObject(new TypedValue(element)); state.enterScope("index", idx); Object value = this.children[0].getValueInternal(state).getValue();
state.pushActiveContextObject(state.getRootContextObject()); indexValue = this.children[0].getValueInternal(state); index = indexValue.getValue();
try { TypedValue kvPair = new TypedValue(entry); state.pushActiveContextObject(kvPair); state.enterScope(); Object val = selectionCriteria.getValueInternal(state).getValue(); for (Object element : data) { try { state.pushActiveContextObject(new TypedValue(element)); state.enterScope("index", index); Object val = selectionCriteria.getValueInternal(state).getValue();
state.pushActiveContextObject(state.getRootContextObject()); indexValue = this.children[0].getValueInternal(state); index = indexValue.getValue();
@Test public void testActiveContextObject() { ExpressionState state = getState(); assertEquals(state.getRootContextObject().getValue(), state.getActiveContextObject().getValue()); try { state.popActiveContextObject(); fail("stack should be empty..."); } catch (IllegalStateException ese) { // success } state.pushActiveContextObject(new TypedValue(34)); assertEquals(34, state.getActiveContextObject().getValue()); state.pushActiveContextObject(new TypedValue("hello")); assertEquals("hello", state.getActiveContextObject().getValue()); state.popActiveContextObject(); assertEquals(34, state.getActiveContextObject().getValue()); state.popActiveContextObject(); assertEquals(state.getRootContextObject().getValue(), state.getActiveContextObject().getValue()); state = new ExpressionState(new StandardEvaluationContext()); assertEquals(TypedValue.NULL, state.getActiveContextObject()); }
private Object[] getArguments(ExpressionState state) { Object[] arguments = new Object[getChildCount()]; for (int i = 0; i < arguments.length; i++) { // Make the root object the active context again for evaluating the parameter expressions try { state.pushActiveContextObject(state.getScopeRootContextObject()); arguments[i] = this.children[i].getValueInternal(state).getValue(); } finally { state.popActiveContextObject(); } } return arguments; }
for (int i = 1; i < cc - 1; i++) { try { state.pushActiveContextObject(result); nextNode = this.children[i]; result = nextNode.getValueInternal(state); state.pushActiveContextObject(result); nextNode = this.children[cc - 1]; return nextNode.getValueRef(state);
for (Map.Entry<?, ?> entry : mapData.entrySet()) { try { state.pushActiveContextObject(new TypedValue(entry)); state.enterScope(); result.add(this.children[0].getValueInternal(state).getValue()); for (Object element : data) { try { state.pushActiveContextObject(new TypedValue(element)); state.enterScope("index", idx); Object value = this.children[0].getValueInternal(state).getValue();
state.pushActiveContextObject(state.getRootContextObject()); indexValue = this.children[0].getValueInternal(state); index = indexValue.getValue();