@Override
public Set<Element> process(SetMultimap<Class<? extends Annotation>, Element> elementsByAnnotation) {
for (Map.Entry<Class<? extends Annotation>, Element> entry : elementsByAnnotation.entries()) {
AnnotationMirror annotation =
getAnnotationMirror(entry.getValue(), AndroidInjectorKeyRegistry.class).get();
for (TypeMirror mapKey :
getAnnotationValue(annotation, "keys").accept(new Util.AllTypesVisitor(), null)) {
if (daggerSupportedTypes.containsKey(mapKey)) {
messager.printMessage(Diagnostic.Kind.ERROR, String.format("%s is automatically supported", mapKey));
}
if (isAnnotationPresent(MoreTypes.asElement(mapKey), MapKey.class)) {
TypeMirror mapKeyValue = mapKeyValue(mapKey, elements);
annotationsAndTypes.put(mapKey, mapKeyValue);
} else {
messager.printMessage(Diagnostic.Kind.ERROR, String.format("%s is not a @MapKey", mapKey), entry.getValue());
}
}
}
return ImmutableSet.of();
}