Enforce noninstanciability with a private constructor 

es.uniovi.reflection.analyses.bloch.2.4


This rule detects classes that have only static members but lack a private constructor. These classes are designed to be static so, in order to prevent their instantiation, they must implement (at least) a private constructor and no other constructors with a higher access level.

Computational Reflection Research Group
09-30-2026 22:23
Bad Practice
Class Declaration