mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +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
|
@ -49,18 +49,15 @@ import static java.util.stream.Collectors.joining;
|
|||
* {@linkplain ClassDesc} for the component type and then call the {@link #arrayType()}
|
||||
* or {@link #arrayType(int)} methods.
|
||||
*
|
||||
* @apiNote In the future, if the Java language permits, {@linkplain ClassDesc}
|
||||
* may become a {@code sealed} interface, which would prohibit subclassing except
|
||||
* by explicitly permitted types. Non-platform classes should not implement
|
||||
* {@linkplain ClassDesc} directly.
|
||||
*
|
||||
* @see ConstantDescs
|
||||
*
|
||||
* @since 12
|
||||
*/
|
||||
public interface ClassDesc
|
||||
public sealed interface ClassDesc
|
||||
extends ConstantDesc,
|
||||
TypeDescriptor.OfField<ClassDesc> {
|
||||
TypeDescriptor.OfField<ClassDesc>
|
||||
permits PrimitiveClassDescImpl,
|
||||
ReferenceClassDescImpl {
|
||||
|
||||
/**
|
||||
* Returns a {@linkplain ClassDesc} for a class or interface type,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue