public void invoke(String parameterName,
Object filter,
Object parameterValue) {
Method method = setters.get( parameterName );
if ( method == null ) throw new SearchException( "No setter " + parameterName + " found in " + this.impl );
try {
method.invoke( filter, parameterValue );
}
catch (IllegalAccessException e) {
throw new SearchException( "Unable to set Filter parameter: " + parameterName + " on filter class: " + this.impl, e );
}
catch (InvocationTargetException e) {
throw new SearchException( "Unable to set Filter parameter: " + parameterName + " on filter class: " + this.impl, e );
}
}
|