Object[] args = new Object[] {request};
for (Class<? extends AbstractInspectRequest> c : classes) {
try {
Constructor<? extends AbstractInspectRequest> constructor = c.getConstructor(argsClass);
AbstractInspectRequest inspectRequest = (AbstractInspectRequest) constructor.newInstance(args);
if (inspectRequest.isValidate()) {
if (inspectRequest instanceof IControllerProvider) {
return ((IControllerProvider) inspectRequest).getController(factory);
}
}
} catch (Exception e) {