Files
openide/java/java-impl/resources/inspectionDescriptions/PublicField.html
Leonid Shalupov 40795fe787 IJI-2422: community/java: move resources under resources root
GitOrigin-RevId: 8b2b63fc6db476ca0c2cfe5cadd84db6c4236d0f
2025-02-05 04:43:28 +00:00

34 lines
861 B
HTML

<html>
<body>
Reports <code>public</code> fields.
Constants (fields marked with <code>static</code> and <code>final</code>) are not reported.
<p><b>Example:</b></p>
<pre><code>
class Main {
public String name;
}
</code></pre>
<p>After the quick-fix is applied:</p>
<pre><code>
class Main {
private String name;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
</code></pre>
<!-- tooltip end -->
<p>Configure the inspection:</p>
<ul>
<li>Use the <b>Ignore If Annotated By</b> list to specify annotations to ignore. The inspection will ignore fields with
any of these annotations.</li>
<li>Use the <b>Ignore 'public final' fields of an enum</b> option to ignore <code>public final</code> fields
of the <code>enum</code> type.</li>
</ul>
</body>
</html>