getPermittedSubclasses() on j.l.rClass returning an array of ClassDesc

Dan Smith daniel.smith at
Mon May 11 22:56:06 UTC 2020

> On May 11, 2020, at 11:10 AM, Brian Goetz <brian.goetz at> wrote:
>> 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.

Language vs. VM is one axis, but it's not the one I'm talking about. The relevant axis here could be called reified vs. raw, or maybe linked vs. unlinked. Core reflection has a strong preference for producing fully-formed objects, rather than names and similar structures that can be "resolved" to fully-formed objects.

More information about the amber-spec-experts mailing list