JDK 9 RFR of JDK-8172910: Use default methods as appropriate for language model visitors

joe darcy joe.darcy at oracle.com
Wed Jan 18 22:45:17 UTC 2017


Hello,

When visitModule as added to ElementVisitor (JDK-8142968), it was added 
as a normal abstract interface method. This approach was necessary in 
analogous cases back in Java SE 8 since the package in question is built 
under the previously JDK during the bootstrap process. For 9, better 
source compatibility would come from using a default method here.

Please review the webrev which implements this improvement:

     8172910: Use default methods as appropriate for language model visitors
     http://cr.openjdk.java.net/~darcy/8172910.1/

Likewise, several convenience methods in the visitor interfaces can be 
upgraded to default methods as a small convenience for those directly 
implementing the interfaces.

Thanks,

-Joe



More information about the compiler-dev mailing list