Enumerations can be used as utility classes. This eliminates the errors of Sonar, Checkstyle and PMD. I limit my use of instances without instances to core classes. I do not want to use enum just to get around this rule.
Also, what do you do with the Java documentation that generates and displays all of these Utility classes as enumerations? This can be misleading and difficult to understand.
Can't the JDK provide an enumeration-like class for these specific utility classes? Essentially, we need a class that works just like enum, is final, and does not require a private constructor.
fernal73 Jun 29 '19 at 2:00 a.m. 2019-06-29 02:00
source share