Package dagger.spi.model
Enum Class BindingKind
- All Implemented Interfaces:
Serializable
,Comparable<BindingKind>
,Constable
Represents the different kinds of
Binding
s that can exist in a binding graph.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionA binding for anAssistedFactory
-annotated type.A binding for anInject
-annotated constructor that contains at least oneAssisted
-annotated parameter.A binding for aBindsInstance
-annotated builder method.An implicit binding for aComponent
- orProductionComponent
-annotated type.A binding for an instance of a component's dependency.A binding for a production method on a production component'sProductionComponent#dependencies()
that returns aListenableFuture
orFluentFuture
.A binding for a provision method on a component's dependency.A binding forBinds
-annotated method that that delegates from requests for one key to another.A binding for anInject
-annotated constructor.A binding for a members injection method on a component.A binding for aMembersInjector
of a type.A synthetic binding for a multibound map that depends on the individual multibindingPROVISION
orPRODUCTION
contributions.A synthetic binding for a multibound set that depends on individual multibindingPROVISION
orPRODUCTION
contributions.A binding for aProduces
-annotated method.A binding for aProvides
-annotated method. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returnstrue
if this is a kind of multibinding (not a contribution to a multibinding, but the multibinding itself).static BindingKind
Returns the enum constant of this class with the specified name.static BindingKind[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
INJECTION
A binding for anInject
-annotated constructor. -
PROVISION
A binding for aProvides
-annotated method. -
ASSISTED_INJECTION
A binding for anInject
-annotated constructor that contains at least oneAssisted
-annotated parameter. -
ASSISTED_FACTORY
A binding for anAssistedFactory
-annotated type. -
COMPONENT
An implicit binding for aComponent
- orProductionComponent
-annotated type. -
COMPONENT_PROVISION
A binding for a provision method on a component's dependency. -
COMPONENT_DEPENDENCY
A binding for an instance of a component's dependency. -
MEMBERS_INJECTOR
A binding for aMembersInjector
of a type. -
SUBCOMPONENT_CREATOR
- Since:
- 2.22 (previously named
SUBCOMPONENT_BUILDER
)
-
BOUND_INSTANCE
A binding for aBindsInstance
-annotated builder method. -
PRODUCTION
A binding for aProduces
-annotated method. -
COMPONENT_PRODUCTION
A binding for a production method on a production component'sProductionComponent#dependencies()
that returns aListenableFuture
orFluentFuture
. Methods on production component dependencies that don't return a future are considered component provision bindings. -
MULTIBOUND_SET
A synthetic binding for a multibound set that depends on individual multibindingPROVISION
orPRODUCTION
contributions. -
MULTIBOUND_MAP
A synthetic binding for a multibound map that depends on the individual multibindingPROVISION
orPRODUCTION
contributions. -
OPTIONAL
A synthetic binding forOptional
of a type or aProvider
,Lazy
, orProvider
ofLazy
of a type. Generated by aBindsOptionalOf
declaration. -
DELEGATE
A binding forBinds
-annotated method that that delegates from requests for one key to another. -
MEMBERS_INJECTION
A binding for a members injection method on a component.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- 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).
-