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 Details

    • classes

      List<InnerClassInfo> classes()
      Returns the inner classes used by this class.
      Returns:
      the inner classes used by this class
    • of

      static InnerClassesAttribute of(List<InnerClassInfo> innerClasses)
      Returns an InnerClasses attribute.
      Parameters:
      innerClasses - descriptions of the inner classes
      Returns:
      an InnerClasses attribute
    • of

      static InnerClassesAttribute of(InnerClassInfo... innerClasses)
      Returns an InnerClasses attribute.
      Parameters:
      innerClasses - descriptions of the inner classes
      Returns:
      an InnerClasses attribute