Package dagger.model
Class DependencyRequest
java.lang.Object
dagger.model.DependencyRequest
Represents a request for a
Key at an injection point. For example, parameters to Inject constructors, Provides methods, and component methods are all dependency
requests.
A dependency request is considered to be synthetic if it does not have
an Element in code that requests the key directly. For example, an Executor is required for all @Produces methods to run
asynchronously even though it is not directly specified as a parameter to the binding method.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic DependencyRequest.Builderbuilder()Returns a new builder of dependency requests.abstract booleanReturnstrueif this request allows null objects.abstract Keykey()The key of this request.abstract RequestKindkind()The kind of this request.The element that declares this dependency request.
-
Constructor Details
-
DependencyRequest
public DependencyRequest()
-
-
Method Details
-
kind
The kind of this request. -
key
The key of this request. -
requestElement
The element that declares this dependency request. Absent for synthetic requests. -
isNullable
public abstract boolean isNullable()Returnstrueif this request allows null objects. A request is nullable if it is has an annotation with "Nullable" as its simple name. -
builder
Returns a new builder of dependency requests.
-