MCPcopy Index your code
hub / github.com/google/dagger / bindingMethodKeyType

Method bindingMethodKeyType

java/dagger/internal/codegen/KeyFactory.java:214–236  ·  view source on GitHub ↗
(
      TypeMirror returnType,
      ExecutableElement method,
      ContributionType contributionType,
      Optional<TypeElement> frameworkType)

Source from the content-addressed store, hash-verified

212 }
213
214 private TypeMirror bindingMethodKeyType(
215 TypeMirror returnType,
216 ExecutableElement method,
217 ContributionType contributionType,
218 Optional<TypeElement> frameworkType) {
219 switch (contributionType) {
220 case UNIQUE:
221 return returnType;
222 case SET:
223 return setOf(returnType);
224 case MAP:
225 TypeMirror mapKeyType = mapKeyType(getMapKey(method).get(), types);
226 return frameworkType.isPresent()
227 ? mapOfFrameworkType(mapKeyType, frameworkType.get(), returnType)
228 : mapOf(mapKeyType, returnType);
229 case SET_VALUES:
230 // TODO(gak): do we want to allow people to use "covariant return" here?
231 checkArgument(SetType.isSet(returnType));
232 return returnType;
233 default:
234 throw new AssertionError();
235 }
236 }
237
238 /**
239 * Returns the key for a binding associated with a {@link DelegateDeclaration}.

Callers 1

forBindingMethodMethod · 0.95

Calls 7

setOfMethod · 0.95
mapOfFrameworkTypeMethod · 0.95
mapOfMethod · 0.95
isSetMethod · 0.95
mapKeyTypeMethod · 0.80
getMapKeyMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected