stronger deprecation

John Rose john.r.rose at
Fri Dec 20 19:00:03 UTC 2019

(Splitting out a mini-topic.)

On Dec 20, 2019, at 7:59 AM, Brian Goetz <brian.goetz at> wrote:
> … the terminally confusing getInteger(String).  Maybe some further deprecation of static inheritance is warranted here

The translation strategy and JVM have a mechanism for totally
submerging such methods, so that they are no longer visible to
the source code; it’s ACC_SYNTHETIC.  A synthetic method
occupies a descriptor and is linkable and reflectable but cannot
be used from source code.

There is no syntax for defining such things in source code;
the compiler back end spits them out into class files.  But if
these noxious methods were to be deprecated to the point
of unusability *in source code*, yet still needed to be present
as linkage points for old classfiles, we could create a marking,
and a user model, for keeping them around.

We could define a modifier with the appropriate properties
and slap it on offenders like getInteger.

Here’s a PoC design FTR:

(Something like this might also be appropriate for non-deprecated
“back doors” like deserialization API points.)

— John

More information about the valhalla-spec-observers mailing list