List of usage examples for java.beans Expression Expression
@ConstructorProperties({ "target", "methodName", "arguments" }) public Expression(Object target, String methodName, Object[] arguments)
From source file:org.op4j.functions.Call.java
@SuppressWarnings("unchecked") public R execute(final T input, final ExecCtx ctx) throws Exception { final Class<? super R> resultClass = this.resultType.getRawClass(); final Expression expression = new Expression(input, this.methodName, this.parameters); final R result = (R) expression.getValue(); if (result != null && resultClass != null && !Object.class.equals(resultClass)) { if (!(resultClass.isAssignableFrom(result.getClass()))) { throw new IllegalStateException("Result of calling method \"" + this.methodName + "\" is not " + "assignable from class " + resultClass.getName()); }/*from w w w . ja v a2 s . co m*/ } return result; }