コード例 #1
0
 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);
 }
コード例 #2
0
 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;
 }
コード例 #3
0
 public ValueExpression createValueExpression(Object instance, Class expectedType) {
   if (expectedType == null) {
     throw new NullPointerException(MessageFactory.get("error.value.expectedType"));
   }
   return new ValueExpressionLiteral(instance, expectedType);
 }