Since v1.4.0, UCDetector appears to never mark elements of an enum on which .values() or .valueOf(String) is called.
See:
Discussion: http://sourceforge.net/p/ucdetector/discussion/791296/thread/a0a2bfbe
Bug: http://sourceforge.net/p/ucdetector/bugs/39/
I indeed understand why that is the case. However, this appears to mostly make sense for enums whose individual elements are never directly referenced, but solely via .values() ( see this example: http://sourceforge.net/p/ucdetector/bugs/39/#bb67 ).
Particularly, in the context of my project, this behavior is not beneficial because it results in false negatives. In said project, elements of the respective enums are commonly referenced directly (which means that non-directly-referenced elements are dead by definition) -- however, I do have some .values() calls which I cannot get rid of (for statistical / analysis / debug output reasons).
Currently, I gotta crawl my code for .values() calls and temporarily remove them, in order to successfully identify orphaned enum elements, which is rather inconvenient.
Hence, I hereby request an option to toggle ignoring .values() (and probably also .valueOf(String)). I hope others might consider this useful as well.
Last but not least: Great project - incredibly useful. Keep going!
Anonymous
Good idea! I will include it in next version.