Package dagger.model
Class DependencyRequest
- java.lang.Object
-
- dagger.model.DependencyRequest
-
public abstract class DependencyRequest extends java.lang.ObjectRepresents a request for aKeyat an injection point. For example, parameters toInjectconstructors,Providesmethods, and component methods are all dependency requests.A dependency request is considered to be synthetic if it does not have an
Elementin code that requests the key directly. For example, anExecutoris required for all@Producesmethods to run asynchronously even though it is not directly specified as a parameter to the binding method.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDependencyRequest.BuilderA builder ofDependencyRequests.
-
Constructor Summary
Constructors Constructor Description DependencyRequest()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static DependencyRequest.Builderbuilder()Returns a new builder of dependency requests.abstract booleanisNullable()Returnstrueif this request allows null objects.abstract Keykey()The key of this request.abstract RequestKindkind()The kind of this request.abstract java.util.Optional<javax.lang.model.element.Element>requestElement()The element that declares this dependency request.
-
-
-
Method Detail
-
kind
public abstract RequestKind kind()
The kind of this request.
-
key
public abstract Key key()
The key of this request.
-
requestElement
public abstract java.util.Optional<javax.lang.model.element.Element> 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
public static DependencyRequest.Builder builder()
Returns a new builder of dependency requests.
-
-