RFR: 8254354: Add an asExact() VarHandle combinator [v2]
Jorn Vernee
jvernee at openjdk.java.net
Thu Oct 29 18:14:06 UTC 2020
On Tue, 27 Oct 2020 15:01:31 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:
>> I've updated the implementation of accessModeType to work with the ordinal directly. Note that it was using the AccessType ordinal though, so I also had to change the parameter type of accessModeTypeUncached, and the respective implementations, to use AccessType directly (luckily this was possible, since the current implementations all just used the AccessType).
>
> I think `asInvoker` and `asExactInvoker` make sense if you think of a VarHandle as an invoker of MethodHandles (though this is more of an implementation detail). But, I feel like the name `asInvoker` isn't obvious enough for what it does. i.e. it's not that obvious from the name that this removes the exactness.
>
> If `asGeneric` is problematic, maybe just `asNonExact` works?
I've uploaded another revision that has the suggested javadoc changes, courtesy of Paul. We also decided to rename asExact() and asGeneric() to withInvokeExactBehaviour() and withInvokeBehaviour() (with links to the relevant javadoc sections).
-------------
PR: https://git.openjdk.java.net/jdk/pull/843
More information about the core-libs-dev
mailing list