Details
-
Suggestion
-
Resolution: Won't Fix
-
None
Description
Clean up InstrumentationSession.enterClass(..., boolean isInterface, boolean isEnum, boolean isAnnotation) so that it instead takes a LanguageConstruct to indicated what it is which is then embedded in ClassInfo. This divorces this part of the API from Java allowing us to model languages like Scala who have things like traits, singleton objects, etc.
This may require a separate LanguageConstruct-like type (TypeConstruct ?) as it will likely need to be smarter than LanguageConstruct and be able to answer some basic questions Clover may need to ask e.g.
if (!typeInfo.getConstruct().isAbstract(typeInfo)) { //Java interfaces and annotations are always abstract, Scala trait is sometimes abstract, ... //include in the report }
The example above is a bit fake because surely we could determine if a TypeInfo is abstract by traversing it but there may be situations where we need to ask similar questions.