if (!(ref.startsWith("#{") && ref.endsWith("}"))) {
if (LOGGER.isLoggable(Level.FINE)) {
LOGGER.fine(MessageFormat.format("Expression ''{0}'' does not follow the syntax #{...}", ref));
}
throw new ReferenceSyntaxException(ref);
}
FacesContext context = FacesContext.getCurrentInstance();
MethodExpression result;
try {
// return a MethodBinding that wraps a MethodExpression.
if (null == params) {
params = RIConstants.EMPTY_CLASS_ARGS;
}
result =
getExpressionFactory().
createMethodExpression(context.getELContext(), ref, null,
params);
} catch (ELException elex) {
throw new ReferenceSyntaxException(elex);
}
return (new MethodBindingMethodExpressionAdapter(result));
}