I'm trying to find unused classes in my project. I have a bunch of endpoints that take POJOs as arguments, and they are annotated with @PostMapping, which I have configured as an entry point. This works to make the methods not show up as unused declarations, but the classes being passed in as arguments will still show up as unused declarations because there is no usage of its constructor (because they are created by Jackson serialization).
How can I run an inspection to find classes that truly are not referenced in any way by any other class?
I don't care if I have to manually run it multiple times deleting unused classes as I go to find all the unused classes in a hierarchy.