RFR: implementation for JEP 334: JVM Constants API

jbvernee jbvernee at xs4all.nl
Wed May 23 19:10:46 UTC 2018


(I hope this email comes out alright, since I'm using raw text 

There seems to be an error in the generated javadoc.
If you go to the javadoc of, for instance, `ConstantClassDesc` [1]
you'll see that it lists `Constable<Class<?>>` as one of the implemented 
Looking at the source code, this seems to be pulled down from the 
`ClassDesc` interface [2],
which does extend `Constable`. The problem is, it does not extends 
but `Constable<ConstantDesc<Class<?>>>`, so this `Constable<Class<?>>` 
super interface of
`ConstantClassDesc` seems to be an error and it should list 
`Constable<ConstantDesc<Class<?>>` instead.

A similar problem exists with the javadoc for this 
`ConstantMethodHandleDesc` and `ConstantMethodTypeDesc` classes.
(Reading this for the first time confused me for quite a while, 

Some other nitty remarks/questions are:
- Why is the package name `java.lang.invoke.constant` and not 
   The constants API is not just an extension/sub-component of the 
`invoke` API, is it?
- Shouldn't the abbreviation `Desc`, by changed to the full name 
   Using full names seems more proper + abbreviations can be ambiguous.

Jorn Vernee


More information about the amber-dev mailing list