|
Silk DI 0.6 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Objectse.jbee.inject.bootstrap.Macros
public final class Macros
A immutable collection of Macros each bound to a specific type handled.
| Field Summary | |
|---|---|
static Macro<Parameter<?>[]> |
ARRAY
|
static Macro<Configuring<?>> |
CONFIGURE
|
static Macro<Constructible<?>> |
CONSTRUCT
|
static Macros |
DEFAULT
|
static Macros |
EMPTY
|
static Macro<Binding<?>> |
EXPAND
|
static Macro<Class<?>> |
FORWARD
|
static Module |
NO_OP
|
static Macro<Producible<?>> |
PRODUCE
|
static Macro<Instance<?>> |
SUBSTITUTE
|
| Method Summary | ||
|---|---|---|
|
expand(Binding<T> binding,
V value)
A generic version of Macro.expand(Binding, Object) that uses the matching predefined
Macro for the actual type of the value and expands it. |
|
(package private) static
|
implicitBindToConstructor(Binding<?> binding,
Instance<T> instance)
|
|
static Module |
macro(Module... steps)
|
|
static Module |
macro(Module mandatory,
Module optional)
|
|
|
use(Class<T> type,
Macro<? extends T> macro)
Uses the given Macro for the given exact (no super-types!) |
|
|
use(Macro<T> macro)
Uses the given Macro and derives the use(Class, Macro) type from its
declaration. |
|
| Methods inherited from class Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final Macros EMPTY
public static final Macro<Binding<?>> EXPAND
public static final Macro<Constructible<?>> CONSTRUCT
public static final Macro<Instance<?>> SUBSTITUTE
public static final Macro<Producible<?>> PRODUCE
public static final Macro<Configuring<?>> CONFIGURE
public static final Macro<Class<?>> FORWARD
public static final Macro<Parameter<?>[]> ARRAY
public static final Module NO_OP
public static final Macros DEFAULT
| Method Detail |
|---|
public static Module macro(Module mandatory,
Module optional)
public static Module macro(Module... steps)
public <T> Macros use(Macro<T> macro)
Macro and derives the use(Class, Macro) type from its
declaration. This is a utility method that can be used as long as the Macro
implementation is not generic.
macro - No generic macro class (e.g. decorators)
Macros containing the given one for the type derived from its type
declaration.
public <T> Macros use(Class<T> type,
Macro<? extends T> macro)
Macro for the given exact (no super-types!) type of values.
type - The type of value that should be passed to the Macro as valuemacro - The Macro expanding the type of value
Macros containing the given one
public <T,V> Module expand(Binding<T> binding,
V value)
Macro.expand(Binding, Object) that uses the matching predefined
Macro for the actual type of the value and expands it.
binding - The incoplete binding to expandvalue - Non-null value to expand via matching Macro
Module results from Macro.expand(Binding, Object)
DIRuntimeException - In case no Macro had been declared for the type of value argument
static <T> Module implicitBindToConstructor(Binding<?> binding,
Instance<T> instance)
|
Silk DI 0.6 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||