Interface ModuleHashInfo


public sealed interface ModuleHashInfo
ModuleHashInfo is a preview API of the Java platform.
Programs can only use ModuleHashInfo when preview features are enabled.
Preview features may be removed in a future release, or upgraded to permanent features of the Java platform.
Models hash information for a single module in the ModuleHashesAttributePREVIEW.
Since:
22
  • Method Details

    • moduleName

      ModuleEntryPREVIEW moduleName()
      Returns the name of the related module.
      Returns:
      the name of the related module
    • hash

      byte[] hash()
      Returns the hash of the related module.
      Returns:
      the hash of the related module
    • of

      static ModuleHashInfoPREVIEW of(ModuleEntryPREVIEW moduleName, byte[] hash)
      Returns a module hash description.
      Parameters:
      moduleName - the module name
      hash - the hash value
      Returns:
      a module hash description
    • of

      static ModuleHashInfoPREVIEW of(ModuleDesc moduleDesc, byte[] hash)
      Returns a module hash description.
      Parameters:
      moduleDesc - the module name
      hash - the hash value
      Returns:
      a module hash description