Package org.eclipse.sisu.launch
Class SisuExtensions
java.lang.Object
org.eclipse.sisu.launch.SisuExtensions
- All Implemented Interfaces:
SpaceModule.Strategy,WireModule.Strategy
public final class SisuExtensions
extends Object
implements SpaceModule.Strategy, WireModule.Strategy
SPI mechanism for discovering
Module and Strategy extensions.-
Field Summary
Fields inherited from interface org.eclipse.sisu.space.SpaceModule.Strategy
DEFAULT, DEFAULT_STRICTFields inherited from interface org.eclipse.sisu.wire.WireModule.Strategy
DEFAULT -
Method Summary
Modifier and TypeMethodDescription<T> List<T> Creates instances of extensions listed underMETA-INF/services/ fully-qualified-SPI-name; implementations must have a public no-arg constructor.<T,C> List <T> Creates instances of extensions listed underMETA-INF/services/ fully-qualified-SPI-name; implementations must either have a public no-arg constructor or one with the declared context type.static SisuExtensionsglobal(ClassSpace space) Returns globalSisuExtensionsfrom the surrounding class space.voidinstall(com.google.inject.Binder binder) Installs modules listed underMETA-INF/services/com.google.inject.Module; modules must have a public no-arg constructor.<C> voidInstalls modules listed underMETA-INF/services/com.google.inject.Module; modules must either have a public no-arg constructor or one with the declared context type.Loads extension types listed underMETA-INF/services/ fully-qualified-SPI-name.static SisuExtensionslocal(ClassSpace space) Returns localSisuExtensionsfrom the containing class space.visitor(com.google.inject.Binder binder) SpaceModulestrategy that letsMETA-INF/services/org.eclipse.sisu.space.SpaceVisitorextensions override the default scanning.wiring(com.google.inject.Binder binder) WireModulestrategy that letsMETA-INF/services/org.eclipse.sisu.wire.Wiringextensions override the default wiring.
-
Method Details
-
local
Returns localSisuExtensionsfrom the containing class space.- Parameters:
space- The class space- Returns:
- Local extensions
-
global
Returns globalSisuExtensionsfrom the surrounding class space.- Parameters:
space- The class space- Returns:
- Global extensions
-
install
public void install(com.google.inject.Binder binder) Installs modules listed underMETA-INF/services/com.google.inject.Module; modules must have a public no-arg constructor.- Parameters:
binder- The current binder
-
install
Installs modules listed underMETA-INF/services/com.google.inject.Module; modules must either have a public no-arg constructor or one with the declared context type.- Parameters:
binder- The current bindercontextType- Optional context typecontext- Optional context instance
-
wiring
WireModulestrategy that letsMETA-INF/services/org.eclipse.sisu.wire.Wiringextensions override the default wiring.- Specified by:
wiringin interfaceWireModule.Strategy- Parameters:
binder- The binder- Returns:
- Extended wiring
-
visitor
SpaceModulestrategy that letsMETA-INF/services/org.eclipse.sisu.space.SpaceVisitorextensions override the default scanning.- Specified by:
visitorin interfaceSpaceModule.Strategy- Parameters:
binder- The binder- Returns:
- Extended visitor
-
create
Creates instances of extensions listed underMETA-INF/services/ fully-qualified-SPI-name; implementations must have a public no-arg constructor.- Parameters:
spi- The extension SPI- Returns:
- List of extensions
-
create
Creates instances of extensions listed underMETA-INF/services/ fully-qualified-SPI-name; implementations must either have a public no-arg constructor or one with the declared context type.- Parameters:
spi- The extension SPIcontextType- Optional context typecontext- Optional context instance- Returns:
- List of extensions
-
load
Loads extension types listed underMETA-INF/services/ fully-qualified-SPI-name.- Parameters:
spi- The extension SPI- Returns:
- List of extension types
-