nestmates spec open issues

Remi Forax forax at
Wed Oct 25 15:33:32 UTC 2017

> De: "Karen Kinnear" <karen.kinnear at>
> À: "valhalla-spec-experts" <valhalla-spec-experts at>
> Envoyé: Mercredi 25 Octobre 2017 16:45:51
> Objet: nestmates spec open issues

> ...
> 2. Core reflection APIs [ |
> ]

> John Rose proposed:
> a) Class.getnestHost() - defaults to itself if there is a resolution error
> b) Class.getNestMembers() - returns full nest, fallback of self if any
> resolution errors including it lists a nestHost that
> does not list it.

> [editor notes:
> - full statically defined nest from classfile attribute? As distinct from full
> dynamically
> currently loaded nest - right?
> - looks like John is proposing resolving the names, not just returning strings,
> and skipping any resolution failures

I do not like swallowing exceptions, it always make things harder to debug, so counter proposition: 

Class<?> Class.getNestHost() 
if there is no attribute, return this, throw aTypeNotPresentException if either the NestHost can not be loaded or the NestHost doesn't list this as its member. 

Class<?>[] Class.getNestMembers() 
scrub all members that are either not found or or not valid (not the same NestHost) from the array and always add this to the array. 


> thanks,
> Karen


More information about the valhalla-spec-observers mailing list