public void validate(FacesContext context,
UIComponent component,
Object value) throws ValidatorException {
if (null == context || null == component) {
throw new NullPointerException();
}
try {
methodBinding.invoke(context, new Object[] {context, component,
value});
}
catch (EvaluationException ee) {
Throwable cause = this.getExpectedCause(ValidatorException.class,
ee);
if (cause instanceof ValidatorException) {
throw ((ValidatorException) cause);
}
if (cause instanceof RuntimeException) {
throw ((RuntimeException) cause);
}
throw new IllegalStateException(ee);
}
}
|