Package dagger.model
Enum BindingKind
- java.lang.Object
-
- java.lang.Enum<BindingKind>
-
- dagger.model.BindingKind
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<BindingKind>
public enum BindingKind extends java.lang.Enum<BindingKind>
Represents the different kinds ofBinding
s that can exist in a binding graph.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ASSISTED_FACTORY
A binding for anAssistedFactory
-annotated type.ASSISTED_INJECTION
A binding for anInject
-annotated constructor that contains at least oneAssisted
-annotated parameter.BOUND_INSTANCE
A binding for aBindsInstance
-annotated builder method.COMPONENT
An implicit binding for aComponent
- orProductionComponent
-annotated type.COMPONENT_DEPENDENCY
A binding for an instance of a component's dependency.COMPONENT_PRODUCTION
A binding for a production method on a production component's ProductionComponent.dependencies() dependency} that returns aListenableFuture
orFluentFuture
.COMPONENT_PROVISION
A binding for a provision method on a component's dependency.DELEGATE
A binding forBinds
-annotated method that delegates from requests for one key to another.INJECTION
A binding for anInject
-annotated constructor.MEMBERS_INJECTION
A binding for a members injection method on a component.MEMBERS_INJECTOR
A binding for aMembersInjector
of a type.MULTIBOUND_MAP
A synthetic binding for a multibound map that depends on the individual multibindingPROVISION
orPRODUCTION
contributions.MULTIBOUND_SET
A synthetic binding for a multibound set that depends on individual multibindingPROVISION
orPRODUCTION
contributions.OPTIONAL
PRODUCTION
A binding for aProduces
-annotated method.PROVISION
A binding for aProvides
-annotated method.SUBCOMPONENT_CREATOR
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isMultibinding()
Returnstrue
if this is a kind of multibinding (not a contribution to a multibinding, but the multibinding itself).static BindingKind
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static BindingKind[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
INJECTION
public static final BindingKind INJECTION
A binding for anInject
-annotated constructor.
-
PROVISION
public static final BindingKind PROVISION
A binding for aProvides
-annotated method.
-
ASSISTED_INJECTION
public static final BindingKind ASSISTED_INJECTION
A binding for anInject
-annotated constructor that contains at least oneAssisted
-annotated parameter.
-
ASSISTED_FACTORY
public static final BindingKind ASSISTED_FACTORY
A binding for anAssistedFactory
-annotated type.
-
COMPONENT
public static final BindingKind COMPONENT
An implicit binding for aComponent
- orProductionComponent
-annotated type.
-
COMPONENT_PROVISION
public static final BindingKind COMPONENT_PROVISION
A binding for a provision method on a component's dependency.
-
COMPONENT_DEPENDENCY
public static final BindingKind COMPONENT_DEPENDENCY
A binding for an instance of a component's dependency.
-
MEMBERS_INJECTOR
public static final BindingKind MEMBERS_INJECTOR
A binding for aMembersInjector
of a type.
-
SUBCOMPONENT_CREATOR
public static final BindingKind SUBCOMPONENT_CREATOR
- Since:
- 2.22 (previously named
SUBCOMPONENT_BUILDER
)
-
BOUND_INSTANCE
public static final BindingKind BOUND_INSTANCE
A binding for aBindsInstance
-annotated builder method.
-
PRODUCTION
public static final BindingKind PRODUCTION
A binding for aProduces
-annotated method.
-
COMPONENT_PRODUCTION
public static final BindingKind COMPONENT_PRODUCTION
A binding for a production method on a production component's ProductionComponent.dependencies() dependency} that returns aListenableFuture
orFluentFuture
. Methods on production component dependencies that don't return a future are considered component provision bindings.
-
MULTIBOUND_SET
public static final BindingKind MULTIBOUND_SET
A synthetic binding for a multibound set that depends on individual multibindingPROVISION
orPRODUCTION
contributions.
-
MULTIBOUND_MAP
public static final BindingKind MULTIBOUND_MAP
A synthetic binding for a multibound map that depends on the individual multibindingPROVISION
orPRODUCTION
contributions.
-
OPTIONAL
public static final BindingKind OPTIONAL
A synthetic binding forOptional
of a type or aProvider
,Lazy
, orProvider
ofLazy
of a type. Generated by aBindsOptionalOf
declaration.
-
DELEGATE
public static final BindingKind DELEGATE
A binding forBinds
-annotated method that delegates from requests for one key to another.
-
MEMBERS_INJECTION
public static final BindingKind MEMBERS_INJECTION
A binding for a members injection method on a component.
-
-
Method Detail
-
values
public static BindingKind[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (BindingKind c : BindingKind.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static BindingKind valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
isMultibinding
public boolean isMultibinding()
Returnstrue
if this is a kind of multibinding (not a contribution to a multibinding, but the multibinding itself).
-
-