Interface NestMembersAttribute
- All Superinterfaces:
Attribute<NestMembersAttribute>,ClassElement,ClassFileElement
Models the
NestMembers attribute (JVMS
4.7.29), which indicates that this class is the host of a nest
and the other nest members.
This attribute only appears on classes, and does not permit multiple instances in a class. It has a data dependency on the constant pool.
The attribute was introduced in the Java SE Platform version 11, major version 55.
- See Java Virtual Machine Specification:
-
4.7.29 The
NestMembersAttribute - Since:
- 24
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionReturns the classes belonging to the nest hosted by this class.static NestMembersAttributeof(ClassEntry... nestMembers) Returns aNestMembersattribute.static NestMembersAttributeof(List<ClassEntry> nestMembers) Returns aNestMembersattribute.static NestMembersAttributeReturns aNestMembersattribute.static NestMembersAttributeReturns aNestMembersattribute.Methods declared in interface java.lang.classfile.Attribute
attributeMapper, attributeName
-
Method Details
-
nestMembers
List<ClassEntry> nestMembers()Returns the classes belonging to the nest hosted by this class.- Returns:
- the classes belonging to the nest hosted by this class
- See Also:
-
of
Returns aNestMembersattribute.- Parameters:
nestMembers- the member classes of the nest- Returns:
- a
NestMembersattribute
-
of
Returns aNestMembersattribute.- Parameters:
nestMembers- the member classes of the nest- Returns:
- a
NestMembersattribute
-
ofSymbols
Returns aNestMembersattribute.- Parameters:
nestMembers- the member classes of the nest- Returns:
- a
NestMembersattribute - Throws:
IllegalArgumentException- if any ofnestMembersis primitive
-
ofSymbols
Returns aNestMembersattribute.- Parameters:
nestMembers- the member classes of the nest- Returns:
- a
NestMembersattribute - Throws:
IllegalArgumentException- if any ofnestMembersis primitive
-