APIdia Launch Partner
Top Description Methods
java.lang.classfile.attribute

public sealed Interface ModuleHashInfo

permits UnboundModuleHashInfo
Known Direct Implementers
jdk.internal.classfile.impl.UnboundAttribute.UnboundModuleHashInfo
Imports
java.lang.classfile.constantpool.ModuleEntry, java.lang.constant.ModuleDesc, jdk.internal.classfile.impl.TemporaryConstantPool, .UnboundAttribute

Models hash information for a single module in the ModuleHashesAttribute.
Since
24
See Also
ModuleHashesAttribute#hashes()

Method Summary

Modifier and TypeMethod and Description
public byte[]

Returns:

the hash of the related module
hash
()

Returns the hash of the related module.

public ModuleEntry

Returns:

the name of the related module
moduleName
()

Returns the name of the related module.

public static ModuleHashInfo

Returns:

a module hash description
of
(ModuleEntry
the module name
moduleName
,
byte[]
the hash value
hash
)

Returns a module hash description.

public static ModuleHashInfo

Returns:

a module hash description
of
(ModuleDesc
the module name
moduleDesc
,
byte[]
the hash value
hash
)

Returns a module hash description.

Method Detail

hashback to summary
public byte[] hash()

Returns the hash of the related module.

Returns:byte[]

the hash of the related module

moduleNameback to summary
public ModuleEntry moduleName()

Returns the name of the related module.

Returns:ModuleEntry

the name of the related module

ofback to summary
public static ModuleHashInfo of(ModuleEntry moduleName, byte[] hash)

Returns a module hash description.

Parameters
moduleName:ModuleEntry

the module name

hash:byte[]

the hash value

Returns:ModuleHashInfo

a module hash description

ofback to summary
public static ModuleHashInfo of(ModuleDesc moduleDesc, byte[] hash)

Returns a module hash description.

Parameters
moduleDesc:ModuleDesc

the module name

hash:byte[]

the hash value

Returns:ModuleHashInfo

a module hash description