-
Notifications
You must be signed in to change notification settings - Fork 5
Native module
Pierre T. edited this page Jan 12, 2015
·
1 revision
Plugin can register a native unit module using the following method:
@Override
public Object nativeUnitModule() {
return new MyModule(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.
- Introduction
- ... Motivation
- ... Features
- ... Manifesto
- User manual
- ... Kernel
- ...... Kernel Life Cycle
- ...... Kernel Configuration
- ... Plugin
- ...... Plugin Life cycle
- ...... Request API
- ...... Native Module
- ...... Dependencies
- ... Tests
- ...... Integration Tests
- Advanced topics
- ... Design Best Practices
- ... Multi-Round Plugin
- ... Kernel param aliases
- ... SPI
- ...... DI Provider
- ...... Concern
- ...... Extension
- Definitions
- ... Framework
- ... Entreprise Stack
- ... API
- ... SPI
- ... Library
- ... Inversion of Control
- ... Dependency Injection
- Concepts
- ... UnitModule
- ... GlobalModule
- ... ObjectGraph