mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8265130: Make ConstantDesc class hierarchy sealed
Reviewed-by: mchung, jvernee, vromero
This commit is contained in:
parent
00c7aeee00
commit
379376f078
6 changed files with 25 additions and 38 deletions
|
@ -46,14 +46,11 @@ import static java.lang.invoke.MethodHandleInfo.REF_putStatic;
|
|||
* {@link MethodHandle}. A {@linkplain DirectMethodHandleDesc} corresponds to
|
||||
* a {@code Constant_MethodHandle_info} entry in the constant pool of a classfile.
|
||||
*
|
||||
* @apiNote In the future, if the Java language permits, {@linkplain DirectMethodHandleDesc}
|
||||
* may become a {@code sealed} interface, which would prohibit subclassing except
|
||||
* by explicitly permitted types. Non-platform classes should not implement
|
||||
* {@linkplain DirectMethodHandleDesc} directly.
|
||||
*
|
||||
* @since 12
|
||||
*/
|
||||
public interface DirectMethodHandleDesc extends MethodHandleDesc {
|
||||
public sealed interface DirectMethodHandleDesc
|
||||
extends MethodHandleDesc
|
||||
permits DirectMethodHandleDescImpl {
|
||||
/**
|
||||
* Kinds of method handles that can be described with {@linkplain DirectMethodHandleDesc}.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue