Module java.base
Package java.lang.classfile.attribute

# Interface ModuleAttribute

≠
public abstract sealed interface ModuleAttribute
extends java.lang.classfile.Attribute<java.lang.classfile.attribute.ModuleAttribute>, java.lang.classfile.ClassElement
permits jdk.internal.classfile.impl.BoundAttribute.BoundModuleAttribute, jdk.internal.classfile.impl.UnboundAttribute.UnboundModuleAttribute
Comparing jdk-master and valhalla-csr-open

All Superinterfaces:
  `AttributePREVIEW <ModuleAttribute>, ClassElementPREVIEW , ClassFileElement`

public sealed interface ModuleAttribute extends AttributePREVIEW <ModuleAttribute>, ClassElementPREVIEW
Models the `Module` attribute (JVMS §4.7.25), which always appears on classes that represent module descriptors.

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 9, major version 53.

See Java Virtual Machine Specification:
  4.7.25 The `Module` Attribute
Since:
  24
See Also:
  - `Attributes.module()`
  - `ModuleDescriptor`

## Nested Types

- = ModuleAttributeBuilder

## Methods

- =
  public abstract java.util.List<java.lang.classfile.attribute.ModuleExportInfo> exports()
- =
  public default boolean has(java.lang.reflect.AccessFlag arg0)
- =
  public default java.util.Set<java.lang.reflect.AccessFlag> moduleFlags()
- =
  public abstract int moduleFlagsMask()
- =
  public abstract java.lang.classfile.constantpool.ModuleEntry moduleName()
- =
  public abstract java.util.Optional<java.lang.classfile.constantpool.Utf8Entry> moduleVersion()
- =
  public static java.lang.classfile.attribute.ModuleAttribute of(java.lang.classfile.constantpool.ModuleEntry arg0, int arg1, java.lang.classfile.constantpool.Utf8Entry arg2, java.util.Collection<java.lang.classfile.attribute.ModuleRequireInfo> arg3, java.util.Collection<java.lang.classfile.attribute.ModuleExportInfo> arg4, java.util.Collection<java.lang.classfile.attribute.ModuleOpenInfo> arg5, java.util.Collection<java.lang.classfile.constantpool.ClassEntry> arg6, java.util.Collection<java.lang.classfile.attribute.ModuleProvideInfo> arg7)
- =
  public static java.lang.classfile.attribute.ModuleAttribute of(java.lang.classfile.constantpool.ModuleEntry arg0, java.util.function.Consumer<java.lang.classfile.attribute.ModuleAttribute.ModuleAttributeBuilder> arg1)
- =
  public static java.lang.classfile.attribute.ModuleAttribute of(java.lang.constant.ModuleDesc arg0, java.util.function.Consumer<java.lang.classfile.attribute.ModuleAttribute.ModuleAttributeBuilder> arg1)
- =
  public abstract java.util.List<java.lang.classfile.attribute.ModuleOpenInfo> opens()
- =
  public abstract java.util.List<java.lang.classfile.attribute.ModuleProvideInfo> provides()
- =
  public abstract java.util.List<java.lang.classfile.attribute.ModuleRequireInfo> requires()
- =
  public abstract java.util.List<java.lang.classfile.constantpool.ClassEntry> uses()

## Summary

Differences
| Elements | Comments | Descriptions | Total
Added | Changed | Removed | Added | Changed | Removed | Added | Changed | Removed
--- | --- | --- | --- | --- | --- | --- | --- | ---
ModuleAttribute |  |  |  |  |  |  | 4 |  |  | 4
Total |  |  |  |  |  |  | 4 |  |  | 4