Interface InnerClassesAttribute
- All Superinterfaces:
Attribute<InnerClassesAttribute>
,ClassElement
,ClassFileElement
public sealed interface InnerClassesAttribute
extends Attribute<InnerClassesAttribute>, ClassElement
Models the
InnerClasses
attribute (JVMS 4.7.6), which can
appear on classes, and records which classes referenced by this classfile
are inner classes. 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.
- Since:
- 24
-
Method Summary
Modifier and TypeMethodDescriptionclasses()
Returns the inner classes used by this class.static InnerClassesAttribute
of
(InnerClassInfo... innerClasses) Returns anInnerClasses
attribute.static InnerClassesAttribute
of
(List<InnerClassInfo> innerClasses) Returns anInnerClasses
attribute.Methods declared in interface java.lang.classfile.Attribute
attributeMapper, attributeName
-
Method Details
-
classes
List<InnerClassInfo> classes()Returns the inner classes used by this class.- Returns:
- the inner classes used by this class
-
of
Returns anInnerClasses
attribute.- Parameters:
innerClasses
- descriptions of the inner classes- Returns:
- an
InnerClasses
attribute
-
of
Returns anInnerClasses
attribute.- Parameters:
innerClasses
- descriptions of the inner classes- Returns:
- an
InnerClasses
attribute
-