private Object evalAttribute(String name, JellyContext context) { ExpressionAttribute e = attributes.get(name); if (e==null) return null; return e.exp.evaluate(context); }
Object[] evaluateArguments(JellyContext jellyContext) { Object[] args = new Object[arguments.length]; for (int i = 0; i < args.length; i++) args[i] = arguments[i].evaluate(jellyContext); return args; }
private Object evalAttribute(String name, JellyContext context) { ExpressionAttribute e = attributes.get(name); if (e==null) return null; return e.exp.evaluate(context); }
private Object evalAttribute(String name, JellyContext context) { ExpressionAttribute e = attributes.get(name); if (e == null) { return null; } return e.exp.evaluate(context); }
private Object evalAttribute(String name, JellyContext context) { ExpressionAttribute e = attributes.get(name); if (e==null) return null; return e.exp.evaluate(context); }
public Object evaluate(JellyContext context) { Object r = base.evaluate(context); if (r==null) return null; return escape(r.toString()); }
public Object evaluate(JellyContext context) { Object r = base.evaluate(context); if (r==null) return null; return escape(r.toString()); }
public Object evaluate(JellyContext context) { Object answer = jexlExpression.evaluate(context); if ( answer == null ) { answer = context.getVariable(text); } return answer; }
public Object evaluate(JellyContext context) { Object answer = jexlExpression.evaluate(context); if ( answer == null ) { answer = context.getVariable(text); } return answer; }
public Object evaluate(JellyContext context) { Object answer = jexlExpression.evaluate(context); if ( answer == null ) { answer = context.getVariable(text); } return answer; }
public Object evaluate(JellyContext context) { context = new CustomJellyContext(context); context.setVariables(resourceLiterals); return innerExpression.evaluate(context); } }
public Object evaluate(JellyContext context) { context = new CustomJellyContext(context); context.setVariables(resourceLiterals); return innerExpression.evaluate(context); } }
/** Evaluates the body of a tag */ public void run(JellyContext context, XMLOutput output) throws JellyTagException { Object result = expression.evaluate(context); if ( result != null ) { try { output.objectData(result); } catch (SAXException e) { throw new JellyTagException("Could not write to XMLOutput",e); } } } }
public void doTag(XMLOutput output) throws MissingAttributeException, JellyTagException { this.defaultEncountered = false; this.someCaseMatched = false; this.fallingThru = false; if(null == on) { throw new MissingAttributeException("on"); } else { value = on.evaluate(context); invokeBody(output); } }
/** Evaluates the body of a tag */ public void run(JellyContext context, XMLOutput output) throws JellyTagException { Object result = expression.evaluate(context); if ( result != null ) { try { output.objectData(result); } catch (SAXException e) { throw new JellyTagException("Could not write to XMLOutput",e); } } } }
/** Evaluates the body of a tag */ public void run(JellyContext context, XMLOutput output) throws JellyTagException { Object result = expression.evaluate(context); if ( result != null ) { try { output.objectData(result); } catch (SAXException e) { throw new JellyTagException("Could not write to XMLOutput",e); } } } }
public void doTag(XMLOutput output) throws MissingAttributeException, JellyTagException { this.defaultEncountered = false; this.someCaseMatched = false; this.fallingThru = false; if(null == on) { throw new MissingAttributeException("on"); } else { value = on.evaluate(context); invokeBody(output); } }
public void doTag(XMLOutput output) throws MissingAttributeException, JellyTagException { this.defaultEncountered = false; this.someCaseMatched = false; this.fallingThru = false; if(null == on) { throw new MissingAttributeException("on"); } else { value = on.evaluate(context); invokeBody(output); } }
protected void assertExpression(String expressionText, Object expectedValue) throws Exception { Expression expression = CompositeExpression.parse(expressionText, factory); assertTrue( "Created a valid expression for: " + expressionText, expression != null ); Object value = expression.evaluate(context); //assertEquals( "Expression for: " + expressionText + " is: " + expression, expectedValue, value ); assertEquals( "Wrong result for expression: " + expressionText, expectedValue, value ); } }
protected void assertExpression(String expressionText, Object expectedValue) throws Exception { Expression expression = CompositeExpression.parse(expressionText, factory); assertTrue( "Created a valid expression for: " + expressionText, expression != null ); Object value = expression.evaluate(context); assertEquals( "Wrong result for expression: " + expressionText, expectedValue, value ); String text = expression.getExpressionText(); assertEquals( "Wrong textual representation for expression text: ", expressionText, text); } }