public static synchronized void suppressConstructor ( Class < ? > clazz , boolean excludePrivateConstructors ) { Constructor < ? > [ ] ctors = null ; if ( excludePrivateConstructors ) { ctors = clazz . getConstructors ( ) ; } else { ctors = clazz . getDeclaredConstructors ( ) ; } for ( Constructor < ? > ctor : ctors ) { MockRepository . addConstructorToSuppress ( ctor ) ; } }
Suppress all constructors in the given class .