> On Oct 18, 2016, at 9:03 AM, Alan Bateman <[email protected]> wrote:
>
> On 18/10/2016 15:52, Andrew Guibert wrote:
>
>> :
>>
>> So my question is:
>> Is there a list of removed/internalized classes for java 9 anywhere? I
>> would like to use this list to grep my codebase for soft references.
>>
>>
> I don't think there is a list anywhere. Also it would be a moving target
> because there are classes added/removed/renamed in sun.** and jdk.** every
> week.
>
Exactly and so you will have to look at the latest build.
> One thing that might help is to get a list of the JDK-internal packages in
> your current build. Here's one way to create this:
>
> ModuleFinder.ofSystem()
> .findAll()
> .stream()
> .map(ModuleReference::descriptor)
> .map(md -> {
> Set<String> packages = new HashSet<>(md.packages());
> md.exports()
> .stream()
> .filter(e -> !e.isQualified())
> .map(Exports::source).forEach(pn -> packages.remove(pn));
> return packages;
> })
> .flatMap(Set::stream)
> .sorted()
> .forEach(System.out::println);
>
> Alternatively you can specify all modules to `java --list-modules` and filter
> out the unqualified exports.
>
I have a build tool that finds the list of JDK internal packages in an older
release:
http://hg.openjdk.java.net/jdk9/dev/langtools/file/tip/make/src/classes/build/tools/listjdkinternals/ListJDKInternals.java
Mandy