简体   繁体   中英

Java 9: How to find every new method added

With the release of Java 9, numerous methods have been added to many classes, most (if not all) of which contain the following in their documentation:

Since: 9

Is there an easy way to find any new methods added in an arbitrary class without having to scour through its documentation?

Example : ByteBuffer.alignedSlice

You're probably looking for something like jdkapidiff which uses japicmp to generate reports similar to one hosted here by the author - jdk8-jdk9-api-diff.

You can clone the project and execute mvn clean install to get the similar report on your local.

Provide a file ~.m2/toolchains.xml like this:

 <?xml version="1.0" encoding="UTF8"?> <toolchains> <toolchain> <type>jdk</type> <provides> <version>1.8</version> <vendor>oracle</vendor> </provides> <configuration> <jdkHome>/path/to/jdk-1.8</jdkHome> </configuration> </toolchain> <toolchain> <type>jdk</type> <provides> <version>9</version> <vendor>oracle</vendor> </provides> <configuration> <jdkHome>/path/to/jdk-9</jdkHome> </configuration> </toolchain> </toolchains> 

There are many changes to existing classes and members, in addition to new @since 9 classes and members. The final release of JSR 379 include an annex with the complete set of diffs. The draft is online here: http://cr.openjdk.java.net/~iris/se/9/java-se-9-fr-spec-01/apidiffs/overview-summary.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM