mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8283416: Update java.lang.invoke.MethodHandle to use sealed classes
Reviewed-by: sundar, mchung
This commit is contained in:
parent
90750decb4
commit
f16244509d
6 changed files with 23 additions and 17 deletions
|
@ -448,7 +448,7 @@ abstract class MethodHandleImpl {
|
|||
return new AsVarargsCollector(target, arrayType);
|
||||
}
|
||||
|
||||
private static final class AsVarargsCollector extends DelegatingMethodHandle {
|
||||
static final class AsVarargsCollector extends DelegatingMethodHandle {
|
||||
private final MethodHandle target;
|
||||
private final Class<?> arrayType;
|
||||
private @Stable MethodHandle asCollectorCache;
|
||||
|
@ -705,7 +705,7 @@ abstract class MethodHandleImpl {
|
|||
* Behavior in counting and non-counting states is determined by lambda forms produced by
|
||||
* countingFormProducer & nonCountingFormProducer respectively.
|
||||
*/
|
||||
static class CountingWrapper extends DelegatingMethodHandle {
|
||||
static final class CountingWrapper extends DelegatingMethodHandle {
|
||||
private final MethodHandle target;
|
||||
private int count;
|
||||
private Function<MethodHandle, LambdaForm> countingFormProducer;
|
||||
|
@ -1299,7 +1299,7 @@ abstract class MethodHandleImpl {
|
|||
}
|
||||
|
||||
/** This subclass allows a wrapped method handle to be re-associated with an arbitrary member name. */
|
||||
private static final class WrappedMember extends DelegatingMethodHandle {
|
||||
static final class WrappedMember extends DelegatingMethodHandle {
|
||||
private final MethodHandle target;
|
||||
private final MemberName member;
|
||||
private final Class<?> callerClass;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue