Home
last modified time | relevance | path

Searched refs:requestKind (Results 1 – 11 of 11) sorted by relevance

/external/dagger2/java/dagger/internal/codegen/
DFrameworkType.java53 Optional<RequestKind> requestKind() { in requestKind() method
58 CodeBlock to(RequestKind requestKind, CodeBlock from) { in to() argument
59 switch (requestKind) { in to()
83 String.format("Cannot request a %s from a %s", requestKind, this)); in to()
88 Expression to(RequestKind requestKind, Expression from, DaggerTypes types) { in to() argument
89 CodeBlock codeBlock = to(requestKind, from.codeBlock()); in to()
90 switch (requestKind) { in to()
107 types.rewrapType(from.type(), RequestKinds.frameworkClass(requestKind)), codeBlock); in to()
123 Optional<RequestKind> requestKind() { in requestKind() method
128 CodeBlock to(RequestKind requestKind, CodeBlock from) { in to() argument
[all …]
DBindingRequest.java48 static BindingRequest bindingRequest(Key key, RequestKind requestKind) { in bindingRequest() argument
58 key, Optional.of(requestKind), FrameworkType.forRequestKind(requestKind)); in bindingRequest()
67 key, frameworkType.requestKind(), Optional.of(frameworkType)); in bindingRequest()
79 abstract Optional<RequestKind> requestKind(); in requestKind() method in BindingRequest
85 final boolean isRequestKind(RequestKind requestKind) { in isRequestKind() argument
86 return requestKind.equals(requestKind().orElse(null)); in isRequestKind()
90 if (requestKind().isPresent()) { in requestedType()
91 return requestType(requestKind().get(), contributedType, types); in requestedType()
99 requestKind().isPresent() in kindName()
100 ? requestKind().get() in kindName()
[all …]
DRequestKinds.java52 static TypeMirror requestType(RequestKind requestKind, TypeMirror type, DaggerTypes types) { in requestType() argument
53 switch (requestKind) { in requestType()
64 return types.wrapType(type, frameworkClass(requestKind)); in requestType()
69 static TypeName requestTypeName(RequestKind requestKind, TypeName keyType) { in requestTypeName() argument
70 switch (requestKind) { in requestTypeName()
93 throw new AssertionError(requestKind); in requestTypeName()
137 static TypeMirror extractKeyType(RequestKind requestKind, TypeMirror type) { in extractKeyType() argument
139 switch (requestKind) { in extractKeyType()
145 checkArgument(isType(type) && isTypeOf(frameworkClass(requestKind), type)); in extractKeyType()
162 static Class<?> frameworkClass(RequestKind requestKind) { in frameworkClass() argument
[all …]
DFrameworkTypeMapper.java37 public FrameworkType getFrameworkType(RequestKind requestKind) { in FOR_PROVIDER() argument
38 switch (requestKind) { in FOR_PROVIDER()
46 throw new IllegalArgumentException(requestKind.toString()); in FOR_PROVIDER()
48 throw new AssertionError(requestKind); in FOR_PROVIDER()
54 public FrameworkType getFrameworkType(RequestKind requestKind) { in FOR_PRODUCER() argument
55 switch (requestKind) { in FOR_PRODUCER()
65 throw new AssertionError(requestKind); in FOR_PRODUCER()
74 abstract FrameworkType getFrameworkType(RequestKind requestKind); in getFrameworkType() argument
DDerivedFromFrameworkInstanceBindingExpression.java35 private final RequestKind requestKind; field in DerivedFromFrameworkInstanceBindingExpression
43 RequestKind requestKind, in DerivedFromFrameworkInstanceBindingExpression() argument
47 this.requestKind = checkNotNull(requestKind); in DerivedFromFrameworkInstanceBindingExpression()
56 requestKind, in getDependencyExpression()
67 Expression forRequestKind = frameworkType.to(requestKind, frameworkInstance, types); in getDependencyExpressionForComponentMethod()
DDelegateBindingExpression.java37 private final RequestKind requestKind; field in DelegateBindingExpression
44 RequestKind requestKind, in DelegateBindingExpression() argument
49 this.requestKind = checkNotNull(requestKind); in DelegateBindingExpression()
77 bindingRequest(getOnlyElement(binding.dependencies()).key(), requestKind), in getDependencyExpression()
81 switch (requestKind) { in getDependencyExpression()
88 delegateExpression, requestType(requestKind, contributedType, types)); in getDependencyExpression()
DComponentBindingExpressions.java253 && request.requestKind().isPresent() in getBindingExpression()
254 && isDerivedFromProvider(request.requestKind().get())) { in getBindingExpression()
255 RequestKind requestKind = request.requestKind().get(); in getBindingExpression() local
259 request.key(), FrameworkType.PROVIDER, requestKind, this, types)); in getBindingExpression()
408 if (!request.requestKind().isPresent()) { in provisionBindingExpression()
415 RequestKind requestKind = request.requestKind().get(); in provisionBindingExpression() local
416 switch (requestKind) { in provisionBindingExpression()
427 resolvedBindings.key(), FrameworkType.PROVIDER, requestKind, this, types); in provisionBindingExpression()
449 RequestKind requestKind = request.requestKind().get(); in productionBindingExpression() local
451 resolvedBindings.key(), FrameworkType.PRODUCER_NODE, requestKind, this, types); in productionBindingExpression()
DDependencyCycleValidator.java205 RequestKind requestKind = getRequestKind(optionalValueType); in breaksCycle() local
206 return breaksCycle(extractKeyType(requestKind, optionalValueType), requestKind); in breaksCycle()
211 private boolean breaksCycle(TypeMirror requestedType, RequestKind requestKind) { in breaksCycle() argument
212 switch (requestKind) { in breaksCycle()
DDependencyRequestFactory.java219 RequestKind requestKind = getRequestKind(type); in newDependencyRequest() local
221 .kind(requestKind) in newDependencyRequest()
222 .key(keyFactory.forQualifiedType(qualifier, extractKeyType(requestKind, type))) in newDependencyRequest()
224 .isNullable(allowsNull(requestKind, getNullableType(requestElement))) in newDependencyRequest()
DBindingFactory.java432 Key key, RequestKind requestKind, ResolvedBindings underlyingKeyBindings) { in syntheticOptionalBinding() argument
434 syntheticOptionalBindingBuilder(requestKind, underlyingKeyBindings) in syntheticOptionalBinding()
440 dependencyRequestFactory.forSyntheticPresentOptionalBinding(key, requestKind)); in syntheticOptionalBinding()
446 RequestKind requestKind, ResolvedBindings underlyingKeyBindings) { in syntheticOptionalBindingBuilder() argument
449 || requestKind.equals(RequestKind.PRODUCER) // handles producerFromProvider cases in syntheticOptionalBindingBuilder()
450 || requestKind.equals(RequestKind.PRODUCED)) // handles producerFromProvider cases in syntheticOptionalBindingBuilder()
DModifiableBindingExpressions.java322 if (request.requestKind().filter(RequestKinds::isDerivedFromProvider).isPresent()) { in getModifiableBindingType()
373 if (request.requestKind().isPresent()) { in shouldModifyImplementation()
374 switch (request.requestKind().get()) { in shouldModifyImplementation()