If bindingElement is annotated with a MapKey annotation, returns it. @throws IllegalArgumentException if the element is annotated with more than one MapKey annotation
(Element bindingElement)
| 60 | * annotation |
| 61 | */ |
| 62 | static Optional<AnnotationMirror> getMapKey(Element bindingElement) { |
| 63 | ImmutableSet<? extends AnnotationMirror> mapKeys = getMapKeys(bindingElement); |
| 64 | return mapKeys.isEmpty() |
| 65 | ? Optional.empty() |
| 66 | : Optional.<AnnotationMirror>of(getOnlyElement(mapKeys)); |
| 67 | } |
| 68 | |
| 69 | /** |
| 70 | * Returns all of the {@link MapKey} annotations that annotate {@code bindingElement}. |
no test coverage detected