241 Assert.checkNull(discoveredProcs); |
241 Assert.checkNull(discoveredProcs); |
242 initProcessorIterator(processors); |
242 initProcessorIterator(processors); |
243 } |
243 } |
244 |
244 |
245 private Set<String> initPlatformAnnotations() { |
245 private Set<String> initPlatformAnnotations() { |
246 Set<String> platformAnnotations = new HashSet<>(); |
246 final String module_prefix = |
247 platformAnnotations.add("java.lang.Deprecated"); |
247 Feature.MODULES.allowedInSource(source) ? "java.base/" : ""; |
248 platformAnnotations.add("java.lang.Override"); |
248 return Set.of(module_prefix + "java.lang.Deprecated", |
249 platformAnnotations.add("java.lang.SuppressWarnings"); |
249 module_prefix + "java.lang.FunctionalInterface", |
250 platformAnnotations.add("java.lang.annotation.Documented"); |
250 module_prefix + "java.lang.Override", |
251 platformAnnotations.add("java.lang.annotation.Inherited"); |
251 module_prefix + "java.lang.SafeVarargs", |
252 platformAnnotations.add("java.lang.annotation.Retention"); |
252 module_prefix + "java.lang.SuppressWarnings", |
253 platformAnnotations.add("java.lang.annotation.Target"); |
253 |
254 return Collections.unmodifiableSet(platformAnnotations); |
254 module_prefix + "java.lang.annotation.Documented", |
|
255 module_prefix + "java.lang.annotation.Inherited", |
|
256 module_prefix + "java.lang.annotation.Native", |
|
257 module_prefix + "java.lang.annotation.Repeatable", |
|
258 module_prefix + "java.lang.annotation.Retention", |
|
259 module_prefix + "java.lang.annotation.Target"); |
255 } |
260 } |
256 |
261 |
257 private void initProcessorLoader() { |
262 private void initProcessorLoader() { |
258 try { |
263 try { |
259 if (fileManager.hasLocation(ANNOTATION_PROCESSOR_MODULE_PATH)) { |
264 if (fileManager.hasLocation(ANNOTATION_PROCESSOR_MODULE_PATH)) { |