public class ConditionalMultibind<T> extends Object
| Constructor and Description |
|---|
ConditionalMultibind(Properties properties,
com.google.inject.multibindings.Multibinder<T> multibinder) |
| Modifier and Type | Method and Description |
|---|---|
ConditionalMultibind<T> |
addBinding(Class<? extends T> target)
Unconditionally bind target to the set.
|
ConditionalMultibind<T> |
addBinding(T target)
Unconditionally bind target to the set.
|
ConditionalMultibind<T> |
addBinding(com.google.inject.TypeLiteral<T> target)
Unconditionally bind target to the set.
|
ConditionalMultibind<T> |
addConditionBinding(String property,
com.google.common.base.Predicate<String> condition,
Class<? extends T> target)
Conditionally bind target to the set.
|
ConditionalMultibind<T> |
addConditionBinding(String property,
com.google.common.base.Predicate<String> condition,
T target)
Conditionally bind target to the set.
|
ConditionalMultibind<T> |
addConditionBinding(String property,
com.google.common.base.Predicate<String> condition,
com.google.inject.TypeLiteral<T> target)
Conditionally bind target to the set.
|
static <T> ConditionalMultibind<T> |
create(Properties properties,
com.google.inject.Binder binder,
Class<T> type)
Create a ConditionalMultibind that resolves items to be added to the set at "binding" time.
|
static <T> ConditionalMultibind<T> |
create(Properties properties,
com.google.inject.Binder binder,
Class<T> type,
Class<? extends Annotation> annotationType)
Create a ConditionalMultibind that resolves items to be added to the set at "binding" time.
|
static <T> ConditionalMultibind<T> |
create(Properties properties,
com.google.inject.Binder binder,
com.google.inject.TypeLiteral<T> type)
Create a ConditionalMultibind that resolves items to be added to the set at "binding" time.
|
static <T> ConditionalMultibind<T> |
create(Properties properties,
com.google.inject.Binder binder,
com.google.inject.TypeLiteral<T> type,
Class<? extends Annotation> annotationType)
Create a ConditionalMultibind that resolves items to be added to the set at "binding" time.
|
public ConditionalMultibind(Properties properties, com.google.inject.multibindings.Multibinder<T> multibinder)
public static <T> ConditionalMultibind<T> create(Properties properties, com.google.inject.Binder binder, Class<T> type)
T - interface type.properties - the runtime properties.binder - the binder for the injector that is being configured.type - the type that will be injected.public static <T> ConditionalMultibind<T> create(Properties properties, com.google.inject.Binder binder, Class<T> type, Class<? extends Annotation> annotationType)
T - interface type.properties - the runtime properties.binder - the binder for the injector that is being configured.type - the type that will be injected.annotationType - the binding annotation.public static <T> ConditionalMultibind<T> create(Properties properties, com.google.inject.Binder binder, com.google.inject.TypeLiteral<T> type)
T - interface type.properties - the runtime properties.binder - the binder for the injector that is being configured.type - the type that will be injected.public static <T> ConditionalMultibind<T> create(Properties properties, com.google.inject.Binder binder, com.google.inject.TypeLiteral<T> type, Class<? extends Annotation> annotationType)
T - interface type.properties - the runtime properties.binder - the binder for the injector that is being configured.type - the type that will be injected.annotationType - the binding annotation.public ConditionalMultibind<T> addBinding(Class<? extends T> target)
target - the target class to which it adds a binding.public ConditionalMultibind<T> addBinding(T target)
target - the target instance to which it adds a binding.public ConditionalMultibind<T> addBinding(com.google.inject.TypeLiteral<T> target)
target - the target type to which it adds a binding.public ConditionalMultibind<T> addConditionBinding(String property, com.google.common.base.Predicate<String> condition, Class<? extends T> target)
property - the property to inspect oncondition - the predicate used to verify whether to add a binding to "target"target - the target class to which it adds a binding.public ConditionalMultibind<T> addConditionBinding(String property, com.google.common.base.Predicate<String> condition, T target)
property - the property to inspect oncondition - the predicate used to verify whether to add a binding to "target"target - the target instance to which it adds a binding.public ConditionalMultibind<T> addConditionBinding(String property, com.google.common.base.Predicate<String> condition, com.google.inject.TypeLiteral<T> target)
property - the property to inspect oncondition - the predicate used to verify whether to add a binding to "target"target - the target type to which it adds a binding.Copyright © 2011–2017. All rights reserved.