Package dagger.model
Class Key
java.lang.Object
dagger.model.Key
A type and an optional qualifier that
is the lookup key for a binding.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
A builder forKey
s.static final class
An object that identifies a multibinding contribution method and the module class that contributes it to the graph. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Key.Builder
builder
(TypeMirror type) Returns a builder forKey
s.abstract boolean
abstract int
hashCode()
Distinguishes keys for multibinding contributions that share atype()
andqualifier()
.final Optional<AnnotationMirror>
AQualifier
annotation that provides a unique namespace prefix for the type of this key.abstract Key.Builder
Returns aKey.Builder
that inherits the properties of this key.final String
toString()
final TypeMirror
type()
The type represented by this key.
-
Constructor Details
-
Key
public Key()
-
-
Method Details
-
qualifier
AQualifier
annotation that provides a unique namespace prefix for the type of this key. -
type
The type represented by this key. -
multibindingContributionIdentifier
public abstract Optional<Key.MultibindingContributionIdentifier> multibindingContributionIdentifier()Distinguishes keys for multibinding contributions that share atype()
andqualifier()
.Each multibound map and set has a synthetic multibinding that depends on the specific contributions to that map or set using keys that identify those multibinding contributions.
Absent except for multibinding contributions.
-
toBuilder
Returns aKey.Builder
that inherits the properties of this key. -
hashCode
@Memoized public abstract int hashCode() -
equals
-
toString
-
builder
Returns a builder forKey
s.
-