-
CSR
-
Resolution: Approved
-
P3
-
None
-
source
-
low
-
Adding new methods to JavaFileManager can cause compatibility issues for subclasses may have a method with the same name and signature, conflicting with the newly added method. Given the names of the proposed methods, this appears to be very unlikely.
-
Java API
-
SE
Summary
JavaFileManager is enhanced with two new methods used to create new files on behalf of Filer.
Problem
Various methods in javax.annotation.processing.Filer, like createSourceFile, allow to specify the Elements from which the content of the file "originates". But these Elements are completely unused, are ignored in Filer, and the JavaFileManager that ultimately creates the files is not aware of them.
Solution
Two new methods (getJavaFileForOutputForOriginatingFiles and getFileForOutputForOriginatingFiles), accepting "originating files" are added to JavaFileManager, and the Filer implementation in javac will delegate to these methods, converting originating Elements to JavaFileObjects.
Specification
The specdiff is attached as specdiff.01.zip and is also available for convenience here: http://cr.openjdk.java.net/~jlahoda/8272234/specdiff.01/overview-summary.html
- csr of
-
JDK-8272234 Pass originating elements from Filer to JavaFileManager
-
- Resolved
-
- relates to
-
JDK-8224922 Access JavaFileObject from Element(s)
-
- Resolved
-
- links to
-
Review openjdk/jdk/5076