|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
@Deprecated public interface NamedBinder<U>
Provides a means to more fully describe a binding that has already been named, or where the name has been assumed to be left blank.
This is a builder like pattern, where each method more fully builds up a binding description. The builder takes the caller through phases of the build process. This process actually begins in theBinder
class. Once the Binder is bound to a name (or the name is assumed null),
a NamedBinder provides a means to add annotations here. Once this phase
is completed, a ResolvedBinder
is produced once a target is
provided - the target is the actual implementation strategy behing the
binding (e.g., class name to load reflectively, a factory, etc.).
Method Summary | ||
---|---|---|
NamedBinder<U> |
annotatedWith(Class<? extends Annotation> annotation)
Deprecated. Append annotation to the binding. |
|
|
to(Class<? extends T> serviceClass)
Deprecated. Resolve this binder to a particular target implementation class type. |
|
ResolvedBinder<U> |
to(String className)
Deprecated. Have this instance resolve to a particular target implementation class name. |
|
|
to(TypeLiteral<T> typeLiteral)
Deprecated. Resolve this binder to a particular parameterized type. |
|
|
toFactory(Class<? extends Factory<? extends T>> factoryType)
Deprecated. Have this instance resolve to a particular target factory class type. |
|
|
toFactory(Factory<T> factory)
Deprecated. Have this instance resolve to a particular target factory implementation. |
|
|
toFactory(TypeLiteral<? extends Factory<? extends T>> factoryType)
Deprecated. Have this instance resolve to a particular target type literal factory. |
|
|
toInstance(T instance)
Deprecated. Have this instance resolve to a particular singleton implementation instance. |
Method Detail |
---|
NamedBinder<U> annotatedWith(Class<? extends Annotation> annotation)
Qualifier
annotation
annotation
- the annotation to append
ResolvedBinder<U> to(String className)
className
- the class name target to resolve to
<T extends U> ResolvedBinder<T> to(Class<? extends T> serviceClass)
T
- TODO javadoc.serviceClass
- the class type target to resolve to
<T extends U> ResolvedBinder<T> to(TypeLiteral<T> typeLiteral)
T
- TODO javadoc.typeLiteral
- the type literal target to resolve to
<T extends U> void toInstance(T instance)
Scope
is assumed to be singleton.
T
- TODO javadoc.instance
- the instance used to satisfy this binding requests.<T extends U> ResolvedBinder<T> toFactory(Factory<T> factory)
T
- TODO javadoc.factory
- the factory target to resolve to
<T extends U> ResolvedBinder<T> toFactory(Class<? extends Factory<? extends T>> factoryType)
T
- TODO javadoc.factoryType
- the factory class type target to resolve to
<T extends U> ResolvedBinder<T> toFactory(TypeLiteral<? extends Factory<? extends T>> factoryType)
T
- TODO javadoc.factoryType
- the type literal factory to resolve to
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |