RFR: 8272234: Pass originating elements from Filer to JavaFileManager [v2]
Joe Darcy
darcy at openjdk.java.net
Tue Oct 19 05:01:54 UTC 2021
On Fri, 15 Oct 2021 22:05:06 GMT, Jonathan Gibbons <jjg at openjdk.org> wrote:
>> Jan Lahoda has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 16 commits:
>>
>> - Javadoc improvements.
>> - Merge branch 'master' into ap-keep-originating-elements
>> - Cleanup.
>> - Improving testing
>> - Updating @since
>> - Merge branch 'master' into ap-keep-originating-elements
>> - Another attempt to fix the test.
>> - More attempts to fix the test.
>> - Attempting to fix test.
>> - Adding @since
>> - ... and 6 more: https://git.openjdk.java.net/jdk/compare/4cb7124c...9396bbb4
>
> src/jdk.compiler/share/classes/com/sun/tools/javac/processing/JavacFiler.java line 549:
>
>> 547: })
>> 548: .filter(fo -> fo != null)
>> 549: .toArray(s -> new JavaFileObject[s]);
>
> @jddarcy this is an example of why it would be good to have an API method in the Language Model world to get the "source" from which an `Element` was obtained, where "source" means either a .class or a .java file ... in other words, the `Symbol.classfile` field accessed in this code.
Acknowledged; it would be preferable if this mapping could be done in the standardized API.
-------------
PR: https://git.openjdk.java.net/jdk/pull/5076
More information about the compiler-dev
mailing list