class SpringContextHolder implements ApplicationContextAware {

    private static ApplicationContext applicationContext;
    
    private static ConfigurableApplicationContext configurableApplicationContext;

    @Override
    public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
        set(applicationContext);
        if (applicationContext instanceof ConfigurableApplicationContext) {
            configurableApplicationContext = (ConfigurableApplicationContext) applicationContext;
        }
    }

    private static void set(ApplicationContext applicationContext) {
        SpringContextHolder.applicationContext = applicationContext;
    }

    public static ApplicationContext getApplicationContext() {
        assertApplicationContext();
        return applicationContext;
    }

    @SuppressWarnings("unchecked")
    public static <T> T getBean(String beanName) {
        assertApplicationContext();
        return (T) applicationContext.getBean(beanName);
    }

    public static <T> T getBean(Class<T> clazz) {
        assertApplicationContext();
        return (T) applicationContext.getBean(clazz);
    }
    
    public static void shutdown() {
        assertApplicationContext();
        configurableApplicationContext.close();
    }
    
    public static boolean isActive() {<FILL_FUNCTION_BODY>}

    private static void assertApplicationContext() {
        if (null == applicationContext || null == configurableApplicationContext) {
            throw new RuntimeException("applicationContext is null, please inject the springContextHolder");
        }
    }
}

        if (configurableApplicationContext == null) {
            return false;
        }
        return configurableApplicationContext.isActive();
    
<no_super_class>