Home
last modified time | relevance | path

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

/external/dagger2/java/dagger/internal/codegen/binding/
DFrameworkType.java54 public Optional<RequestKind> requestKind() { in requestKind() method
59 public CodeBlock to(RequestKind requestKind, CodeBlock from) { in to() argument
60 switch (requestKind) { in to()
84 String.format("Cannot request a %s from a %s", requestKind, this)); in to()
89 public Expression to(RequestKind requestKind, Expression from, DaggerTypes types) { in to() argument
90 CodeBlock codeBlock = to(requestKind, from.codeBlock()); in to()
91 switch (requestKind) { in to()
108 types.rewrapType(from.type(), RequestKinds.frameworkClass(requestKind)), codeBlock); in to()
124 public Optional<RequestKind> requestKind() { in requestKind() method
129 public CodeBlock to(RequestKind requestKind, CodeBlock from) { in to() argument
[all …]
DBindingRequest.java45 public static BindingRequest bindingRequest(Key key, RequestKind requestKind) { in bindingRequest() argument
55 key, Optional.of(requestKind), FrameworkType.forRequestKind(requestKind)); in bindingRequest()
64 key, frameworkType.requestKind(), Optional.of(frameworkType)); in bindingRequest()
71 public abstract Optional<RequestKind> requestKind(); in requestKind() method in BindingRequest
77 public final boolean isRequestKind(RequestKind requestKind) { in isRequestKind() argument
78 return requestKind.equals(requestKind().orElse(null)); in isRequestKind()
82 if (requestKind().isPresent()) { in requestedType()
83 return requestType(requestKind().get(), contributedType, types); in requestedType()
91 requestKind().isPresent() in kindName()
92 ? requestKind().get() in kindName()
DFrameworkTypeMapper.java32 public FrameworkType getFrameworkType(RequestKind requestKind) { in FOR_PROVIDER() argument
33 switch (requestKind) { in FOR_PROVIDER()
41 throw new IllegalArgumentException(requestKind.toString()); in FOR_PROVIDER()
43 throw new AssertionError(requestKind); in FOR_PROVIDER()
49 public FrameworkType getFrameworkType(RequestKind requestKind) { in FOR_PRODUCER() argument
50 switch (requestKind) { in FOR_PRODUCER()
60 throw new AssertionError(requestKind); in FOR_PRODUCER()
69 public abstract FrameworkType getFrameworkType(RequestKind requestKind); in getFrameworkType() argument
DDependencyRequestFactory.java223 RequestKind requestKind = getRequestKind(type); in newDependencyRequest() local
225 .kind(requestKind) in newDependencyRequest()
228 .isNullable(allowsNull(requestKind, getNullableType(requestElement))) in newDependencyRequest()
DBindingFactory.java502 RequestKind requestKind, in syntheticOptionalBinding() argument
515 || requestKind.equals(RequestKind.PRODUCER) // handles producerFromProvider cases in syntheticOptionalBinding()
516 || requestKind.equals(RequestKind.PRODUCED); // handles producerFromProvider cases in syntheticOptionalBinding()
522 .dependencies(dependencyRequestFactory.forSyntheticPresentOptionalBinding(key, requestKind)) in syntheticOptionalBinding()
/external/dagger2/java/dagger/internal/codegen/base/
DRequestKinds.java52 RequestKind requestKind, TypeMirror type, DaggerTypes types) { in requestType() argument
53 switch (requestKind) { in requestType()
64 return types.wrapType(type, frameworkClass(requestKind)); in requestType()
69 public static TypeName requestTypeName(RequestKind requestKind, TypeName keyType) { in requestTypeName() argument
70 switch (requestKind) { in requestTypeName()
93 throw new AssertionError(requestKind); in requestTypeName()
138 private static TypeMirror extractKeyType(RequestKind requestKind, TypeMirror type) { in extractKeyType() argument
139 switch (requestKind) { in extractKeyType()
162 public static Class<?> frameworkClass(RequestKind requestKind) { in frameworkClass() argument
163 Class<?> result = FRAMEWORK_CLASSES.get(requestKind); in frameworkClass()
[all …]
/external/dagger2/java/dagger/internal/codegen/writing/
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 return frameworkType.to(requestKind, frameworkInstance, types); in getDependencyExpressionForComponentMethod()
DDelegateBindingExpression.java41 private final RequestKind requestKind; field in DelegateBindingExpression
48 RequestKind requestKind, in DelegateBindingExpression() argument
53 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.java400 if (!request.requestKind().isPresent()) { in provisionBindingExpression()
407 RequestKind requestKind = request.requestKind().get(); in provisionBindingExpression() local
409 switch (requestKind) { in provisionBindingExpression()
420 key, FrameworkType.PROVIDER, requestKind, this, types); in provisionBindingExpression()
442 RequestKind requestKind = request.requestKind().get(); in productionBindingExpression() local
444 request.key(), FrameworkType.PRODUCER_NODE, requestKind, this, types); in productionBindingExpression()
/external/dagger2/java/dagger/internal/codegen/bindinggraphvalidation/
DDependencyCycleValidator.java215 RequestKind requestKind = getRequestKind(optionalValueType); in breaksCycle() local
216 return breaksCycle(extractKeyType(optionalValueType), requestKind); in breaksCycle()
221 private boolean breaksCycle(TypeMirror requestedType, RequestKind requestKind) { in breaksCycle() argument
222 switch (requestKind) { in breaksCycle()
/external/dagger2/java/dagger/internal/codegen/validation/
DDependencyRequestValidator.java118 RequestKind requestKind = RequestKinds.getRequestKind(requestType); in checkType() local
128 if (requestKind != RequestKind.INSTANCE && isAssistedFactoryType(typeElement)) { in checkType()