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) { ExpressionBuilder builder = new ExpressionBuilder(expression, context); MethodExpression me = builder.createMethodExpression(expectedReturnType, expectedParamTypes); if (expectedParamTypes == null && !me.isParmetersProvided()) { throw new NullPointerException(MessageFactory.get("error.method.nullParms")); } return me; }
public ValueExpression createValueExpression(Object instance, Class expectedType) { if (expectedType == null) { throw new NullPointerException(MessageFactory.get("error.value.expectedType")); } return new ValueExpressionLiteral(instance, expectedType); }