mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8284871: Use covariant overrides for the resolveConstantDesc(Lookup) method in sub‑interfaces of java.lang.constant.ConstantDesc
Reviewed-by: mchung
This commit is contained in:
parent
cd7d53c88c
commit
e5ce7d9e43
15 changed files with 100 additions and 83 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2018, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -24,6 +24,7 @@
|
|||
*/
|
||||
package java.lang.constant;
|
||||
|
||||
import java.lang.invoke.MethodHandles;
|
||||
import java.lang.invoke.TypeDescriptor;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
|
@ -362,6 +363,9 @@ public sealed interface ClassDesc
|
|||
*/
|
||||
String descriptorString();
|
||||
|
||||
@Override
|
||||
Class<?> resolveConstantDesc(MethodHandles.Lookup lookup) throws ReflectiveOperationException;
|
||||
|
||||
/**
|
||||
* Compare the specified object with this descriptor for equality. Returns
|
||||
* {@code true} if and only if the specified object is also a
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue