Project: clover
Issue CLOV-1788: Make session.enterClass() more language-independent
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. {code:java} if (!typeInfo.getConstruct().isAbstract(typeInfo)) { //Java interfaces and annotations are always abstract, Scala trait is sometimes abstract, ... //include in the report } {code} 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.
Story points: 3