getPermittedSubclasses() on j.l.rClass returning an array of ClassDesc
Brian Goetz
brian.goetz at oracle.com
Mon May 11 17:10:10 UTC 2020
> The core reflection API has historically been happy to ignore those corner cases. Instead, it's designed for the typical situation where everything is consistent and available. You're somewhat uncomfortable with this design choice, which is fair, but maybe a better long-term path to getting to a less brittle API is to design a new, lower-level API, rather than trying to slowly introduce a new way of doing things into java.lang.Class.
Maybe. Right now, reflection is _mostly_ classfile reflection, but with
a few weird conveniences sprinkled atop (i.e., getMethods() returns all
public methods, inherited or not), which are just enough to make people
think that reflection is just a bad implementation of language-level
reflection. I would rather pull core reflection _down_ to its true
spirit (classfile contents), and then separately build more conveniences
_on top_.
More information about the amber-spec-observers
mailing list