class PropertySourceTransformer {

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

    @OnClassLoadEvent(classNameRegexp = "org.springframework.core.env.MapPropertySource")
    public static void transformMapPropertySource(CtClass clazz, ClassPool classPool) throws NotFoundException, CannotCompileException {
        transformPropertySource(clazz, classPool);
        LOGGER.debug("Patch org.springframework.boot.env.MapPropertySource success");
    }

    @OnClassLoadEvent(classNameRegexp= "org.springframework.boot.env.OriginTrackedMapPropertySource")
    public static void transformOriginTrackedMapPropertySource(CtClass clazz, ClassPool classPool) throws NotFoundException, CannotCompileException {
        transformPropertySource(clazz, classPool);
        LOGGER.debug("Patch org.springframework.boot.env.OriginTrackedMapPropertySource success");
    }

    private static void transformPropertySource(CtClass clazz, ClassPool classPool) throws NotFoundException, CannotCompileException {<FILL_FUNCTION_BODY>}
}

        clazz.addInterface(classPool.get("org.hotswap.agent.plugin.spring.transformers.api.ReloadablePropertySource"));
        clazz.addField(CtField.make("private org.hotswap.agent.plugin.spring.api.PropertySourceReloader reload;", clazz));

        clazz.addMethod(CtMethod.make("public void setReload(org.hotswap.agent.plugin.spring.api.PropertySourceReloader r) { this.reload = r; }", clazz));
        clazz.addMethod(CtMethod.make("public void reload() { if (this.reload != null) {this.reload.reload();} }", clazz));
    
<no_super_class>