Package dagger.model
Enum Class BindingKind
- All Implemented Interfaces:
Serializable,Comparable<BindingKind>,Constable
Represents the different kinds of
Bindings 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 ConstantsEnum 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 aListenableFutureorFluentFuture.A binding for a provision method on a component's dependency.A binding forBinds-annotated method 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 aMembersInjectorof a type.A synthetic binding for a multibound map that depends on the individual multibindingPROVISIONorPRODUCTIONcontributions.A synthetic binding for a multibound set that depends on individual multibindingPROVISIONorPRODUCTIONcontributions.A binding for aProduces-annotated method.A binding for aProvides-annotated method. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturnstrueif this is a kind of multibinding (not a contribution to a multibinding, but the multibinding itself).static BindingKindReturns 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 aMembersInjectorof 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 aListenableFutureorFluentFuture. 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 multibindingPROVISIONorPRODUCTIONcontributions. -
MULTIBOUND_MAP
A synthetic binding for a multibound map that depends on the individual multibindingPROVISIONorPRODUCTIONcontributions. -
OPTIONAL
A synthetic binding forOptionalof a type or aProvider,Lazy, orProviderofLazyof a type. Generated by aBindsOptionalOfdeclaration. -
DELEGATE
A binding forBinds-annotated method 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()Returnstrueif this is a kind of multibinding (not a contribution to a multibinding, but the multibinding itself).
-