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

John Rose john.r.rose at
Mon Oct 26 03:54:12 UTC 2020

On Oct 24, 2020, at 3:32 PM, forax at wrote:
> the 'get' was removed because the method was not returning Class objects, now that permittedSubclasses behave like the other methods of java.lang.Class,
> the name should be changed back to "get..." to reflect that.

One reason (beyond good old consistency) to use the old
name with the old type:  If we ever upgrade the return types
from array to List<…>, we’ll want to use new method names.
Using more than one naming convention for these methods
reduces options for choosing a successor naming convention.

(Assuming we don’t have overload selection on return
types, which I view as a very tempting idea but one that
has yet to show a killer use case.)

More information about the amber-spec-experts mailing list