private static RuntimeException invalid(Class<?> source, String reason) {
return new InvalidModelRuleDeclarationException("Type " + source.getName() + " is not a valid model rule source: " + reason);
}
private static RuntimeException invalid(Method method, String reason) {
return invalid("model rule method", new MethodModelRuleDescriptor(method), reason);
}