Class ModuleHashesAttribute

java.lang.Object
org.objectweb.asm.Attribute
org.objectweb.asm.commons.ModuleHashesAttribute

public final class ModuleHashesAttribute extends org.objectweb.asm.Attribute
A ModuleHashes attribute. This attribute is specific to the OpenJDK and may change in the future.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    The name of the hashing algorithm.
    List<byte[]>
    The hash of the modules in modules.
    A list of module names.

    Fields inherited from class org.objectweb.asm.Attribute

    type
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructs an empty ModuleHashesAttribute.
    ModuleHashesAttribute(String algorithm, List<String> modules, List<byte[]> hashes)
    Constructs a new ModuleHashesAttribute.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected org.objectweb.asm.Attribute
    read(org.objectweb.asm.ClassReader classReader, int offset, int length, char[] charBuffer, int codeAttributeOffset, org.objectweb.asm.Label[] labels)
     
    protected org.objectweb.asm.ByteVector
    write(org.objectweb.asm.ClassWriter classWriter, byte[] code, int codeLength, int maxStack, int maxLocals)
     

    Methods inherited from class org.objectweb.asm.Attribute

    getLabels, isCodeAttribute, isUnknown, read, readLabel, write

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • algorithm

      public String algorithm
      The name of the hashing algorithm.
    • modules

      public List<String> modules
      A list of module names.
    • hashes

      public List<byte[]> hashes
      The hash of the modules in modules. The two lists must have the same size.
  • Constructor Details

    • ModuleHashesAttribute

      public ModuleHashesAttribute(String algorithm, List<String> modules, List<byte[]> hashes)
      Constructs a new ModuleHashesAttribute.
      Parameters:
      algorithm - the name of the hashing algorithm.
      modules - a list of module names.
      hashes - the hash of the modules in 'modules'. The two lists must have the same size.
    • ModuleHashesAttribute

      public ModuleHashesAttribute()
      Constructs an empty ModuleHashesAttribute. This object can be passed as a prototype to the ClassReader.accept(org.objectweb.asm.ClassVisitor, Attribute[], int) method.
  • Method Details

    • read

      protected org.objectweb.asm.Attribute read(org.objectweb.asm.ClassReader classReader, int offset, int length, char[] charBuffer, int codeAttributeOffset, org.objectweb.asm.Label[] labels)
      Overrides:
      read in class org.objectweb.asm.Attribute
    • write

      protected org.objectweb.asm.ByteVector write(org.objectweb.asm.ClassWriter classWriter, byte[] code, int codeLength, int maxStack, int maxLocals)
      Overrides:
      write in class org.objectweb.asm.Attribute