class jdk.tools.jlink.internal.ImageStringsWriter implements jdk.internal.jimage.ImageStrings
  minor version: 0
  major version: 59
  flags: flags: (0x0020) ACC_SUPER
  this_class: jdk.tools.jlink.internal.ImageStringsWriter
  super_class: java.lang.Object
{
  private static final int NOT_FOUND;
    descriptor: I
    flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
    ConstantValue: -1

  static final int EMPTY_OFFSET;
    descriptor: I
    flags: (0x0018) ACC_STATIC, ACC_FINAL
    ConstantValue: 0

  private final java.util.HashMap<java.lang.String, java.lang.Integer> stringToOffsetMap;
    descriptor: Ljava/util/HashMap;
    flags: (0x0012) ACC_PRIVATE, ACC_FINAL
    Signature: Ljava/util/HashMap<Ljava/lang/String;Ljava/lang/Integer;>;

  private final jdk.internal.jimage.ImageStream stream;
    descriptor: Ljdk/internal/jimage/ImageStream;
    flags: (0x0012) ACC_PRIVATE, ACC_FINAL

  void <init>();
    descriptor: ()V
    flags: (0x0000) 
    Code:
      stack=3, locals=2, args_size=1
        start local 0 // jdk.tools.jlink.internal.ImageStringsWriter this
         0: .line 41
            aload 0 /* this */
            invokespecial java.lang.Object.<init>:()V
         1: .line 42
            aload 0 /* this */
            new java.util.HashMap
            dup
            invokespecial java.util.HashMap.<init>:()V
            putfield jdk.tools.jlink.internal.ImageStringsWriter.stringToOffsetMap:Ljava/util/HashMap;
         2: .line 43
            aload 0 /* this */
            new jdk.internal.jimage.ImageStream
            dup
            invokespecial jdk.internal.jimage.ImageStream.<init>:()V
            putfield jdk.tools.jlink.internal.ImageStringsWriter.stream:Ljdk/internal/jimage/ImageStream;
         3: .line 46
            aload 0 /* this */
            ldc ""
            invokevirtual jdk.tools.jlink.internal.ImageStringsWriter.addString:(Ljava/lang/String;)I
            istore 1 /* offset */
        start local 1 // int offset
         4: .line 47
            iload 1 /* offset */
            ifeq 6
         5: .line 48
            new java.lang.InternalError
            dup
            ldc "Empty string not offset zero"
            invokespecial java.lang.InternalError.<init>:(Ljava/lang/String;)V
            athrow
         6: .line 52
      StackMap locals: jdk.tools.jlink.internal.ImageStringsWriter int
      StackMap stack:
            aload 0 /* this */
            ldc "class"
            invokevirtual jdk.tools.jlink.internal.ImageStringsWriter.addString:(Ljava/lang/String;)I
            istore 1 /* offset */
         7: .line 53
            iload 1 /* offset */
            iconst_1
            if_icmpeq 9
         8: .line 54
            new java.lang.InternalError
            dup
            ldc "'class' string not offset one"
            invokespecial java.lang.InternalError.<init>:(Ljava/lang/String;)V
            athrow
         9: .line 56
      StackMap locals:
      StackMap stack:
            return
        end local 1 // int offset
        end local 0 // jdk.tools.jlink.internal.ImageStringsWriter this
      LocalVariableTable:
        Start  End  Slot    Name  Signature
            0   10     0    this  Ljdk/tools/jlink/internal/ImageStringsWriter;
            4   10     1  offset  I

  private int addString(java.lang.String);
    descriptor: (Ljava/lang/String;)I
    flags: (0x0002) ACC_PRIVATE
    Code:
      stack=4, locals=4, args_size=2
        start local 0 // jdk.tools.jlink.internal.ImageStringsWriter this
        start local 1 // java.lang.String string
         0: .line 59
            aload 0 /* this */
            getfield jdk.tools.jlink.internal.ImageStringsWriter.stream:Ljdk/internal/jimage/ImageStream;
            invokevirtual jdk.internal.jimage.ImageStream.getPosition:()I
            istore 2 /* offset */
        start local 2 // int offset
         1: .line 60
            aload 1 /* string */
            invokestatic jdk.internal.jimage.ImageStringsReader.mutf8FromString:(Ljava/lang/String;)[B
            astore 3 /* bytes */
        start local 3 // byte[] bytes
         2: .line 61
            aload 0 /* this */
            getfield jdk.tools.jlink.internal.ImageStringsWriter.stream:Ljdk/internal/jimage/ImageStream;
            aload 3 /* bytes */
            iconst_0
            aload 3 /* bytes */
            arraylength
            invokevirtual jdk.internal.jimage.ImageStream.put:([BII)Ljdk/internal/jimage/ImageStream;
            pop
         3: .line 62
            aload 0 /* this */
            getfield jdk.tools.jlink.internal.ImageStringsWriter.stream:Ljdk/internal/jimage/ImageStream;
            iconst_0
            invokevirtual jdk.internal.jimage.ImageStream.put:(I)Ljdk/internal/jimage/ImageStream;
            pop
         4: .line 63
            aload 0 /* this */
            getfield jdk.tools.jlink.internal.ImageStringsWriter.stringToOffsetMap:Ljava/util/HashMap;
            aload 1 /* string */
            iload 2 /* offset */
            invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
            invokevirtual java.util.HashMap.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
            pop
         5: .line 65
            iload 2 /* offset */
            ireturn
        end local 3 // byte[] bytes
        end local 2 // int offset
        end local 1 // java.lang.String string
        end local 0 // jdk.tools.jlink.internal.ImageStringsWriter this
      LocalVariableTable:
        Start  End  Slot    Name  Signature
            0    6     0    this  Ljdk/tools/jlink/internal/ImageStringsWriter;
            0    6     1  string  Ljava/lang/String;
            1    6     2  offset  I
            2    6     3   bytes  [B
    MethodParameters:
        Name  Flags
      string  final

  public int add(java.lang.String);
    descriptor: (Ljava/lang/String;)I
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=2, locals=3, args_size=2
        start local 0 // jdk.tools.jlink.internal.ImageStringsWriter this
        start local 1 // java.lang.String string
         0: .line 70
            aload 0 /* this */
            aload 1 /* string */
            invokevirtual jdk.tools.jlink.internal.ImageStringsWriter.find:(Ljava/lang/String;)I
            istore 2 /* offset */
        start local 2 // int offset
         1: .line 72
            iload 2 /* offset */
            iconst_m1
            if_icmpne 2
            aload 0 /* this */
            aload 1 /* string */
            invokevirtual jdk.tools.jlink.internal.ImageStringsWriter.addString:(Ljava/lang/String;)I
            goto 3
      StackMap locals: int
      StackMap stack:
         2: iload 2 /* offset */
      StackMap locals:
      StackMap stack: int
         3: ireturn
        end local 2 // int offset
        end local 1 // java.lang.String string
        end local 0 // jdk.tools.jlink.internal.ImageStringsWriter this
      LocalVariableTable:
        Start  End  Slot    Name  Signature
            0    4     0    this  Ljdk/tools/jlink/internal/ImageStringsWriter;
            0    4     1  string  Ljava/lang/String;
            1    4     2  offset  I
    MethodParameters:
        Name  Flags
      string  final

  int find(java.lang.String);
    descriptor: (Ljava/lang/String;)I
    flags: (0x0000) 
    Code:
      stack=2, locals=3, args_size=2
        start local 0 // jdk.tools.jlink.internal.ImageStringsWriter this
        start local 1 // java.lang.String string
         0: .line 76
            aload 0 /* this */
            getfield jdk.tools.jlink.internal.ImageStringsWriter.stringToOffsetMap:Ljava/util/HashMap;
            aload 1 /* string */
            invokevirtual java.util.HashMap.get:(Ljava/lang/Object;)Ljava/lang/Object;
            checkcast java.lang.Integer
            astore 2 /* offset */
        start local 2 // java.lang.Integer offset
         1: .line 78
            aload 2 /* offset */
            ifnull 2
            aload 2 /* offset */
            invokevirtual java.lang.Integer.intValue:()I
            goto 3
      StackMap locals: java.lang.Integer
      StackMap stack:
         2: iconst_m1
      StackMap locals:
      StackMap stack: int
         3: ireturn
        end local 2 // java.lang.Integer offset
        end local 1 // java.lang.String string
        end local 0 // jdk.tools.jlink.internal.ImageStringsWriter this
      LocalVariableTable:
        Start  End  Slot    Name  Signature
            0    4     0    this  Ljdk/tools/jlink/internal/ImageStringsWriter;
            0    4     1  string  Ljava/lang/String;
            1    4     2  offset  Ljava/lang/Integer;
    MethodParameters:
        Name  Flags
      string  final

  public java.lang.String get(int);
    descriptor: (I)Ljava/lang/String;
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=3, locals=8, args_size=2
        start local 0 // jdk.tools.jlink.internal.ImageStringsWriter this
        start local 1 // int offset
         0: .line 83
            aload 0 /* this */
            getfield jdk.tools.jlink.internal.ImageStringsWriter.stream:Ljdk/internal/jimage/ImageStream;
            invokevirtual jdk.internal.jimage.ImageStream.getBuffer:()Ljava/nio/ByteBuffer;
            astore 2 /* buffer */
        start local 2 // java.nio.ByteBuffer buffer
         1: .line 84
            aload 2 /* buffer */
            invokevirtual java.nio.ByteBuffer.capacity:()I
            istore 3 /* capacity */
        start local 3 // int capacity
         2: .line 85
            iload 1 /* offset */
            iflt 3
            iload 1 /* offset */
            iload 3 /* capacity */
            if_icmplt 4
         3: .line 86
      StackMap locals: java.nio.ByteBuffer int
      StackMap stack:
            new java.lang.InternalError
            dup
            ldc "String buffer offset out of range"
            invokespecial java.lang.InternalError.<init>:(Ljava/lang/String;)V
            athrow
         4: .line 88
      StackMap locals:
      StackMap stack:
            iconst_m1
            istore 4 /* zero */
        start local 4 // int zero
         5: .line 89
            iload 1 /* offset */
            istore 5 /* i */
        start local 5 // int i
         6: goto 11
         7: .line 90
      StackMap locals: int int
      StackMap stack:
            aload 2 /* buffer */
            iload 5 /* i */
            invokevirtual java.nio.ByteBuffer.get:(I)B
            ifne 10
         8: .line 91
            iload 5 /* i */
            istore 4 /* zero */
         9: .line 92
            goto 12
        10: .line 89
      StackMap locals:
      StackMap stack:
            iinc 5 /* i */ 1
      StackMap locals:
      StackMap stack:
        11: iload 5 /* i */
            iload 3 /* capacity */
            if_icmplt 7
        end local 5 // int i
        12: .line 95
      StackMap locals:
      StackMap stack:
            iload 4 /* zero */
            iconst_m1
            if_icmpne 14
        13: .line 96
            new java.lang.InternalError
            dup
            ldc "String zero terminator not found"
            invokespecial java.lang.InternalError.<init>:(Ljava/lang/String;)V
            athrow
        14: .line 98
      StackMap locals:
      StackMap stack:
            iload 4 /* zero */
            iload 1 /* offset */
            isub
            istore 5 /* length */
        start local 5 // int length
        15: .line 99
            iload 5 /* length */
            newarray 8
            astore 6 /* bytes */
        start local 6 // byte[] bytes
        16: .line 100
            aload 2 /* buffer */
            invokevirtual java.nio.ByteBuffer.position:()I
            istore 7 /* mark */
        start local 7 // int mark
        17: .line 101
            aload 2 /* buffer */
            iload 1 /* offset */
            invokevirtual java.nio.ByteBuffer.position:(I)Ljava/nio/ByteBuffer;
            pop
        18: .line 102
            aload 2 /* buffer */
            aload 6 /* bytes */
            invokevirtual java.nio.ByteBuffer.get:([B)Ljava/nio/ByteBuffer;
            pop
        19: .line 103
            aload 2 /* buffer */
            iload 7 /* mark */
            invokevirtual java.nio.ByteBuffer.position:(I)Ljava/nio/ByteBuffer;
            pop
        20: .line 105
            aload 6 /* bytes */
            invokestatic jdk.internal.jimage.ImageStringsReader.stringFromMUTF8:([B)Ljava/lang/String;
            areturn
        end local 7 // int mark
        end local 6 // byte[] bytes
        end local 5 // int length
        end local 4 // int zero
        end local 3 // int capacity
        end local 2 // java.nio.ByteBuffer buffer
        end local 1 // int offset
        end local 0 // jdk.tools.jlink.internal.ImageStringsWriter this
      LocalVariableTable:
        Start  End  Slot      Name  Signature
            0   21     0      this  Ljdk/tools/jlink/internal/ImageStringsWriter;
            0   21     1    offset  I
            1   21     2    buffer  Ljava/nio/ByteBuffer;
            2   21     3  capacity  I
            5   21     4      zero  I
            6   12     5         i  I
           15   21     5    length  I
           16   21     6     bytes  [B
           17   21     7      mark  I
    MethodParameters:
        Name  Flags
      offset  

  jdk.internal.jimage.ImageStream getStream();
    descriptor: ()Ljdk/internal/jimage/ImageStream;
    flags: (0x0000) 
    Code:
      stack=1, locals=1, args_size=1
        start local 0 // jdk.tools.jlink.internal.ImageStringsWriter this
         0: .line 109
            aload 0 /* this */
            getfield jdk.tools.jlink.internal.ImageStringsWriter.stream:Ljdk/internal/jimage/ImageStream;
            areturn
        end local 0 // jdk.tools.jlink.internal.ImageStringsWriter this
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    1     0  this  Ljdk/tools/jlink/internal/ImageStringsWriter;

  int getSize();
    descriptor: ()I
    flags: (0x0000) 
    Code:
      stack=1, locals=1, args_size=1
        start local 0 // jdk.tools.jlink.internal.ImageStringsWriter this
         0: .line 113
            aload 0 /* this */
            getfield jdk.tools.jlink.internal.ImageStringsWriter.stream:Ljdk/internal/jimage/ImageStream;
            invokevirtual jdk.internal.jimage.ImageStream.getSize:()I
            ireturn
        end local 0 // jdk.tools.jlink.internal.ImageStringsWriter this
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    1     0  this  Ljdk/tools/jlink/internal/ImageStringsWriter;

  int getCount();
    descriptor: ()I
    flags: (0x0000) 
    Code:
      stack=1, locals=1, args_size=1
        start local 0 // jdk.tools.jlink.internal.ImageStringsWriter this
         0: .line 117
            aload 0 /* this */
            getfield jdk.tools.jlink.internal.ImageStringsWriter.stringToOffsetMap:Ljava/util/HashMap;
            invokevirtual java.util.HashMap.size:()I
            ireturn
        end local 0 // jdk.tools.jlink.internal.ImageStringsWriter this
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    1     0  this  Ljdk/tools/jlink/internal/ImageStringsWriter;
}
SourceFile: "ImageStringsWriter.java"