package sophomore.classfile.attributes.annotation;

import java.io.IOException;
import java.io.RandomAccessFile;

/**
 *
 * @author inagaki
 */
public class TypePath {
	/**
	 * 
	 */
	int typePathKind;
	/**
	 * 
	 */
	int typeArgIndex;

	/**
	 * 
	 * @param raf
	 * @throws IOException 
	 */
	TypePath(RandomAccessFile raf) throws IOException {
		this.typePathKind = raf.readByte();
		this.typeArgIndex = raf.readByte();
	}

	/**
	 * 
	 * @return 
	 */
	public int getPathKind() {
		return typePathKind;
	}

	/**
	 * 
	 * @return 
	 */
	public int getArgIndex() {
		return typeArgIndex;
	}
}

@@ -176,24 +176,26 @@
 * %0A%09 */%0A%09int
+%5B%5D
  typePathKin
@@ -216,16 +216,18 @@
  */%0A%09int
+%5B%5D
  typeArg
@@ -348,25 +348,170 @@
 %7B%0A%09%09
-this.typePathKind
+int len = raf.readUnsignedByte();%0A%09%09this.typeArgIndex = new int%5Blen%5D;%0A%09%09this.typePathKind = new int%5Blen%5D;%0A%09%09for(int i = 0; i %3C len; i++) %7B%0A%09%09%09this.typePathKind%5Bi%5D
  = r
@@ -517,32 +517,33 @@
 raf.readByte();%0A
+%09
 %09%09this.typeArgIn
@@ -545,16 +545,19 @@
 ArgIndex
+%5Bi%5D
  = raf.r
@@ -567,16 +567,20 @@
 Byte();%0A
+%09%09%7D%0A
 %09%7D%0A%0A%09/**
@@ -610,24 +610,26 @@
 %0A%09public int
+%5B%5D
  getPathKind
@@ -699,16 +699,18 @@
 blic int
+%5B%5D
  getArgI

modify data type because that of the attribute's items is wrong