Inspectopedia Help

Class structure

'private' method declared 'final'  

Reports methods that are marked with both final and private keywords.

'public' constructor can be replaced with factory method  

Reports public constructors.

'static' method declared 'final'  

Reports static methods that are marked as final.

'static', non-'final' field  

Reports non-final static fields.

Abstract 'class' may be 'interface'  

Reports abstract classes that can be converted to interfaces.

Anonymous class can be replaced with inner class  

Reports anonymous classes.

Class is closed to inheritance  

Reports classes that are declared final.

Class may extend adapter instead of implementing listener  

Reports classes implementing listeners instead of extending corresponding adapters.

Class name differs from file name  

Reports top-level class names that don't match the name of a file containing them.

Class with only 'private' constructors should be declared 'final'  

Reports classes with only private constructors.

Constant declared in 'abstract' class  

Reports constants (public static final fields) declared in abstract classes.

Constant declared in interface  

Reports constants (public static final fields) declared in interfaces.

Empty class  

Reports empty classes and empty Java files.

Field can be local  

Reports redundant class fields that can be replaced with local variables.

Inner class of interface  

Reports inner classes in interface classes.

Interface may be annotated as '@FunctionalInterface'  

Reports interfaces that can be annotated with @FunctionalInterface (available since JDK 1.

Local class  

Reports local classes.

Marker interface  

Reports marker interfaces without any methods or fields.

Method can't be overridden  

Reports methods that are declared final.

Method returns per-class constant  

Reports methods that only return a constant, which may differ for various inheritors.

Multiple top level classes in single file  

Reports multiple top-level classes in a single Java file.

No-op method in 'abstract' class  

Reports no-op (for "no operation") methods in abstract classes.

Non-'static' initializer  

Reports non-static initializers in classes.

Non-final field in 'enum'  

Reports non-final fields in enumeration types.


Reports singleton classes.

Utility class  

Reports utility classes.

Utility class can be 'enum'  

Reports utility classes that can be converted to enums.

Utility class is not 'final'  

Reports utility classes that aren't final or abstract.

Utility class with 'public' constructor  

Reports utility classes with public constructors.

Utility class without 'private' constructor  

Reports utility classes without private constructors.

Value passed as parameter never read  

Reports redundant method parameters that can be replaced with local variables.

Last modified: 29 April 2024