Lines Matching refs:mapKey
24 import com.google.inject.multibindings.MapKey;
55 @SuppressWarnings({"unchecked", "rawtypes"}) // mapKey doesn't know its key type
60 AnnotationOrError mapKey = findMapKeyAnnotation(binder, method);
62 if (mapKey.annotation != null) {
63 binder.addError("Found a MapKey annotation on non map binding at %s.", method);
69 if (mapKey.annotation != null) {
70 binder.addError("Found a MapKey annotation on non map binding at %s.", method);
74 if (mapKey.error) {
75 // Already failed on the MapKey, don't bother doing more work.
78 if (mapKey.annotation == null) {
79 // If no MapKey, make an error and abort.
80 binder.addError("No MapKey found for map binding at %s.", method);
83 TypeAndValue typeAndValue = typeAndValueOfMapKey(mapKey.annotation);
87 if (mapKey.annotation != null) {
88 binder.addError("Found a MapKey annotation on non map binding at %s.", method);
121 MapKey mapKey = annotation.annotationType().getAnnotation(MapKey.class);
122 if (mapKey != null) {
124 binder.addError("Found more than one MapKey annotations on %s.", method);
127 if (mapKey.unwrapValue()) {
133 "Array types are not allowed in a MapKey with unwrapValue=true: %s",
139 "No 'value' method in MapKey with unwrapValue=true: %s",
152 if (!mapKeyAnnotation.annotationType().getAnnotation(MapKey.class).unwrapValue()) {