mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +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
|
@ -35,15 +35,12 @@ import static java.lang.constant.DirectMethodHandleDesc.Kind.CONSTRUCTOR;
|
|||
* A <a href="package-summary.html#nominal">nominal descriptor</a> for a
|
||||
* {@link MethodHandle} constant.
|
||||
*
|
||||
* @apiNote In the future, if the Java language permits, {@linkplain MethodHandleDesc}
|
||||
* may become a {@code sealed} interface, which would prohibit subclassing except
|
||||
* by explicitly permitted types. Non-platform classes should not implement
|
||||
* {@linkplain MethodHandleDesc} directly.
|
||||
*
|
||||
* @since 12
|
||||
*/
|
||||
public interface MethodHandleDesc
|
||||
extends ConstantDesc {
|
||||
public sealed interface MethodHandleDesc
|
||||
extends ConstantDesc
|
||||
permits AsTypeMethodHandleDesc,
|
||||
DirectMethodHandleDesc {
|
||||
|
||||
/**
|
||||
* Creates a {@linkplain MethodHandleDesc} corresponding to an invocation of a
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue