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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic DependencyRequest.Builder
builder()
Returns a new builder of dependency requests.abstract boolean
Returnstrue
if this request allows null objects.abstract Key
key()
The key of this request.abstract RequestKind
kind()
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()Returnstrue
if 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.
-