public static synchronized boolean assertSingleton ( final String scopeId , final Class clazz ) { ALL_CLASSES . add ( clazz ) ; return SINGLETONS_SCOPED . add ( new Tuple <> ( scopeId , clazz ) ) && ! SINGLETONS_GLOBAL . contains ( clazz ) ; }
Check if given class is singleton within a particular environment or scope .