Silk DI 0.6


se.jbee.inject.bootstrap
Interface Macro<V>

Type Parameters:
V - The type of value that is expanded by this macro

public interface Macro<V>

A Macro is a prepared set of instructions that transform the passed value into a Module that afterwards will be Module.declare(Bindings) the Bindings that correspond to the value.

Author:
Jan Bernitt (jan@jbee.se)

Method Summary
<T> Module
expand(Binding<T> binding, V value)
          Expands the incomplete Binding and value given to a Module that declares the complete Binding(s).
 

Method Detail

expand

<T> Module expand(Binding<T> binding,
                  V value)
Expands the incomplete Binding and value given to a Module that declares the complete Binding(s).

Parameters:
binding - A incomplete Binding
value - A Class, Instance or similar values that express the intent of the incomplete binding. This Macro will use them especially to decide the Supplier used.
Returns:
The Module created by the macro that will declare the complete Binding(s) that are used for the value. This often is also a Binding (what is the simplest Module as well)

Silk DI 0.6