Package Summary Overview Summary

Module java.base
Package java.lang.classfile.constantpoolPREVIEW

# Interface ModuleEntry

All Superinterfaces:
  `ClassFileElementPREVIEW`, `PoolEntryPREVIEW`, `WritableElementPREVIEW<PoolEntryPREVIEW>`

public sealed interface ModuleEntry extends PoolEntryPREVIEW
`ModuleEntry` is a preview API of the Java platform.
Programs can only use `ModuleEntry` when preview features are enabled.
Preview features may be removed in a future release, or upgraded to permanent features of the Java platform.
Models a `CONSTANT_Module_info` constant in the constant pool of a classfile.

See Java Virtual Machine Specification :
  4.4.11 The CONSTANT_Module_info Structure
Since:
  22

- ## Method Summary

  Modifier and Type
  Method
  Description
  `ModuleDesc`
  `asSymbol()`
  Returns a symbolic descriptor for the module.
  `Utf8EntryPREVIEW`
  `name()`
  Returns the name of the module.

  ### Methods declared in interface java.lang.classfile.constantpool.PoolEntryPREVIEW

  `constantPool, index, tag, width`

  ### Methods declared in interface java.lang.classfile.WritableElementPREVIEW

  `writeTo`

- ## Method Details

  - ### name

    Utf8EntryPREVIEW name()
    Returns the name of the module.
    Returns:
      the name of the module

  - ### asSymbol

    ModuleDesc asSymbol()
    Returns a symbolic descriptor for the module.
    Returns:
      a symbolic descriptor for the module