Interface LoadableDescriptorsAttribute

All Superinterfaces:
Attribute<LoadableDescriptorsAttributePREVIEW>, ClassElement, ClassFileElement

public sealed interface LoadableDescriptorsAttribute extends Attribute<LoadableDescriptorsAttributePREVIEW>, ClassElement
LoadableDescriptorsAttribute is a reflective 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 LoadableDescriptorsPREVIEW attribute (JVMS ยง4.7.32PREVIEW), which permits the JVM to load mentioned classes and interfaces before the class file carrying this attribute is loaded.

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 is a preview VM feature in the current Java SE release.

See Java Virtual Machine Specification:
4.7.32 The LoadableDescriptors AttributePREVIEW
Since:
28
See Also:
  • Method Details

    • loadableDescriptors

      List<Utf8Entry> loadableDescriptors()
      Returns the list of loadable descriptors.
      Returns:
      the list of loadable descriptors
    • loadableDescriptorSymbols

      default List<ClassDesc> loadableDescriptorSymbols()
      Returns the list of loadable descriptors, as nominal descriptors.
      Returns:
      the list of loadable descriptors, as nominal descriptors
    • of

      static LoadableDescriptorsAttributePREVIEW of(List<Utf8Entry> loadableDescriptors)
      Returns a LoadableDescriptors attribute.
      Parameters:
      loadableDescriptors - the loadable descriptors
      Returns:
      a LoadableDescriptors attribute
      Throws:
      IllegalArgumentException - if the number of loadable descriptors exceeds the limit of u2
    • of

      static LoadableDescriptorsAttributePREVIEW of(Utf8Entry... loadableDescriptors)
      Returns a LoadableDescriptors attribute.
      Parameters:
      loadableDescriptors - the loadable descriptors
      Returns:
      a LoadableDescriptors attribute
      Throws:
      IllegalArgumentException - if the number of loadable descriptors exceeds the limit of u2
    • ofSymbols

      static LoadableDescriptorsAttributePREVIEW ofSymbols(List<ClassDesc> loadableDescriptors)
      Returns a LoadableDescriptors attribute.
      Parameters:
      loadableDescriptors - the loadable descriptors
      Returns:
      a LoadableDescriptors attribute
      Throws:
      IllegalArgumentException - if the number of loadable descriptors exceeds the limit of u2
    • ofSymbols

      static LoadableDescriptorsAttributePREVIEW ofSymbols(ClassDesc... loadableDescriptors)
      Returns a LoadableDescriptors attribute.
      Parameters:
      loadableDescriptors - the loadable descriptors
      Returns:
      a LoadableDescriptors attribute
      Throws:
      IllegalArgumentException - if the number of loadable descriptors exceeds the limit of u2