return null;
}
private ConstraintDeclarationException checkReturnValueConfiguration() {
ConstrainedExecutable methodWithCascadingReturnValue = null;
for ( ConstrainedExecutable executable : constrainedExecutables ) {
if ( executable.getLocation().getExecutableElement().getReturnType() == void.class &&
( !executable.getConstraints().isEmpty() || executable.isCascading() ) ) {
return log.voidMethodsMustNotBeConstrained( executable.getLocation().getMember() );
}
if ( executable.isCascading() ) {
if ( methodWithCascadingReturnValue != null ) {
return log.methodReturnValueMustNotBeMarkedMoreThanOnceForCascadedValidation(
methodWithCascadingReturnValue.getLocation().getMember(),
executable.getLocation().getMember()
);
}
methodWithCascadingReturnValue = executable;
}