Package dagger.model
Enum RequestKind
- java.lang.Object
-
- java.lang.Enum<RequestKind>
-
- dagger.model.RequestKind
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<RequestKind>
public enum RequestKind extends java.lang.Enum<RequestKind>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description FUTURE
A request for aListenableFuture
.INSTANCE
A default request for an instance.LAZY
A request for aLazy
.MEMBERS_INJECTION
A request for a members injection.PRODUCED
A request for aProduced
.PRODUCER
A request for aProducer
.PROVIDER
A request for aProvider
.PROVIDER_OF_LAZY
A request for aProvider
of aLazy
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
format(Key key)
Returns a string that represents requests of this kind for a key.static RequestKind
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static RequestKind[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
INSTANCE
public static final RequestKind INSTANCE
A default request for an instance. E.g.:FooType
-
PROVIDER
public static final RequestKind PROVIDER
A request for aProvider
. E.g.:Provider<FooType>
-
LAZY
public static final RequestKind LAZY
A request for aLazy
. E.g.:Lazy<FooType>
-
PROVIDER_OF_LAZY
public static final RequestKind PROVIDER_OF_LAZY
-
MEMBERS_INJECTION
public static final RequestKind MEMBERS_INJECTION
A request for a members injection. E.g.void injectMembers(FooType);
. Can only be requested by component interfaces.
-
PRODUCER
public static final RequestKind PRODUCER
A request for aProducer
. E.g.:Producer<FooType>
-
PRODUCED
public static final RequestKind PRODUCED
A request for aProduced
. E.g.:Produced<FooType>
-
FUTURE
public static final RequestKind FUTURE
A request for aListenableFuture
. E.g.:ListenableFuture<FooType>
. These can only be requested by component interfaces.
-
-
Method Detail
-
values
public static RequestKind[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (RequestKind c : RequestKind.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static RequestKind valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
format
public java.lang.String format(Key key)
Returns a string that represents requests of this kind for a key.
-
-