Home
last modified time | relevance | path

Searched refs:requestingClass (Results 1 – 25 of 27) sorted by relevance

12

/external/dagger2/java/dagger/internal/codegen/writing/
DSimpleMethodBindingExpression.java86 Expression getDependencyExpression(ClassName requestingClass) { in getDependencyExpression() argument
87 return requiresInjectionMethod(provisionBinding, compilerOptions, requestingClass) in getDependencyExpression()
88 ? invokeInjectionMethod(requestingClass) in getDependencyExpression()
89 : invokeMethod(requestingClass); in getDependencyExpression()
92 private Expression invokeMethod(ClassName requestingClass) { in invokeMethod() argument
98 request -> dependencyArgument(request, requestingClass).codeBlock(), in invokeMethod()
99 requestingClass)); in invokeMethod()
104 invocation = CodeBlock.of("new $T($L)", constructorTypeName(requestingClass), arguments); in invokeMethod()
108 Optional<CodeBlock> requiredModuleInstance = moduleReference(requestingClass); in invokeMethod()
127 private TypeName constructorTypeName(ClassName requestingClass) { in constructorTypeName() argument
[all …]
DSetBindingExpression.java64 Expression getDependencyExpression(ClassName requestingClass) { in getDependencyExpression() argument
73 .add(maybeTypeParameter(requestingClass)) in getDependencyExpression()
79 .map(dependency -> getContributionExpression(dependency, requestingClass)) in getDependencyExpression()
85 return collectionsStaticFactoryInvocation(requestingClass, CodeBlock.of("emptySet()")); in getDependencyExpression()
89 CodeBlock contributionExpression = getContributionExpression(dependency, requestingClass); in getDependencyExpression()
92 requestingClass, CodeBlock.of("singleton($L)", contributionExpression)); in getDependencyExpression()
98 .add(maybeTypeParameter(requestingClass)) in getDependencyExpression()
108 .add(maybeTypeParameter(requestingClass)); in getDependencyExpression()
119 ".$L($L)", builderMethod, getContributionExpression(dependency, requestingClass)); in getDependencyExpression()
134 DependencyRequest dependency, ClassName requestingClass) { in getContributionExpression() argument
[all …]
DMapBindingExpression.java75 Expression getDependencyExpression(ClassName requestingClass) { in getDependencyExpression() argument
84 .add(maybeTypeParameters(requestingClass)) in getDependencyExpression()
90 .map(dependency -> keyAndValueExpression(dependency, requestingClass)) in getDependencyExpression()
96 return collectionsStaticFactoryInvocation(requestingClass, CodeBlock.of("emptyMap()")); in getDependencyExpression()
99 requestingClass, in getDependencyExpression()
102 keyAndValueExpression(getOnlyElement(dependencies.keySet()), requestingClass))); in getDependencyExpression()
107 .add(maybeTypeParameters(requestingClass)); in getDependencyExpression()
116 instantiation.add(".put($L)", keyAndValueExpression(dependency, requestingClass)); in getDependencyExpression()
130 private CodeBlock keyAndValueExpression(DependencyRequest dependency, ClassName requestingClass) { in keyAndValueExpression() argument
133 getMapKeyExpression(dependencies.get(dependency), requestingClass, elements), in keyAndValueExpression()
[all …]
DComponentRequirementExpression.java35 CodeBlock getExpression(ClassName requestingClass); in getExpression() argument
44 default CodeBlock getExpressionDuringInitialization(ClassName requestingClass) { in getExpressionDuringInitialization() argument
45 return getExpression(requestingClass); in getExpressionDuringInitialization()
52 default CodeBlock getModifiableModuleMethodExpression(ClassName requestingClass) { in getModifiableModuleMethodExpression() argument
53 return CodeBlock.of("return $L", getExpression(requestingClass)); in getModifiableModuleMethodExpression()
DInnerSwitchingProviders.java60 Expression getDependencyExpression(ClassName requestingClass) { in newBindingExpression()
61 return getProviderExpression(new SwitchCase(binding, requestingClass)); in newBindingExpression()
81 private final ClassName requestingClass;
83 SwitchCase(ContributionBinding binding, ClassName requestingClass) {
85 this.requestingClass = requestingClass;
95 TypeMirror instanceType = types.accessibleType(binding.contributedType(), requestingClass);
DAnonymousProviderCreationExpression.java38 private final ClassName requestingClass; field in AnonymousProviderCreationExpression
43 ClassName requestingClass) { in AnonymousProviderCreationExpression() argument
46 this.requestingClass = requestingClass; in AnonymousProviderCreationExpression()
57 requestingClass.nestedClass("Anonymous")); in creationExpression()
DComponentRequirementExpressions.java77 CodeBlock getExpression(ComponentRequirement componentRequirement, ClassName requestingClass) { in getExpression() argument
78 return getExpression(componentRequirement).getExpression(requestingClass); in getExpression()
89 ComponentRequirement componentRequirement, ClassName requestingClass) { in getExpressionDuringInitialization() argument
90 return getExpression(componentRequirement).getExpressionDuringInitialization(requestingClass); in getExpressionDuringInitialization()
148 public CodeBlock getExpression(ClassName requestingClass) { in getExpression() argument
149 return field.get().getExpressionFor(requestingClass); in getExpression()
216 public CodeBlock getExpressionDuringInitialization(ClassName requestingClass) { in getExpressionDuringInitialization() argument
217 if (componentImplementation.name().equals(requestingClass)) { in getExpressionDuringInitialization()
222 return getExpression(requestingClass); in getExpressionDuringInitialization()
DImmediateFutureBindingExpression.java50 Expression getDependencyExpression(ClassName requestingClass) { in getDependencyExpression() argument
53 CodeBlock.of("$T.immediateFuture($L)", Futures.class, instanceExpression(requestingClass))); in getDependencyExpression()
56 private CodeBlock instanceExpression(ClassName requestingClass) { in instanceExpression() argument
59 bindingRequest(key, RequestKind.INSTANCE), requestingClass); in instanceExpression()
68 "($T) $L", types.accessibleType(key.type(), requestingClass), expression.codeBlock()); in instanceExpression()
DDelegateBindingExpression.java74 Expression getDependencyExpression(ClassName requestingClass) { in getDependencyExpression() argument
78 requestingClass); in getDependencyExpression()
83 return instanceRequiresCast(delegateExpression, requestingClass) in getDependencyExpression()
92 private boolean instanceRequiresCast(Expression delegateExpression, ClassName requestingClass) { in instanceRequiresCast() argument
97 && isTypeAccessibleFrom(binding.contributedType(), requestingClass.packageName()); in instanceRequiresCast()
DOptionalBindingExpression.java55 Expression getDependencyExpression(ClassName requestingClass) { in getDependencyExpression() argument
65 if (isTypeAccessibleFrom(binding.key().type(), requestingClass.packageName())) { in getDependencyExpression()
76 .getDependencyExpression(bindingRequest(dependency), requestingClass) in getDependencyExpression()
81 return isTypeAccessibleFrom(dependency.key().type(), requestingClass.packageName()) in getDependencyExpression()
DFrameworkInstanceBindingExpression.java58 Expression getDependencyExpression(ClassName requestingClass) { in getDependencyExpression() argument
61 isTypeAccessibleFrom(binding.contributedType(), requestingClass.packageName()) in getDependencyExpression()
65 return Expression.create(expressionType, memberSelect.getExpressionFor(requestingClass)); in getDependencyExpression()
DInjectionMethods.java145 ClassName requestingClass, in invoke() argument
151 invokeArguments(binding, dependencyUsage, requestingClass).forEach(arguments::add); in invoke()
155 return invokeMethod(methodSpec, arguments.build(), enclosingClass, requestingClass); in invoke()
161 ClassName requestingClass) { in invokeArguments() argument
177 injectionMethodArgument(request, dependencyUsage.apply(request), requestingClass)); in invokeArguments()
207 ProvisionBinding binding, CompilerOptions compilerOptions, ClassName requestingClass) { in requiresInjectionMethod() argument
211 || !isElementAccessibleFrom(method, requestingClass.packageName()) in requiresInjectionMethod()
215 .anyMatch(type -> !isRawTypeAccessible(type, requestingClass.packageName())); in requiresInjectionMethod()
504 ClassName requestingClass) { in invokeMethod() argument
507 return enclosingClass.equals(requestingClass) in invokeMethod()
DComponentRequirementBindingExpression.java43 Expression getDependencyExpression(ClassName requestingClass) { in getDependencyExpression() argument
46 componentRequirementExpressions.getExpression(componentRequirement, requestingClass)); in getDependencyExpression()
DComponentInstanceBindingExpression.java36 Expression getDependencyExpression(ClassName requestingClass) { in getDependencyExpression() argument
39 componentName.equals(requestingClass) in getDependencyExpression()
DProducerNodeInstanceBindingExpression.java55 Expression getDependencyExpression(ClassName requestingClass) { in getDependencyExpression() argument
56 Expression result = super.getDependencyExpression(requestingClass); in getDependencyExpression()
DDerivedFromFrameworkInstanceBindingExpression.java54 Expression getDependencyExpression(ClassName requestingClass) { in getDependencyExpression() argument
57 componentBindingExpressions.getDependencyExpression(frameworkRequest, requestingClass), in getDependencyExpression()
DComponentProvisionBindingExpression.java50 Expression getDependencyExpression(ClassName requestingClass) { in getDependencyExpression() argument
54 componentRequirementExpressions.getExpression(componentRequirement(), requestingClass), in getDependencyExpression()
DComponentMethodBindingExpression.java76 Expression getDependencyExpression(ClassName requestingClass) { in getDependencyExpression() argument
78 Expression expression = super.getDependencyExpression(requestingClass); in getDependencyExpression()
DComponentBindingExpressions.java131 public Expression getDependencyExpression(BindingRequest request, ClassName requestingClass) { in getDependencyExpression() argument
132 return getBindingExpression(request).getDependencyExpression(requestingClass); in getDependencyExpression()
196 DependencyRequest dependencyRequest, ClassName requestingClass) { in getDependencyArgumentExpression() argument
200 Expression dependencyExpression = getDependencyExpression(bindingRequest, requestingClass); in getDependencyArgumentExpression()
203 && !isTypeAccessibleFrom(dependencyType, requestingClass.packageName()) in getDependencyArgumentExpression()
204 && isRawTypeAccessible(dependencyType, requestingClass.packageName())) { in getDependencyArgumentExpression()
DAssistedFactoryBindingExpression.java66 Expression getDependencyExpression(ClassName requestingClass) { in getDependencyExpression() argument
77 requestingClass.peerClass("")); in getDependencyExpression()
DModuleProxies.java144 public CodeBlock newModuleInstance(TypeElement moduleElement, ClassName requestingClass) { in newModuleInstance() argument
146 String packageName = requestingClass.packageName(); in newModuleInstance()
DBindingExpression.java34 abstract Expression getDependencyExpression(ClassName requestingClass); in getDependencyExpression() argument
DSubcomponentCreatorBindingExpression.java37 Expression getDependencyExpression(ClassName requestingClass) { in getDependencyExpression() argument
/external/dagger2/java/dagger/internal/codegen/langmodel/
DDaggerTypes.java171 public TypeMirror accessibleType(TypeMirror type, ClassName requestingClass) { in accessibleType() argument
174 t -> Accessibility.isTypeAccessibleFrom(t, requestingClass.packageName()), in accessibleType()
175 t -> Accessibility.isRawTypeAccessible(t, requestingClass.packageName())); in accessibleType()
/external/dagger2/java/dagger/internal/codegen/binding/
DMapKeys.java148 ContributionBinding binding, ClassName requestingClass, DaggerElements elements) { in getMapKeyExpression() argument
151 mapKeyAnnotation, requestingClass.packageName()) in getMapKeyExpression()

12