"but there are parameter constraints defined at all of the following overridden methods: " +
methodsWithParameterConstraints
);
}
ConstrainedMethod constrainedMethod = methodsWithParameterConstraints.iterator().next();
for ( ConstrainedMethod oneMethod : constrainedMethods ) {
if ( !constrainedMethod.getLocation().getBeanClass()
.isAssignableFrom( oneMethod.getLocation().getBeanClass() ) ) {
return new ConstraintDeclarationException(
"Only the root method of an overridden method in an inheritance hierarchy may be annotated with parameter constraints. " +
"The following method itself has no parameter constraints but it is not defined on a sub-type of " +
constrainedMethod.getLocation().getBeanClass() + ": " + oneMethod
);
}
}
return null;