Hello
I am not an expert about patterns but in the Validator's API
offer a method with some relation with generics
Code:
supports
boolean supports(Class<?> clazz)
Can this Validator validate instances of the supplied clazz?
This method is typically implemented like so:
return Foo.class.isAssignableFrom(clazz);
(Where Foo is the class (or superclass) of the actual object instance that is to be validated.)
Parameters:
clazz - the Class that this Validator is being asked if it can validate
Returns:
true if this Validator can indeed validate instances of the supplied clazz
I think it is based for a reason about design patterns, I hope some SpringSource developer would give a deeper explanation
But I suggest you do a research in Google, about when and why an interface should be Generic <T>.