class JvmClassLoadingMetrics {

    private static final String JVM_CLASSES_CURRENTLY_LOADED = "jvm_classes_currently_loaded";
    private static final String JVM_CLASSES_LOADED_TOTAL = "jvm_classes_loaded_total";
    private static final String JVM_CLASSES_UNLOADED_TOTAL = "jvm_classes_unloaded_total";

    private final PrometheusProperties config;
    private final ClassLoadingMXBean classLoadingBean;

    private JvmClassLoadingMetrics(ClassLoadingMXBean classLoadingBean, PrometheusProperties config) {
        this.classLoadingBean = classLoadingBean;
        this.config = config;
    }

    private void register(PrometheusRegistry registry) {<FILL_FUNCTION_BODY>}

    public static Builder builder() {
        return new Builder(PrometheusProperties.get());
    }

    public static Builder builder(PrometheusProperties config) {
        return new Builder(config);
    }

    public static class Builder {

        private final PrometheusProperties config;
        private ClassLoadingMXBean classLoadingBean;

        private Builder(PrometheusProperties config) {
            this.config = config;
        }

        /**
         * Package private. For testing only.
         */
        Builder classLoadingBean(ClassLoadingMXBean classLoadingBean) {
            this.classLoadingBean = classLoadingBean;
            return this;
        }

        public void register() {
            register(PrometheusRegistry.defaultRegistry);
        }

        public void register(PrometheusRegistry registry) {
            ClassLoadingMXBean classLoadingBean = this.classLoadingBean != null ? this.classLoadingBean : ManagementFactory.getClassLoadingMXBean();
            new JvmClassLoadingMetrics(classLoadingBean, config).register(registry);
        }
    }
}


        GaugeWithCallback.builder(config)
                .name(JVM_CLASSES_CURRENTLY_LOADED)
                .help("The number of classes that are currently loaded in the JVM")
                .callback(callback -> callback.call(classLoadingBean.getLoadedClassCount()))
                .register(registry);

        CounterWithCallback.builder(config)
                .name(JVM_CLASSES_LOADED_TOTAL)
                .help("The total number of classes that have been loaded since the JVM has started execution")
                .callback(callback -> callback.call(classLoadingBean.getTotalLoadedClassCount()))
                .register(registry);

        CounterWithCallback.builder(config)
                .name(JVM_CLASSES_UNLOADED_TOTAL)
                .help("The total number of classes that have been unloaded since the JVM has started execution")
                .callback(callback -> callback.call(classLoadingBean.getUnloadedClassCount()))
                .register(registry);
    
<no_super_class>