(
TypeMirror returnType,
ExecutableElement method,
ContributionType contributionType,
Optional<TypeElement> frameworkType)
| 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}. |
no test coverage detected