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

29 lines
611 B
HTML

<html>
<body>
Reports usage of statically imported members qualified with
their containing class name.
<p>Such qualification is unnecessary and can be removed
because statically imported members can be accessed directly by member name.</p>
<p><b>Example:</b></p>
<pre><code>
import static foo.Test.WIDTH;
class Bar {
void bar() {
System.out.println(Test.WIDTH);
}
}
</code></pre>
<p>After the quick-fix is applied:</p>
<pre><code>
import static foo.Test.WIDTH;
class Bar {
void bar() {
System.out.println(WIDTH);
}
}
</code></pre>
<!-- tooltip end -->
</body>
</html>