Inspectopedia Help

Unqualified inner class access

Reports references to inner classes that are not qualified with the name of the enclosing class.

Example:

import foo.Foo.Bar; class Foo { class Bar {} } class Baz { void f(Bar bar) {} }

After the quick-fix is applied:

class Foo { class Bar {} } class Baz { void f(Foo.Bar bar) {} }

Use the inspection settings to ignore references to inner classes within the same class, which therefore do not require an import.

Inspection options

Option

Type

Default

Ignore references to local inner classes

Checkbox

true

Inspection Details

Available in:

IntelliJ IDEA 2023.3, Qodana for JVM 2023.3

Plugin:

Java, 233.SNAPSHOT

Last modified: 13 July 2023