checkEmpty(reference, "reference");
// TODO: this check should be performed by the expression factory. It is a requirement of the TCK
if (!(reference.startsWith("#{") && reference.endsWith("}")))
{
throw new ReferenceSyntaxException("Invalid method reference: '" + reference + "'");
}
if (params == null)
params = new Class[0];
MethodExpression methodExpression;
try
{
methodExpression = getExpressionFactory().createMethodExpression(threadELContext(), reference,
Object.class, params);
}
catch (ELException e)
{
throw new ReferenceSyntaxException(e);
}
return new MethodExpressionToMethodBinding(methodExpression);
}