public final class SisuExtensions extends java.lang.Object implements SpaceModule.Strategy, WireModule.Strategy
Module and Strategy extensions.| Modifier and Type | Field and Description |
|---|---|
private boolean |
global |
private ClassSpace |
space |
DEFAULTDEFAULT| Modifier | Constructor and Description |
|---|---|
private |
SisuExtensions(ClassSpace space,
boolean global) |
| Modifier and Type | Method and Description |
|---|---|
<T> java.util.List<T> |
create(java.lang.Class<T> spi)
Creates instances of extensions listed under
META-INF/services/ fully-qualified-SPI-name ;
implementations must have a public no-arg constructor. |
<T,C> java.util.List<T> |
create(java.lang.Class<T> spi,
java.lang.Class<C> contextType,
C context)
Creates instances of extensions listed under
META-INF/services/ fully-qualified-SPI-name ;
implementations must either have a public no-arg constructor or one with the declared context type. |
static SisuExtensions |
global(ClassSpace space)
Returns global
SisuExtensions from the surrounding class space. |
void |
install(com.google.inject.Binder binder)
Installs modules listed under
META-INF/services/com.google.inject.Module; modules must have a public
no-arg constructor. |
<C> void |
install(com.google.inject.Binder binder,
java.lang.Class<C> contextType,
C context)
Installs modules listed under
META-INF/services/com.google.inject.Module; modules must either have a
public no-arg constructor or one with the declared context type. |
<T> java.util.List<java.lang.Class<? extends T>> |
load(java.lang.Class<T> spi)
Loads extension types listed under
META-INF/services/ fully-qualified-SPI-name. |
static SisuExtensions |
local(ClassSpace space)
Returns local
SisuExtensions from the containing class space. |
SpaceVisitor |
visitor(com.google.inject.Binder binder)
SpaceModule strategy that lets META-INF/services/org.eclipse.sisu.space.SpaceVisitor extensions
override the default scanning. |
Wiring |
wiring(com.google.inject.Binder binder)
WireModule strategy that lets META-INF/services/org.eclipse.sisu.wire.Wiring extensions override
the default wiring. |
private final ClassSpace space
private final boolean global
private SisuExtensions(ClassSpace space, boolean global)
public static SisuExtensions local(ClassSpace space)
SisuExtensions from the containing class space.space - The class spacepublic static SisuExtensions global(ClassSpace space)
SisuExtensions from the surrounding class space.space - The class spacepublic void install(com.google.inject.Binder binder)
META-INF/services/com.google.inject.Module; modules must have a public
no-arg constructor.binder - The current binderpublic <C> void install(com.google.inject.Binder binder,
java.lang.Class<C> contextType,
C context)
META-INF/services/com.google.inject.Module; modules must either have a
public no-arg constructor or one with the declared context type.binder - The current bindercontextType - Optional context typecontext - Optional context instancepublic Wiring wiring(com.google.inject.Binder binder)
WireModule strategy that lets META-INF/services/org.eclipse.sisu.wire.Wiring extensions override
the default wiring.wiring in interface WireModule.Strategybinder - The binderpublic SpaceVisitor visitor(com.google.inject.Binder binder)
SpaceModule strategy that lets META-INF/services/org.eclipse.sisu.space.SpaceVisitor extensions
override the default scanning.visitor in interface SpaceModule.Strategybinder - The binderpublic <T> java.util.List<T> create(java.lang.Class<T> spi)
META-INF/services/ fully-qualified-SPI-name ;
implementations must have a public no-arg constructor.spi - The extension SPIpublic <T,C> java.util.List<T> create(java.lang.Class<T> spi,
java.lang.Class<C> contextType,
C context)
META-INF/services/ fully-qualified-SPI-name ;
implementations must either have a public no-arg constructor or one with the declared context type.spi - The extension SPIcontextType - Optional context typecontext - Optional context instancepublic <T> java.util.List<java.lang.Class<? extends T>> load(java.lang.Class<T> spi)
META-INF/services/ fully-qualified-SPI-name.spi - The extension SPI