apiguardian-team / apiguardian

@API Guardian
https://apiguardian-team.github.io/apiguardian/docs/current/api/
Apache License 2.0
186 stars 23 forks source link

Introduce tools for @API annotation processing #2

Open marcphilipp opened 6 years ago

marcphilipp commented 6 years ago

Ideas

Related Issues

Deliverables

sbrannen commented 6 years ago

Update: moved ideas from https://github.com/junit-team/junit5/issues/144 to here.

sbrannen commented 6 years ago

Added link to jdeprscan.

sormuras commented 6 years ago

A compiler plugin could be useful: http://www.baeldung.com/java-build-compiler-plugin

FilipMalczak commented 6 years ago

I've started writing an approach to this. I've mentioned the general idea here. Instead of plugging into compiler, I intend to extract API descriptor with Google Reflections (I had an approach to Scannotation and gave up) and use it to perform validation and comparison.

You can follow the works here.

FilipMalczak commented 6 years ago

Check correct usage of APIs (internally and externally)

  • The tool should check that @API is only declared on public types/methods.

What else can we check here? Do we consider internal classes as valid API?