[PROPOSAL][JDK10] Introduce Executable.getParameterType(index)
Christoph Dreis
christoph.dreis at freenet.de
Thu Nov 2 23:33:41 UTC 2017
Hi John,
>> I do like your proposal nonetheless as an additional improvement, but I think it won't achieve the allocation-free part I was aiming for. Correct me if I'm wrong, please.
> There are two ways it can directly achieve what you are after.
> First, if the guts of the jlr.Method can cache the List and return
> the same value every time. Then the legacy API point can use
> List::toArray to create the legacy array values.
> Second, if the guts of the jlr.Method choose to cache the Class[],
> it can still return a List wrapped around the same array, each time,
> as long as the List refuses modification.
Again - thank you for sharing your thoughts. I really like your first proposal of caching the parameter list. I am bit concerned though that this has a bigger impact on the overall footprint of Method/Executable objects. What are your thoughts on this?
Cheers,
Christoph
More information about the core-libs-dev
mailing list