This would translate to something like:- public Set<Class<?>> getClasses(VirtualFile classpathItem, Set<Class<? extends Annotation>> annotationsToLookFor) (from the Hibernate plugin, assuming it looks for annotation on fields, methods and type), or return a Map<Class<? extends Annotation>>, Class<?>>
Hibernate plugin only checks for class annotations.
I would not re-use it, better writting new behavior in separate plugin.
- public Set<Class<?>> getClasses(List<VirtualFile> classpath, Set<Class<? extends Annotation>> annotationsToLookFor, Set<Class<?>> supertypesToLookFor) (note: in case there are multiple SCIs with HandlesType, this could be less efficient than using a map to pass the annotations/types to look for, and getting a map back; of course, it is simpler too)
Can you explain this one a bit more.
Or, why mix the parameters; annotation and supertypes?
We already have the annotations method, simply adding the supertypes, and the use Set intersection to get both?