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 PermittedSubclassesAttribute
of
(ClassEntry... permittedSubclasses) Returns aPermittedSubclasses
attribute.static PermittedSubclassesAttribute
of
(List<ClassEntry> permittedSubclasses) Returns aPermittedSubclasses
attribute.static PermittedSubclassesAttribute
Returns aPermittedSubclasses
attribute.static PermittedSubclassesAttribute
Returns aPermittedSubclasses
attribute.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 aPermittedSubclasses
attribute.- Parameters:
permittedSubclasses
- the permitted subclasses- Returns:
- a
PermittedSubclasses
attribute
-
of
Returns aPermittedSubclasses
attribute.- Parameters:
permittedSubclasses
- the permitted subclasses- Returns:
- a
PermittedSubclasses
attribute
-
ofSymbols
Returns aPermittedSubclasses
attribute.- Parameters:
permittedSubclasses
- the permitted subclasses- Returns:
- a
PermittedSubclasses
attribute
-
ofSymbols
Returns aPermittedSubclasses
attribute.- Parameters:
permittedSubclasses
- the permitted subclasses- Returns:
- a
PermittedSubclasses
attribute
-