public interface DependencyInjector<DI extends DependencyInjector<DI>> extends AppService<DI>, org.osgl.inject.Injector
Destroyable.Util| Modifier and Type | Method and Description |
|---|---|
void |
fireInjectedEvent(java.lang.Object bean,
org.osgl.inject.BeanSpec spec)
Once an object has been created and ready for injection, this method will be called to call back to the
listeners that has been registered |
<T> T |
get(java.lang.Class<T> clazz)
Get a bean instance by class
|
boolean |
isProvided(java.lang.Class<?> type)
Report if a given type is a provided type (e.g.
|
void |
registerDiBinder(DependencyInjectionBinder binder)
Register a
DependencyInjectionBinder to the injector |
void |
registerDiListener(DependencyInjectionListener listener)
Register a
DependencyInjectionListener to the injector |
destroy, isDestroyed, scopevoid registerDiBinder(DependencyInjectionBinder binder)
Register a DependencyInjectionBinder to the injector
binder - the bindervoid registerDiListener(DependencyInjectionListener listener)
Register a DependencyInjectionListener to the injector
listener - the dependency injection event listenerboolean isProvided(java.lang.Class<?> type)
Report if a given type is a provided type (e.g. ActContext, All application services etc, DAO)
type - the type to be checkedtrue if the type is a provided type or false otherwisevoid fireInjectedEvent(java.lang.Object bean,
org.osgl.inject.BeanSpec spec)
Once an object has been created and ready for injection, this method will be called to call back to the listeners that has been registered
bean - the object to be injectedspec - the spec about the bean instance<T> T get(java.lang.Class<T> clazz)
Get a bean instance by class
get in interface org.osgl.inject.InjectorT - the generic type of the bean instanceclazz - the class of the bean instance to be returnedCopyright © 2014–2017 ActFramework. All rights reserved.