821
822 /**
823 * Free jar files, etc. if using a service loader.
824 */
825 public void close() {
826 if (processorIterator != null &&
827 processorIterator instanceof ServiceIterator) {
828 ((ServiceIterator) processorIterator).close();
829 }
830 }
831 }
832
833 private void discoverAndRunProcs(Set<TypeElement> annotationsPresent,
834 List<ClassSymbol> topLevelClasses,
835 List<PackageSymbol> packageInfoFiles,
836 List<ModuleSymbol> moduleInfoFiles) {
837 Map<String, TypeElement> unmatchedAnnotations = new HashMap<>(annotationsPresent.size());
838
839 for(TypeElement a : annotationsPresent) {
840 ModuleElement mod = elementUtils.getModuleOf(a);
841 String moduleSpec = allowModules && mod != null ? mod.getSimpleName() + "/" : "";
842 unmatchedAnnotations.put(moduleSpec + a.getQualifiedName().toString(),
843 a);
844 }
845
846 // Give "*" processors a chance to match
847 if (unmatchedAnnotations.size() == 0)
848 unmatchedAnnotations.put("", null);
849
850 DiscoveredProcessors.ProcessorStateIterator psi = discoveredProcs.iterator();
851 // TODO: Create proper argument values; need past round
852 // information to fill in this constructor. Note that the 1
853 // st round of processing could be the last round if there
854 // were parse errors on the initial source files; however, we
855 // are not doing processing in that case.
856
857 Set<Element> rootElements = new LinkedHashSet<>();
858 rootElements.addAll(topLevelClasses);
859 rootElements.addAll(packageInfoFiles);
860 rootElements.addAll(moduleInfoFiles);
861 rootElements = Collections.unmodifiableSet(rootElements);
|
821
822 /**
823 * Free jar files, etc. if using a service loader.
824 */
825 public void close() {
826 if (processorIterator != null &&
827 processorIterator instanceof ServiceIterator) {
828 ((ServiceIterator) processorIterator).close();
829 }
830 }
831 }
832
833 private void discoverAndRunProcs(Set<TypeElement> annotationsPresent,
834 List<ClassSymbol> topLevelClasses,
835 List<PackageSymbol> packageInfoFiles,
836 List<ModuleSymbol> moduleInfoFiles) {
837 Map<String, TypeElement> unmatchedAnnotations = new HashMap<>(annotationsPresent.size());
838
839 for(TypeElement a : annotationsPresent) {
840 ModuleElement mod = elementUtils.getModuleOf(a);
841 String moduleSpec = allowModules && mod != null ? mod.getQualifiedName() + "/" : "";
842 unmatchedAnnotations.put(moduleSpec + a.getQualifiedName().toString(),
843 a);
844 }
845
846 // Give "*" processors a chance to match
847 if (unmatchedAnnotations.size() == 0)
848 unmatchedAnnotations.put("", null);
849
850 DiscoveredProcessors.ProcessorStateIterator psi = discoveredProcs.iterator();
851 // TODO: Create proper argument values; need past round
852 // information to fill in this constructor. Note that the 1
853 // st round of processing could be the last round if there
854 // were parse errors on the initial source files; however, we
855 // are not doing processing in that case.
856
857 Set<Element> rootElements = new LinkedHashSet<>();
858 rootElements.addAll(topLevelClasses);
859 rootElements.addAll(packageInfoFiles);
860 rootElements.addAll(moduleInfoFiles);
861 rootElements = Collections.unmodifiableSet(rootElements);
|