if(declaresVersionAnnotation(superclassSpec)) {
validationFailures.add("Cannot have @Version annotated on subclass and any of its supertypes; "
+ "subclass: %s, superclass: %s", objectSpec.getFullIdentifier(), superclassSpec.getFullIdentifier() );
return;
}
superclassSpec = superclassSpec.superclass();
}
}
private boolean declaresVersionAnnotation(ObjectSpecification objectSpec) {
return Annotations.getDeclaredAnnotation(objectSpec.getCorrespondingClass(), Version.class)!=null;