class SwitchableApplicationContextInitializer
                                                             implements
                                                             ApplicationContextInitializer<ConfigurableApplicationContext> {

    protected static final String CONFIG_KEY_PREFIX = "sofa.boot.switch.initializer.";

    @Override
    public void initialize(ConfigurableApplicationContext applicationContext) {
        if (isEnable(applicationContext)) {
            doInitialize(applicationContext);
        }
    }

    /**
     * @param applicationContext
     */
    protected abstract void doInitialize(ConfigurableApplicationContext applicationContext);

    /**
     * start with :sofa.boot.switch.initializer
     *
     * @return switch key, must not be null.
     */
    protected abstract String switchKey();

    /**
     * Specify if the condition should match if the property is not set. Defaults to
     * {@code true}.
     *
     * @return if the condition should match if the property is missing
     */
    protected boolean matchIfMissing() {
        return true;
    }

    protected boolean isEnable(ConfigurableApplicationContext applicationContext) {<FILL_FUNCTION_BODY>}
}

        String switchKey = switchKey();
        Assert.hasText(switchKey, "switch key must has text.");
        String realKey = CONFIG_KEY_PREFIX + switchKey + ".enabled";
        String switchStr = applicationContext.getEnvironment().getProperty(realKey);
        if (StringUtils.hasText(switchStr)) {
            return Boolean.parseBoolean(switchStr);
        } else {
            return matchIfMissing();
        }
    
<no_super_class>