Uses of Interface java.lang.classfile.attribute.ModuleAttribute (Java SE 26 & JDK 26)
Description: use: module: java.base, package: java.lang.classfile.attribute, interface: ModuleAttribute

# Uses of Interface
java.lang.classfile.attribute.ModuleAttribute

Packages that use ModuleAttribute
Package
Description
java.lang.classfile
Provides classfile parsing, generation, and transformation library.
java.lang.classfile.attribute
Provides interfaces describing `class` file attributes for the `java.lang.classfile` library.

- ## Uses of ModuleAttribute in java.lang.classfile

  Methods in java.lang.classfile that return types with arguments of type ModuleAttribute
  Modifier and Type
  Method
  Description
  `static AttributeMapper<ModuleAttribute>`
  Attributes.`module()`
  Returns the mapper for the `Module` attribute.
  Methods in java.lang.classfile with parameters of type ModuleAttribute
  Modifier and Type
  Method
  Description
  `default byte[]`
  ClassFile.`buildModule(ModuleAttribute moduleAttribute)`
  Builds a module descriptor into a byte array.
  `default byte[]`
  ClassFile.`buildModule(ModuleAttribute moduleAttribute, Consumer<? super ClassBuilder> handler)`
  Builds a module descriptor into a byte array.
  `default void`
  ClassFile.`buildModuleTo(Path path, ModuleAttribute moduleAttribute)`
  Builds a module descriptor into a file in a file system.
  `default void`
  ClassFile.`buildModuleTo(Path path, ModuleAttribute moduleAttribute, Consumer<? super ClassBuilder> handler)`
  Builds a module descriptor into a file in a file system.

- ## Uses of ModuleAttribute in java.lang.classfile.attribute

  Subinterfaces with type arguments of type ModuleAttribute in java.lang.classfile.attribute
  Modifier and Type
  Interface
  Description
  `interface`
  `ModuleAttribute`
  Models the `Module` attribute (JVMS 4.7.25), which always appears on classes that represent module descriptors.
  Methods in java.lang.classfile.attribute that return ModuleAttribute
  Modifier and Type
  Method
  Description
  `static ModuleAttribute`
  ModuleAttribute.`of(ModuleEntry moduleName, int moduleFlags, Utf8Entry moduleVersion, Collection<ModuleRequireInfo> requires, Collection<ModuleExportInfo> exports, Collection<ModuleOpenInfo> opens, Collection<ClassEntry> uses, Collection<ModuleProvideInfo> provides)`
  Returns a `Module` attribute.
  `static ModuleAttribute`
  ModuleAttribute.`of(ModuleEntry moduleName, Consumer<ModuleAttribute.ModuleAttributeBuilder> attrHandler)`
  Returns a `Module` attribute.
  `static ModuleAttribute`
  ModuleAttribute.`of(ModuleDesc moduleName, Consumer<ModuleAttribute.ModuleAttributeBuilder> attrHandler)`
  Returns a `Module` attribute.