# Uses of Interface
java.lang.constant.ModuleDesc

Packages that use ModuleDesc
Package
Description
java.lang.classfile.attribute
Provides interfaces describing `class` file attributes for the `java.lang.classfile` library.
java.lang.classfile.constantpool
Provides interfaces describing constant pool entries for the `java.lang.classfile` library.
java.lang.constant
Classes and interfaces to represent nominal descriptors for run-time entities such as classes or method handles, and classfile entities such as constant pool entries or `invokedynamic` call sites.

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

  Methods in java.lang.classfile.attribute with parameters of type ModuleDesc
  Modifier and Type
  Method
  Description
  `ModuleAttribute.ModuleAttributeBuilder`
  ModuleAttribute.ModuleAttributeBuilder.`exports(PackageDesc pkge, int exportsFlagsMask, ModuleDesc... exportsToModules)`
  Adds an exported package.
  `default ModuleAttribute.ModuleAttributeBuilder`
  ModuleAttribute.ModuleAttributeBuilder.`exports(PackageDesc pkge, Collection<AccessFlag> exportsFlags, ModuleDesc... exportsToModules)`
  Adds an exported package.
  `ModuleAttribute.ModuleAttributeBuilder`
  ModuleAttribute.ModuleAttributeBuilder.`moduleName(ModuleDesc moduleName)`
  Sets the module name.
  `static ModuleAttribute`
  ModuleAttribute.`of(ModuleDesc moduleName, Consumer<ModuleAttribute.ModuleAttributeBuilder> attrHandler)`
  Returns a `Module` attribute.
  `static ModuleExportInfo`
  ModuleExportInfo.`of(PackageDesc exports, int exportFlags, ModuleDesc... exportsTo)`
  Returns a module export description.
  `static ModuleExportInfo`
  ModuleExportInfo.`of(PackageDesc exports, Collection<AccessFlag> exportFlags, ModuleDesc... exportsTo)`
  Returns a module export description.
  `static ModuleHashInfo`
  ModuleHashInfo.`of(ModuleDesc moduleDesc, byte[] hash)`
  Returns a module hash description.
  `static ModuleOpenInfo`
  ModuleOpenInfo.`of(PackageDesc opens, int opensFlags, ModuleDesc... opensTo)`
  Returns a module open description.
  `static ModuleOpenInfo`
  ModuleOpenInfo.`of(PackageDesc opens, Collection<AccessFlag> opensFlags, ModuleDesc... opensTo)`
  Returns a module open description.
  `static ModuleRequireInfo`
  ModuleRequireInfo.`of(ModuleDesc requires, int requiresFlags, String requiresVersion)`
  Returns a module requirement description.
  `static ModuleRequireInfo`
  ModuleRequireInfo.`of(ModuleDesc requires, Collection<AccessFlag> requiresFlags, String requiresVersion)`
  Returns a module requirement description.
  `ModuleAttribute.ModuleAttributeBuilder`
  ModuleAttribute.ModuleAttributeBuilder.`opens(PackageDesc pkge, int opensFlagsMask, ModuleDesc... opensToModules)`
  Opens a package.
  `default ModuleAttribute.ModuleAttributeBuilder`
  ModuleAttribute.ModuleAttributeBuilder.`opens(PackageDesc pkge, Collection<AccessFlag> opensFlags, ModuleDesc... opensToModules)`
  Opens a package.
  `ModuleAttribute.ModuleAttributeBuilder`
  ModuleAttribute.ModuleAttributeBuilder.`requires(ModuleDesc module, int requiresFlagsMask, String version)`
  Adds a module requirement.
  `default ModuleAttribute.ModuleAttributeBuilder`
  ModuleAttribute.ModuleAttributeBuilder.`requires(ModuleDesc module, Collection<AccessFlag> requiresFlags, String version)`
  Adds a module requirement.
  Method parameters in java.lang.classfile.attribute with type arguments of type ModuleDesc
  Modifier and Type
  Method
  Description
  `static ModuleExportInfo`
  ModuleExportInfo.`of(PackageDesc exports, int exportFlags, List<ModuleDesc> exportsTo)`
  Returns a module export description.
  `static ModuleExportInfo`
  ModuleExportInfo.`of(PackageDesc exports, Collection<AccessFlag> exportFlags, List<ModuleDesc> exportsTo)`
  Returns a module export description.
  `static ModuleOpenInfo`
  ModuleOpenInfo.`of(PackageDesc opens, int opensFlags, List<ModuleDesc> opensTo)`
  Returns a module open description.
  `static ModuleOpenInfo`
  ModuleOpenInfo.`of(PackageDesc opens, Collection<AccessFlag> opensFlags, List<ModuleDesc> opensTo)`
  Returns a module open description.

- ## Uses of ModuleDesc in java.lang.classfile.constantpool

  Methods in java.lang.classfile.constantpool that return ModuleDesc
  Modifier and Type
  Method
  Description
  `ModuleDesc`
  ModuleEntry.`asSymbol()`
  Returns a symbolic descriptor for the module name.
  Methods in java.lang.classfile.constantpool with parameters of type ModuleDesc
  Modifier and Type
  Method
  Description
  `boolean`
  ModuleEntry.`matches(ModuleDesc desc)`
  Returns whether this entry describes the given module.
  `default ModuleEntry`
  ConstantPoolBuilder.`moduleEntry(ModuleDesc moduleDesc)`
  Returns a `ModuleEntry` describing the same module as the provided `ModuleDesc`.

- ## Uses of ModuleDesc in java.lang.constant

  Methods in java.lang.constant that return ModuleDesc
  Modifier and Type
  Method
  Description
  `static ModuleDesc`
  ModuleDesc.`of(String name)`
  Returns a `ModuleDesc` for a module, given the name of the module.