@DoNotMock(value="Use Key.builder() to create an instance.") public abstract class Key extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Key.Builder
A builder for
Key s. |
static class |
Key.MultibindingContributionIdentifier
An object that identifies a multibinding contribution method and the module class that
contributes it to the graph.
|
Constructor and Description |
---|
Key() |
Modifier and Type | Method and Description |
---|---|
static Key.Builder |
builder(TypeMirror type)
Returns a builder for
Key s. |
abstract int |
hashCode() |
abstract Optional<Key.MultibindingContributionIdentifier> |
multibindingContributionIdentifier()
Distinguishes keys for multibinding contributions that share a
type() and qualifier() . |
Optional<AnnotationMirror> |
qualifier()
A
Qualifier annotation that provides a unique namespace prefix
for the type of this key. |
abstract Key.Builder |
toBuilder()
Returns a
Key.Builder that inherits the properties of this key. |
String |
toString() |
TypeMirror |
type()
The type represented by this key.
|
public final Optional<AnnotationMirror> qualifier()
Qualifier
annotation that provides a unique namespace prefix
for the type of this key.public final TypeMirror type()
public abstract Optional<Key.MultibindingContributionIdentifier> multibindingContributionIdentifier()
type()
and qualifier()
.
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.
public abstract Key.Builder toBuilder()
Key.Builder
that inherits the properties of this key.public static Key.Builder builder(TypeMirror type)
Key
s.Copyright © 2012–2017 The Dagger Authors. All rights reserved.