Source:
public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) { if (roundEnv.processingOver()) { return false; } info("Processing @%s", Extension.class); for (Element element : roundEnv.getElementsAnnotatedWith(Extension.class)) { if (!(element instanceof TypeElement)) { continue; } if (!isExtension(element.asType())) { continue; } TypeElement extensionElement = (TypeElement) element; List<TypeElement> extensionPointElements; AnnotationMirror annotation = getAnnotationMirror(extensionElement, Extension.class); AnnotationValue annotatedExtensionPoints = (annotation != null) ? getAnnotationValue(annotation, "provides") : null; List<? extends AnnotationValue> extensionPointClasses = (annotatedExtensionPoints != null) ? (List<? extends AnnotationValue>) annotatedExtensionPoints.getValue() : null; if (extensionPointClasses != null && !extensionPointClasses.isEmpty()) { extensionPointElements = new ArrayList<>(); for (AnnotationValue extensionPointClass : extensionPointClasses) { String extensionPointClassName = extensionPointClass.getValue().toString(); TypeElement extensionPointElement = processingEnv.getElementUtils().getTypeElement(extensionPointClassName); extensionPointElements.add(extensionPointElement); } } else { extensionPointElements = findExtensionPoints(extensionElement); } if (extensionPointElements.isEmpty()) { continue; } String extension = getBinaryName(extensionElement); for (TypeElement extensionPointElement : extensionPointElements) { String extensionPoint = getBinaryName(extensionPointElement); Set<String> extensionPoints = extensions.get(extensionPoint); if (extensionPoints == null) { extensionPoints = new TreeSet<>(); extensions.put(extensionPoint, extensionPoints); } extensionPoints.add(extension); } } oldExtensions = storage.read(); for (Map.Entry<String, Set<String>> entry : oldExtensions.entrySet()) { String extensionPoint = entry.getKey(); if (extensions.containsKey(extensionPoint)) { extensions.get(extensionPoint).addAll(entry.getValue()); } else { extensions.put(extensionPoint, entry.getValue()); } } storage.write(extensions); return false; }

Target:
public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) { if (roundEnv.processingOver()) { return false; } info("Processing @%s", Extension.class); for (Element element : roundEnv.getElementsAnnotatedWith(Extension.class)) { if (!(element instanceof TypeElement)) { continue; } if (!isExtension(element.asType())) { continue; } TypeElement extensionElement = (TypeElement) element; List<TypeElement> extensionPointElements = findExtensionPoints(extensionElement); if (extensionPointElements.isEmpty()) { continue; } String extension = getBinaryName(extensionElement); for (TypeElement extensionPointElement : extensionPointElements) { String extensionPoint = getBinaryName(extensionPointElement); Set<String> extensionPoints = extensions.get(extensionPoint); if (extensionPoints == null) { extensionPoints = new TreeSet<>(); extensions.put(extensionPoint, extensionPoints); } extensionPoints.add(extension); } } oldExtensions = storage.read(); for (Map.Entry<String, Set<String>> entry : oldExtensions.entrySet()) { String extensionPoint = entry.getKey(); if (extensions.containsKey(extensionPoint)) { extensions.get(extensionPoint).addAll(entry.getValue()); } else { extensions.put(extensionPoint, entry.getValue()); } } storage.write(extensions); return false; }