public ValueExpression createValueExpression(ELContext context, String expression, Class expectedType) { if (expectedType == null) { throw new NullPointerException(MessageFactory .get("error.value.expectedType")); } ExpressionBuilder builder = new ExpressionBuilder(expression, context); return builder.createValueExpression(expectedType); }
/** * @return * @throws ELException */ private Node getNode() throws ELException { if (this.node == null) { this.node = ExpressionBuilder.createNode(this.expr); } return this.node; }
public MethodExpression createMethodExpression(ELContext context, String expression, Class<?> expectedReturnType, Class<?>[] expectedParamTypes) { if (expectedParamTypes == null) { throw new NullPointerException(MessageFactory .get("error.method.nullParms")); } ExpressionBuilder builder = new ExpressionBuilder(expression, context); return builder.createMethodExpression(expectedReturnType, expectedParamTypes); }
private Node build() throws ELException { Node n = createNodeInternal(this.expression); this.prepare(n); if (n instanceof AstDeferredExpression || n instanceof AstDynamicExpression) { n = n.jjtGetChild(0); } return n; }
public ValueExpression createValueExpression(Class expectedType) throws ELException { Node n = this.build(); return new ValueExpressionImpl(this.expression, n, this.fnMapper, this.varMapper, expectedType); }
public final static Node createNode(String expr) throws ELException { Node n = createNodeInternal(expr); return n; }
private Node build() throws ELException { Node n = createNodeInternal(this.expression); this.prepare(n); if (n instanceof AstDeferredExpression || n instanceof AstDynamicExpression) { n = n.jjtGetChild(0); } return n; }
public ValueExpression createValueExpression(Class expectedType) throws ELException { Node n = this.build(); return new ValueExpressionImpl(this.expression, n, this.fnMapper, this.varMapper, expectedType); }
public final static Node createNode(String expr) throws ELException { Node n = createNodeInternal(expr); return n; }
public ValueExpression createValueExpression(ELContext context, String expression, Class expectedType) { if (expectedType == null) { throw new NullPointerException(MessageFactory .get("error.value.expectedType")); } ExpressionBuilder builder = new ExpressionBuilder(expression, context); return builder.createValueExpression(expectedType); }
public MethodExpression createMethodExpression(ELContext context, String expression, Class expectedReturnType, Class[] expectedParamTypes) { if (expectedParamTypes == null) { throw new NullPointerException(MessageFactory .get("error.method.nullParms")); } ExpressionBuilder builder = new ExpressionBuilder(expression, context); return builder.createMethodExpression(expectedReturnType, expectedParamTypes); }
/** * @return * @throws ELException */ private Node getNode() throws ELException { if (this.node == null) { this.node = ExpressionBuilder.createNode(this.expr); } return this.node; }
private Node build() throws ELException { Node n = createNodeInternal(this.expression); this.prepare(n); if (n instanceof AstDeferredExpression || n instanceof AstDynamicExpression) { n = n.jjtGetChild(0); } return n; }
public ValueExpression createValueExpression(Class expectedType) throws ELException { Node n = this.build(); return new ValueExpressionImpl(this.expression, n, this.fnMapper, this.varMapper, expectedType); }
public final static Node createNode(String expr) throws ELException { Node n = createNodeInternal(expr); return n; }
public ValueExpression createValueExpression(ELContext context, String expression, Class expectedType) { if (expectedType == null) { throw new NullPointerException(MessageFactory .get("error.value.expectedType")); } ExpressionBuilder builder = new ExpressionBuilder(expression, context); return builder.createValueExpression(expectedType); }
public MethodExpression createMethodExpression(ELContext context, String expression, Class expectedReturnType, Class[] expectedParamTypes) { if (expectedParamTypes == null) { throw new NullPointerException(MessageFactory .get("error.method.nullParms")); } ExpressionBuilder builder = new ExpressionBuilder(expression, context); return builder.createMethodExpression(expectedReturnType, expectedParamTypes); }
/** * @return * @throws ELException */ private Node getNode() throws ELException { if (this.node == null) { this.node = ExpressionBuilder.createNode(this.expr); } return this.node; }
public MethodExpression createMethodExpression(Class expectedReturnType, Class[] expectedParamTypes) throws ELException { Node n = this.build(); if (n instanceof AstValue || n instanceof AstIdentifier) { return new MethodExpressionImpl(expression, n, this.fnMapper, this.varMapper, expectedReturnType, expectedParamTypes); } else if (n instanceof AstLiteralExpression) { return new MethodExpressionLiteral(expression, expectedReturnType, expectedParamTypes); } else { throw new ELException("Not a Valid Method Expression: " + expression); } } }
private void validateExpression(TagNode element, Attribute attribute) { ExpressionLanguageContext context = new ExpressionLanguageContext(element); ExpressionBuilder builder = new ExpressionBuilder(attribute.getValue(), context); try { builder.createValueExpression(Object.class); } catch (ELException e) { if (e.getMessage().startsWith("Error")) { createViolation(element.getStartLinePosition(), "Fix this expression: " + (e.getMessage() == null ? "" : e.getMessage())); } } }