org.osgl.inject.provider.DirectProvider Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of genie Show documentation
Show all versions of genie Show documentation
A JSR330 style dependency injection solution
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