public int processFields(List<FieldNode> fields) throws DecodeException { int count = Leb128.readUnsignedLeb128(in); for (int i = 0; i < count; i++) { Object value = parseValue(); if (i < fields.size()) { fields.get(i).addAttr(FieldInitAttr.constValue(value)); } } return count; } }
int count = Leb128.readUnsignedLeb128(in); List<Object> values = new ArrayList<>(count); for (int i = 0; i < count; i++) {
/** * Reads a string index. String indicies are offset by 1, and a 0 value * in the stream (-1 as returned by this method) means "null" * * @return index into file's string ids table, -1 means null * @throws IOException */ private int readStringIndex(ByteInput bs) throws IOException { int offsetIndex = Leb128.readUnsignedLeb128(bs); return offsetIndex - 1; }
/** * Reads a string index. String indicies are offset by 1, and a 0 value * in the stream (-1 as returned by this method) means "null" * * @return index into file's string ids table, -1 means null * @throws IOException */ private int readStringIndex(ByteInput bs) throws IOException { int offsetIndex = Leb128.readUnsignedLeb128(bs); return offsetIndex - 1; }
/** * Reads a string index. String indicies are offset by 1, and a 0 value * in the stream (-1 as returned by this method) means "null" * * @return index into file's string ids table, -1 means null * @throws IOException */ private int readStringIndex(ByteInput bs) throws IOException { int offsetIndex = Leb128.readUnsignedLeb128(bs); return offsetIndex - 1; }
/** * Reads a string index. String indicies are offset by 1, and a 0 value * in the stream (-1 as returned by this method) means "null" * * @return index into file's string ids table, -1 means null * @throws IOException */ private int readStringIndex(ByteInput bs) throws IOException { int offsetIndex = Leb128.readUnsignedLeb128(bs); return offsetIndex - 1; }
public int readUleb128() { return Leb128.readUnsignedLeb128(this); }
public int readUleb128p1() { return Leb128.readUnsignedLeb128(this) - 1; }
public int readAnnotationName() { return Leb128.readUnsignedLeb128(in); }
public int readAnnotationName() { return Leb128.readUnsignedLeb128(in); }
public int readAnnotationName() { return Leb128.readUnsignedLeb128(in); }
public int readUleb128p1() { return Leb128.readUnsignedLeb128(this) - 1; }
public int readUleb128() { return Leb128.readUnsignedLeb128(this); }
public int readUleb128() { return Leb128.readUnsignedLeb128(this); }
/** * Begins reading the fields of an annotation, returning the number of * fields. The caller must follow up by making alternating calls to {@link * #readAnnotationName()} and another read method. For example, this reads * an annotation whose fields are all bytes: <pre> {@code * int fieldCount = readAnnotation(); * int annotationType = getAnnotationType(); * for (int i = 0; i < fieldCount; i++) { * readAnnotationName(); * readByte(); * } * }</pre> */ public int readAnnotation() { checkType(ENCODED_ANNOTATION); type = MUST_READ; annotationType = Leb128.readUnsignedLeb128(in); return Leb128.readUnsignedLeb128(in); }
/** * Begins reading the fields of an annotation, returning the number of * fields. The caller must follow up by making alternating calls to {@link * #readAnnotationName()} and another read method. For example, this reads * an annotation whose fields are all bytes: <pre> {@code * int fieldCount = readAnnotation(); * int annotationType = getAnnotationType(); * for (int i = 0; i < fieldCount; i++) { * readAnnotationName(); * readByte(); * } * }</pre> */ public int readAnnotation() { checkType(ENCODED_ANNOTATION); type = MUST_READ; annotationType = Leb128.readUnsignedLeb128(in); return Leb128.readUnsignedLeb128(in); }
/** * Begins reading the fields of an annotation, returning the number of * fields. The caller must follow up by making alternating calls to {@link * #readAnnotationName()} and another read method. For example, this reads * an annotation whose fields are all bytes: <pre> {@code * int fieldCount = readAnnotation(); * int annotationType = getAnnotationType(); * for (int i = 0; i < fieldCount; i++) { * readAnnotationName(); * readByte(); * } * }</pre> */ public int readAnnotation() { checkType(ENCODED_ANNOTATION); type = MUST_READ; annotationType = Leb128.readUnsignedLeb128(in); return Leb128.readUnsignedLeb128(in); }
/** * Begins reading the elements of an array, returning the array's size. The * caller must follow up by calling a read method for each element in the * array. For example, this reads a byte array: <pre> {@code * int arraySize = readArray(); * for (int i = 0, i < arraySize; i++) { * readByte(); * } * }</pre> */ public int readArray() { checkType(ENCODED_ARRAY); type = MUST_READ; return Leb128.readUnsignedLeb128(in); }
/** * Begins reading the elements of an array, returning the array's size. The * caller must follow up by calling a read method for each element in the * array. For example, this reads a byte array: <pre> {@code * int arraySize = readArray(); * for (int i = 0, i < arraySize; i++) { * readByte(); * } * }</pre> */ public int readArray() { checkType(ENCODED_ARRAY); type = MUST_READ; return Leb128.readUnsignedLeb128(in); }
/** * Begins reading the elements of an array, returning the array's size. The * caller must follow up by calling a read method for each element in the * array. For example, this reads a byte array: <pre> {@code * int arraySize = readArray(); * for (int i = 0, i < arraySize; i++) { * readByte(); * } * }</pre> */ public int readArray() { checkType(ENCODED_ARRAY); type = MUST_READ; return Leb128.readUnsignedLeb128(in); }