PermittedSubclasses
attribute (JVMS 4.7.31), which indicates this class or interface
is sealed,
and which classes or interfaces may extend or implement this class or
interface.
This attribute only appears on classes, and does not permit multiple instances in a class. It has a data dependency on the constant pool.
The attribute was introduced in the Java SE Platform version 17, major version 61.
sealed, non-sealed, and final Classes, 9.1.1.4 sealed and non-sealed Interfaces
PermittedSubclasses Attribute
Attributes#permittedSubclasses(), Class#isSealed(), Class#getPermittedSubclasses()
| Modifier and Type | Method and Description |
|---|---|
| public static PermittedSubclassesAttribute | Returns: aPermittedSubclasses attributethe permitted subclasses or subinterfaces permittedSubclasses)Returns a |
| public static PermittedSubclassesAttribute | Returns: aPermittedSubclasses attributethe permitted subclasses or subinterfaces permittedSubclasses)Returns a |
| public static PermittedSubclassesAttribute | |
| public static PermittedSubclassesAttribute | |
| public List | Returns: the list of permitted subclasses or subinterfacesReturns the list of permitted subclasses or subinterfaces. |
| of | back to summary |
|---|---|
| public static PermittedSubclassesAttribute of(List<ClassEntry> permittedSubclasses) Returns a
| |
| of | back to summary |
|---|---|
| public static PermittedSubclassesAttribute of(ClassEntry... permittedSubclasses) Returns a
| |
| ofSymbols | back to summary |
|---|---|
| public static PermittedSubclassesAttribute ofSymbols(List<ClassDesc> permittedSubclasses) Returns a
| |
| ofSymbols | back to summary |
|---|---|
| public static PermittedSubclassesAttribute ofSymbols(ClassDesc... permittedSubclasses) Returns a
| |
| permittedSubclasses | back to summary |
|---|---|
| public List Returns the list of permitted subclasses or subinterfaces.
| |