Class AnnotationsAttribute.Copier

    • Constructor Detail

      • Copier

        Copier​(byte[] info,
               ConstPool src,
               ConstPool dest,
               java.util.Map map)
        Constructs a copier. This copier renames some class names into the new names specified by map when it copies an annotation attribute.
        Parameters:
        info - the source attribute.
        src - the constant pool of the source class.
        dest - the constant pool of the destination class.
        map - pairs of replaced and substituted class names. It can be null.
      • Copier

        Copier​(byte[] info,
               ConstPool src,
               ConstPool dest,
               java.util.Map map,
               boolean makeWriter)
    • Method Detail

      • close

        byte[] close()
              throws java.io.IOException
        Throws:
        java.io.IOException
      • copy

        int copy​(int srcIndex)
        Copies a constant pool entry into the destination constant pool and returns the index of the copied entry.
        Parameters:
        srcIndex - the index of the copied entry into the source constant pool.
        Returns:
        the index of the copied item into the destination constant pool.
      • copyType

        int copyType​(int srcIndex)
        Copies a constant pool entry into the destination constant pool and returns the index of the copied entry. That entry must be a Utf8Info representing a class name in the L; form.
        Parameters:
        srcIndex - the index of the copied entry into the source constant pool.
        Returns:
        the index of the copied item into the destination constant pool.