TICS Coding Standard Viewer 
TIOBE Software Quality Framework
Print-friendly version
©TIOBE Software www.tiobe.com
 
TIOBE - Java Coding Standard
Search

Rule:  Design101Checked automatically with code checker

Synopsis:Classes with only private constructors should be declared as final
Language:Java
Severity Level:3
Category:Design


Description:
Checks that a class which has only private constructors is declared as final. Doesn't check for classes nested in interfaces or annotations, as they are always final there.
public class ClassWithPrivateConstructor { // violation
    private ClassWithPrivateConstructor() {
    }
}