You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pierre T. edited this page Jan 12, 2015
·
1 revision
Plugin can register a native unit module using the following method:
@OverridepublicObjectnativeUnitModule() {
returnnewMyModule(classesToBind); // Could be a Guice Module
}
Native unit module are by default GuiceModule but they can be other class if you don’t use Guice as DI framework.
This module will the be added to the object graph (the injector for Guice) by the kernel.
The usual workflow when developing Nuun Plugin is to do some classpath scan request with the [[Request API]]. For instance, get all the classes annotated by @Service. Then pass them to a native module which will bind them. In order to be injectable.