Files
openide/java/java-impl/resources/inspectionDescriptions/UtilityClassCanBeEnum.html
2025-02-05 04:43:28 +00:00

21 lines
515 B
HTML

<html>
<body>
Reports utility classes that can be converted to enums.
<p>Some coding style guidelines require implementing utility classes as enums
to avoid code coverage issues in <code>private</code> constructors.</p>
<p><b>Example:</b></p>
<pre><code>
class StringUtils {
public static final String EMPTY = "";
}
</code></pre>
<p>After the quick-fix is applied:</p>
<pre><code>
enum StringUtils {
;
public static final String EMPTY = "";
}
</code></pre>
<!-- tooltip end -->
</body>
</html>