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

io.quarkus.arc.runtime.BeanLookupSupplier Maven / Gradle / Ivy

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

import java.util.function.Supplier;

import io.quarkus.arc.Arc;

public class BeanLookupSupplier implements Supplier {

    private Class type;

    public BeanLookupSupplier() {
    }

    public BeanLookupSupplier(Class type) {
        this.type = type;
    }

    public Class getType() {
        return type;
    }

    public BeanLookupSupplier setType(Class type) {
        this.type = type;
        return this;
    }

    @Override
    public Object get() {
        return Arc.container().instance(type).get();
    }
}