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

Method getMapKey

java/dagger/internal/codegen/MapKeys.java:62–67  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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}.

Callers 3

bindingMethodKeyTypeMethod · 0.80
createMethod · 0.80

Calls 4

getMapKeysMethod · 0.95
isEmptyMethod · 0.80
emptyMethod · 0.45
ofMethod · 0.45

Tested by

no test coverage detected