/** * Returns <code>local_variable_table[i].length</code>. * This represents the length of the code region in which the local * variable is effective. * * @param i the i-th entry. */ public int codeLength(int i) { return ByteArray.readU16bit(info, i * 10 + 4); }
/** * Returns <code>line_number_table[i].line_number</code>. * This represents the corresponding line number in the original * source file. * * @param i the i-th entry. */ public int lineNumber(int i) { return ByteArray.readU16bit(info, i * 4 + 4); }
/** * Returns <code>local_variable_table[i].index</code>. * This represents the index of the local variable. * * @param i the i-th entry. */ public int index(int i) { return ByteArray.readU16bit(info, i * 10 + 10); }
/** * Returns the value of <code>local_variable_table[i].name_index</code>. * This represents the name of the local variable. * * @param i the i-th entry. */ public int nameIndex(int i) { return ByteArray.readU16bit(info, i * 10 + 6); }
/** * Returns <code>line_number_table_length</code>. * This represents the number of entries in the table. */ public int tableLength() { return ByteArray.readU16bit(info, 0); }
/** * Returns <code>line_number_table[i].start_pc</code>. * This represents the index into the code array at which the code * for a new line in the original source file begins. * * @param i the i-th entry. */ public int startPc(int i) { return ByteArray.readU16bit(info, i * 4 + 2); }
int localvarTarget(int pos, int targetType, int tableLength) throws Exception { for (int i = 0; i < tableLength; i++) { int start = ByteArray.readU16bit(info, pos); int length = ByteArray.readU16bit(info, pos + 2); int index = ByteArray.readU16bit(info, pos + 4); localvarTarget(pos, targetType, start, length, index); pos += 6; } return pos; }
final int annotation(int pos) throws Exception { int type = ByteArray.readU16bit(info, pos); int numPairs = ByteArray.readU16bit(info, pos + 2); return annotation(pos + 4, type, numPairs); }
/** * Returns the value of <code>class_index</code>. */ public int classIndex() { return ByteArray.readU16bit(get(), 0); }
/** * Returns the value of <code>method_index</code>. */ public int methodIndex() { return ByteArray.readU16bit(get(), 2); }
/** * {@code element_value_paris} */ final int memberValuePair(int pos) throws Exception { int nameIndex = ByteArray.readU16bit(info, pos); return memberValuePair(pos + 2, nameIndex); }
/** * Returns <code>classes[nth].inner_class_info_index</code>. */ public int innerClassIndex(int nth) { return ByteArray.readU16bit(get(), nth * 8 + 2); }
private int verifyTypeInfo(int pos, int n, int[] tags, int[] data) { for (int i = 0; i < n; i++) { int tag = info[pos++] & 0xff; tags[i] = tag; if (tag == OBJECT || tag == UNINIT) { data[i] = ByteArray.readU16bit(info, pos); objectOrUninitialized(tag, data[i], pos); pos += 2; } } return pos; }
/** * Returns <code>classes[nth].inner_name_index</code>. */ public int innerNameIndex(int nth) { return ByteArray.readU16bit(get(), nth * 8 + 6); }
private int doMultiANewArray(int pos, byte[] code) { int i = ByteArray.readU16bit(code, pos + 1); int dim = code[pos + 3] & 0xff; stackTop -= dim - 1; String type = cpool.getClassInfo(i).replace('.', '/'); stackTypes[stackTop - 1] = new TypeData.ClassName(type); return 4; }
public void visit() { int num = ByteArray.readU16bit(info, 0); ByteArray.write16bit(num, dest, 0); super.visit(); }
public void visit() { int num = ByteArray.readU16bit(info, 0); writer.write16bit(num); super.visit(); }
private int doGetField(int pos, byte[] code, boolean notStatic) throws BadBytecode { int index = ByteArray.readU16bit(code, pos + 1); setFieldTarget(notStatic, index); String desc = cpool.getFieldrefType(index); pushMemberType(desc); return 3; }
/** * Returns the generic signature indicated by <code>signature_index</code>. * * @see #toClassSignature(String) * @see #toMethodSignature(String) * @see #toFieldSignature(String) */ public String getSignature() { return getConstPool().getUtf8Info(ByteArray.readU16bit(get(), 0)); }
private int doPutField(int pos, byte[] code, boolean notStatic) throws BadBytecode { int index = ByteArray.readU16bit(code, pos + 1); String desc = cpool.getFieldrefType(index); stackTop -= Descriptor.dataSize(desc); char c = desc.charAt(0); if (c == 'L') stackTypes[stackTop].setType(getFieldClassName(desc, 0), classPool); else if (c == '[') stackTypes[stackTop].setType(desc, classPool); setFieldTarget(notStatic, index); return 3; }