Uploaded image for project: 'Clover'
  1. Clover
  2. CLOV-1788

Make session.enterClass() more language-independent

    XMLWordPrintable

Details

    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

    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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            mparfianowicz Marek Parfianowicz
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: