All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.quarkus.kubernetes.client.runtime.KubernetesSerializationRecorder Maven / Gradle / Ivy

package io.quarkus.kubernetes.client.runtime;

import java.util.HashSet;
import java.util.Set;

import io.fabric8.kubernetes.api.model.KubernetesResource;
import io.quarkus.runtime.RuntimeValue;
import io.quarkus.runtime.annotations.Recorder;

@Recorder
public class KubernetesSerializationRecorder {

    public RuntimeValue[]> initKubernetesResources(String[] resourceClassNames) {
        final Set> resourceClasses = new HashSet<>();
        for (var resourceClassName : resourceClassNames) {
            try {
                resourceClasses.add(
                        Class.forName(resourceClassName, false, KubernetesSerializationRecorder.class.getClassLoader()));
            } catch (ClassNotFoundException e) {
            }
        }
        return new RuntimeValue<>(resourceClasses.toArray(Class[]::new));
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy