}
// Allow FilterAction-classes with proper default-constructors
if (Class.class.isAssignableFrom(objClass)) {
Class<?> filterClass = (Class<?>) object;
if (!FilterAction.class.isAssignableFrom(filterClass)) {
throw new FilterConfigurationException(String.format(
"Incompatible type: %s, Class must be derived from one of the following: %s", filterClass,
FilterAction.class.getName()));
}
try {
filterClass.getConstructor();
} catch (NoSuchMethodException e) {
throw new FilterConfigurationException("Filter-class must have a visible default constructor", e);
}
return;
}
throw new FilterConfigurationException(String.format("Element %s is not a valid FilterElement",
object.toString()));
}