In JakartaEE environments it is quite normal to have beans that are instantiated by the container, e.g. @ApplicationScoped beans. When a bean has scope "@ApplicationScope" or has some other CDI annotation on it that binds it to the container, e.g. @Observes, etc. UCDetector should not flag those classes and methods as unused, as they are instantiated by the container.
I single out Jakarta CDI specifically as it is an industry standard and widely used. Perhaps you could add an editable list of annotations that mark a class as used, as to support Spring and other injection frameworks.
Anonymous
Use UCDetector Preferences: "Ignore -> Code with annotations"
See: http://ucdetector.org/preferences.html
Found it! Thanks!