Preview
Second Preview of ClassFile API (JEP 466).
Programs can only use PermittedSubclassesAttribute
when preview features are enabled.
Preview features may be removed in a future release,
or upgraded to permanent features of the Java platform.
PermittedSubclasses
attribute 4.7.31, which can
appear on classes to indicate which classes may extend this class.
Delivered as a java.lang.classfile.ClassElement
when
traversing the elements of a java.lang.classfile.ClassModel
.
The attribute does not permit multiple instances in a given location. Subsequent occurrence of the attribute takes precedence during the attributed element build or transformation.
The attribute was introduced in the Java SE Platform version 17.
Modifier and Type | Method and Description |
---|---|
public static PermittedSubclassesAttribute | Returns: aPermittedSubclasses attributethe permitted subclasses permittedSubclasses)Returns a |
public static PermittedSubclassesAttribute | Returns: aPermittedSubclasses attributethe permitted subclasses permittedSubclasses)Returns a |
public static PermittedSubclassesAttribute | |
public static PermittedSubclassesAttribute | |
public List | Returns: the list of permitted subclassesReturns the list of permitted subclasses. |
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.
|