This would mean that each JAR should provide a list of classes that are loaded through reflection.
I think a better approach is to
- During the scan of the archive check if the reflection api is used
- Scan the string constant pool for values that are class definitions
Ok, that won't give us the complete picture, but we are closer and can then look at ways to improve the result.
Hmm. Maybe some classes could also called by external definitions, like servlet classes, and thus need to be named manually.
Anyway, the set of externally called classes should be a relative small set i'd say.