| Modifier and Type | Class and Description |
|---|---|
| public static class | ModuleHashes.
This is used by jdk.internal.module.SystemModules class generated at link time. |
| public static interface | ModuleHashes.
A supplier of a message digest. |
| Modifier and Type | Field and Description |
|---|---|
| private final String | |
| private final Map |
| Access | Constructor and Description |
|---|---|
| pack-priv | ModuleHashes(String
the algorithm used to create the hashes algorithm, Map<String, byte[]> the map of module name to hash value nameToHash)Creates a |
| Modifier and Type | Method and Description |
|---|---|
| public String | |
| private static byte[] | Returns: the hashthe module reader to access the module content reader, String the name of the message digest algorithm to use algorithm)Computes a hash from the names and content of a module. |
| pack-priv static byte[] | Returns: the hashsupplies the module reader to access the module content supplier, String the name of the message digest algorithm to use algorithm)Computes a hash from the names and content of a module. |
| public boolean | equals(Object obj)
Overrides java. Indicates whether some other object is "equal to" this one. |
| pack-priv static ModuleHashes | Returns: ModuleHashes that encapsulates the hashesthe set of modules mrefs, String the name of the message digest algorithm to use algorithm)Computes the hash from the names and content of a set of modules. |
| public int | |
| public Map | |
| public byte[] | |
| public Set | |
| public String |
| algorithm | back to summary |
|---|---|
| private final String algorithm | |
| nameToHash | back to summary |
|---|---|
| private final Map<String, byte[]> nameToHash | |
| ModuleHashes | back to summary |
|---|---|
| pack-priv ModuleHashes(String algorithm, Map<String, byte[]> nameToHash) Creates a | |
| algorithm | back to summary |
|---|---|
| public String algorithm() Returns the algorithm used to hash the modules ("SHA-256" for example). | |
| computeHash | back to summary |
|---|---|
| private static byte[] computeHash(ModuleReader reader, String algorithm) Computes a hash from the names and content of a module.
| |
| computeHash | back to summary |
|---|---|
| pack-priv static byte[] computeHash(Supplier<ModuleReader> supplier, String algorithm) Computes a hash from the names and content of a module.
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.
| |
| generate | back to summary |
|---|---|
| pack-priv static ModuleHashes generate(Set<ModuleReference> mrefs, String algorithm) Computes the hash from the names and content of a set of modules. Returns
a
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| hashes | back to summary |
|---|---|
| public Map Returns unmodifiable map of module name to hash | |
| hashFor | back to summary |
|---|---|
| public byte[] hashFor(String mn) Returns the hash for the given module name, | |
| names | back to summary |
|---|---|
| public Set Returns the set of module names for which hashes are recorded. | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non-
| |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final String | |
| pack-priv final Map |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public ModuleHashes | |
| public ModuleHashes. |
| algorithm | back to summary |
|---|---|
| pack-priv final String algorithm | |
| nameToHash | back to summary |
|---|---|
| pack-priv final Map<String, byte[]> nameToHash | |
| Builder | back to summary |
|---|---|
| pack-priv Builder(String algorithm, int initialCapacity) | |
| build | back to summary |
|---|---|
| public ModuleHashes build() Builds a | |
| hashForModule | back to summary |
|---|---|
| public ModuleHashes. Sets the module hash for the given module name | |
| generate | back to summary |
|---|---|
| public byte[] generate(String algorithm) | |