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

io.quarkus.rest.client.reactive.runtime.BeanGrabber Maven / Gradle / Ivy

There is a newer version: 3.17.0.CR1
Show newest version
package io.quarkus.rest.client.reactive.runtime;

import io.quarkus.arc.Arc;
import io.quarkus.arc.InstanceHandle;

@SuppressWarnings("unused")
public class BeanGrabber {
    public static  T getBeanIfDefined(Class beanClass) {
        InstanceHandle instance = Arc.container().instance(beanClass);
        if (instance.isAvailable()) {
            return instance.get();
        }
        return null;
    }

    private BeanGrabber() {
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy