Interface PermittedSubclassesAttribute
- All Superinterfaces:
Attribute<PermittedSubclassesAttribute>,ClassElement,ClassFileElement
public sealed interface PermittedSubclassesAttribute
extends Attribute<PermittedSubclassesAttribute>, ClassElement
Models the
PermittedSubclasses attribute (JVMS 4.7.31), which can
appear on classes to indicate which classes may extend this class.
Delivered as a ClassElement when
traversing the elements of a 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.
- Since:
- 24
-
Method Summary
Modifier and TypeMethodDescriptionstatic PermittedSubclassesAttributeof(ClassEntry... permittedSubclasses) Returns aPermittedSubclassesattribute.static PermittedSubclassesAttributeof(List<ClassEntry> permittedSubclasses) Returns aPermittedSubclassesattribute.static PermittedSubclassesAttributeReturns aPermittedSubclassesattribute.static PermittedSubclassesAttributeReturns aPermittedSubclassesattribute.Returns the list of permitted subclasses.Methods declared in interface java.lang.classfile.Attribute
attributeMapper, attributeName
-
Method Details
-
permittedSubclasses
List<ClassEntry> permittedSubclasses()Returns the list of permitted subclasses.- Returns:
- the list of permitted subclasses
-
of
Returns aPermittedSubclassesattribute.- Parameters:
permittedSubclasses- the permitted subclasses- Returns:
- a
PermittedSubclassesattribute
-
of
Returns aPermittedSubclassesattribute.- Parameters:
permittedSubclasses- the permitted subclasses- Returns:
- a
PermittedSubclassesattribute
-
ofSymbols
Returns aPermittedSubclassesattribute.- Parameters:
permittedSubclasses- the permitted subclasses- Returns:
- a
PermittedSubclassesattribute
-
ofSymbols
Returns aPermittedSubclassesattribute.- Parameters:
permittedSubclasses- the permitted subclasses- Returns:
- a
PermittedSubclassesattribute
-