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

org.osgl.inject.provider.DirectProvider Maven / Gradle / Ivy

There is a newer version: 1.13.2
Show newest version
package org.osgl.inject.provider;

import org.osgl.$;

import javax.inject.Provider;

/**
 * A Simple implementation of {@link javax.inject.Provider} that provide the bean
 * prepared before hand
 */
public class DirectProvider implements Provider {

    public T bean;

    public DirectProvider(T bean) {
        this.bean = $.notNull(bean);
    }

    @Override
    public T get() {
        return bean;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy