Source:
<code><START> public void validate(Class<?> clazz) throws ControllerValidationException { <END> if (isInterface(clazz)) { throw new ControllerValidationException("Dolphin Controller must be a class."); } if (isAbstract(clazz)) { throw new ControllerValidationException("Dolphin Controller can't be abstract."); } if (isFinal(clazz)) { throw new ControllerValidationException("Dolphin Controller can't be final."); } if (postConstructContainsParameter(clazz)) { throw new ControllerValidationException("PostConstruct method should not contain parameter."); } if (moreThanOnePostConstruct(clazz)) { throw new ControllerValidationException("Only one PostConstruct method is allowed."); } if (preDestroyContainsParameter(clazz)) { throw new ControllerValidationException("PreDestroy method should not contain parameter."); } if (moreThanOnePreDestroy(clazz)) { throw new ControllerValidationException("Only one PreDestroy method is allowed."); } if (!isDolphinActionVoid(clazz)) { throw new ControllerValidationException("DolphinAction must be void."); } if (!isAnnotatedWithParam(clazz)) { throw new ControllerValidationException("DolphinAction parameters must be annotated with @param."); } if (!dolphinModelPresent(clazz)) { throw new ControllerValidationException("Controller must have a DolphinModel."); } if(moreThanOneDolphinModel(clazz)){ throw new ControllerValidationException("Controller should not contain more than one DolphinModel."); } }</code><technical_language>Assert.isNotNull(clazz, "clazz");</technical_language>

Target:
public void validate(Class<?> clazz) throws ControllerValidationException { Assert.requireNonNull(clazz, "Controller class"); if (isInterface(clazz)) { throw new ControllerValidationException("Dolphin Controller "+ clazz.getName() +" must be a class."); } if (isAbstract(clazz)) { throw new ControllerValidationException("Dolphin Controller "+ clazz.getName() +" can't be abstract."); } if (isFinal(clazz)) { throw new ControllerValidationException("Dolphin Controller "+ clazz.getName() +" can't be final."); } if (postConstructContainsParameter(clazz)) { throw new ControllerValidationException("PostConstruct method should not contain parameter in Controller "+ clazz.getName()); } if (isMoreThanOnePostConstruct(clazz)) { throw new ControllerValidationException("Only one PostConstruct method is allowed in Controller "+ clazz.getName()); } if (preDestroyContainsParameter(clazz)) { throw new ControllerValidationException("PreDestroy method should not contain parameter in Controller "+ clazz.getName()); } if (isMoreThanOnePreDestroy(clazz)) { throw new ControllerValidationException("Only one PreDestroy method is allowed in Controller "+ clazz.getName()); } if (!isDolphinActionVoid(clazz)) { throw new ControllerValidationException("DolphinAction must be void in Controller "+ clazz.getName()); } if (!isAnnotatedWithParam(clazz)) { throw new ControllerValidationException("DolphinAction parameters must be annotated with @param in Controller "+ clazz.getName()); } if (!isDolphinModelPresent(clazz)) { throw new ControllerValidationException("Controller " + clazz.getName() + " must have a DolphinModel."); } if(isMoreThanOneDolphinModel(clazz)){ throw new ControllerValidationException("Controller " + clazz.getName() + " should not contain more than one DolphinModel."); } }