Back to Intellij Community

ProtectedInnerClass

java/java-impl/resources/inspectionDescriptions/ProtectedInnerClass.html

2025.3-rc-2507 B
Original Source

Reports protected nested classes.

Example:

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

Configure the inspection:

  • Use the Ignore 'protected' inner enums option to ignore protected inner enums.
  • Use the Ignore 'protected' inner interfaces option to ignore protected inner interfaces.