Inspectopedia Help

Package-visible nested class

Reports nested classes that are declared without any access modifier (also known as package-private).

Example:

public class Outer { static class Nested {} // warning class Inner {} // warning enum Mode {} // warning depends on the setting interface I {} // warning depends on the setting }

Configure the inspection:

  • Use the Ignore package-visible inner enums option to ignore package-private inner enums.

  • Use the Ignore package-visible inner interfaces option to ignore package-private inner interfaces.

Inspection options

Option

Type

Default

Ignore package-visible inner enums

Checkbox

false

Ignore package-visible inner interfaces

Checkbox

false

Inspection Details

Available in:

IntelliJ IDEA 2023.3, Qodana for JVM 2023.3

Plugin:

Java, 233.SNAPSHOT

Last modified: 13 July 2023