Interface InnerClassesAttribute
- All Superinterfaces:
AttributePREVIEW<InnerClassesAttributePREVIEW>,ClassElementPREVIEW,ClassFileElementPREVIEW
public sealed interface InnerClassesAttribute
extends AttributePREVIEW<InnerClassesAttributePREVIEW>, ClassElementPREVIEW
InnerClassesAttribute is a preview API of the Java platform.
Preview features may be removed in a future release, or upgraded to permanent features of the Java platform.
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 ClassElementPREVIEW when
traversing the elements of a ClassModelPREVIEW.
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:
- 22
-
Method Summary
Modifier and TypeMethodDescriptionclasses()Returns the inner classes used by this class.static InnerClassesAttributePREVIEWof(InnerClassInfoPREVIEW... innerClasses) Returns anInnerClassesattribute.static InnerClassesAttributePREVIEWof(List<InnerClassInfoPREVIEW> innerClasses) Returns anInnerClassesattribute.Methods declared in interface java.lang.classfile.AttributePREVIEW
attributeMapper, attributeName
-
Method Details
-
classes
List<InnerClassInfoPREVIEW> classes()Returns the inner classes used by this class.- Returns:
- the inner classes used by this class
-
of
Returns anInnerClassesattribute.- Parameters:
innerClasses- descriptions of the inner classes- Returns:
- an
InnerClassesattribute
-
of
Returns anInnerClassesattribute.- Parameters:
innerClasses- descriptions of the inner classes- Returns:
- an
InnerClassesattribute
-
InnerClassesAttributewhen preview features are enabled.