class ViewConfigTransformer {

    private static AgentLogger LOGGER = AgentLogger.getLogger(ViewConfigTransformer.class);

    private static final String VIEW_CONFIG_RESOLVER_PROXY_FIELD = "$$ha$viewConfigResolverProxy";

    /**
     * Register DeltaspikePlugin and add reinitialization method to RepositoryComponent
     *
     * @param classPool the class pool
     * @param ctClass   the ct class
     * @throws CannotCompileException the cannot compile exception
     * @throws NotFoundException      the not found exception
     */
    @OnClassLoadEvent(classNameRegexp = "org.apache.deltaspike.jsf.impl.config.view.ViewConfigExtension")
    public static void patchViewConfigExtension(ClassPool classPool, CtClass ctClass) throws CannotCompileException, NotFoundException {
        if (HaCdiCommons.isJakarta(classPool)) {
            return;
        }
        CtMethod init = ctClass.getDeclaredMethod("init");
        init.insertAfter(
       "{" +
                "if (this.isActivated) {" +
                    PluginManagerInvoker.buildInitializePlugin(DeltaSpikePlugin.class)+
                "}" +
            "}"
        );
        LOGGER.debug("org.apache.deltaspike.jsf.impl.config.view.ViewConfigExtension enhanced with plugin initialization.");

        CtClass viewConfigResProxyClass = classPool.get("org.hotswap.agent.plugin.deltaspike.jsf.ViewConfigResolverProxy");
        CtField viewConfigResProxyField = new CtField(viewConfigResProxyClass, VIEW_CONFIG_RESOLVER_PROXY_FIELD, ctClass);
        ctClass.addField(viewConfigResProxyField);

        CtMethod generateProxyClassMethod = ctClass.getDeclaredMethod("transformMetaDataTree");

       generateProxyClassMethod.instrument(
            new ExprEditor() {
                public void edit(NewExpr e) throws CannotCompileException {<FILL_FUNCTION_BODY>}
            }
        );
    }

}

                    if (e.getClassName().equals("org.apache.deltaspike.jsf.impl.config.view.DefaultViewConfigResolver"))
                    e.replace(
                        "{ " +
                            "java.lang.Object _resolver = new org.apache.deltaspike.jsf.impl.config.view.DefaultViewConfigResolver($$); " +
                            "if (this." + VIEW_CONFIG_RESOLVER_PROXY_FIELD + "==null) {" +
                                "this." + VIEW_CONFIG_RESOLVER_PROXY_FIELD + "=new org.hotswap.agent.plugin.deltaspike.jsf.ViewConfigResolverProxy();" +
                            "}" +
                            "this." + VIEW_CONFIG_RESOLVER_PROXY_FIELD + ".setViewConfigResolver(_resolver);" +
                            "java.util.List _list = org.hotswap.agent.plugin.deltaspike.jsf.ViewConfigResolverUtils.findViewConfigRootClasses(this.rootViewConfigNode);" +
                            PluginManagerInvoker.buildCallPluginMethod(DeltaSpikePlugin.class, "registerViewConfigRootClasses",
                                "this", "java.lang.Object", "_list", "java.util.List") +
                            "   $_ = this." + VIEW_CONFIG_RESOLVER_PROXY_FIELD + ";" +
                        "}"
                    );
                
<no_super_class>