public static enum Provides.Type extends Enum<Provides.Type>
Enum Constant and Description |
---|
MAP
The method's return type forms the type argument for the value of a
Map<K, Provider<V>> , and the combination of the annotated key and the returned value
is contributed to the map as a key/value pair. |
SET
The method's return type forms the generic type argument of a
Set<T> , and the
returned value is contributed to the set. |
SET_VALUES
Like
SET , except the method's return type is Set<T> , where any values are
contributed to the set. |
UNIQUE
The method is the only one which can produce the value for the specified return type.
|
Modifier and Type | Method and Description |
---|---|
static Provides.Type |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Provides.Type[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Provides.Type UNIQUE
public static final Provides.Type SET
Set<T>
, and the
returned value is contributed to the set. The object graph will pass dependencies to the
method as parameters. The Set<T>
produced from the accumulation of values will be
immutable.public static final Provides.Type SET_VALUES
@Beta public static final Provides.Type MAP
Map<K, Provider<V>>
, and the combination of the annotated key and the returned value
is contributed to the map as a key/value pair. The Map<K, Provider<V>>
produced from
the accumulation of values will be immutable.public static Provides.Type[] values()
for (Provides.Type c : Provides.Type.values()) System.out.println(c);
public static Provides.Type valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullCopyright © 2015 Google, Inc.. All rights reserved.