Example usage for org.objectweb.asm ClassReader readInt

List of usage examples for org.objectweb.asm ClassReader readInt

Introduction

In this page you can find the example usage for org.objectweb.asm ClassReader readInt.

Prototype

public int readInt(final int offset) 

Source Link

Document

Reads a signed int value in this ClassReader .

Usage

From source file:com.sun.tdk.jcov.instrument.CharacterRangeTableAttribute.java

License:Open Source License

@Override
protected Attribute read(ClassReader cr, int off, int len, char[] buf, int codeOff, Label[] labels) {
    int length = cr.readShort(off);
    CRTEntry[] entries = new CRTEntry[length];
    for (int i = 0; i < length; ++i) {
        int eoff = off + 2 + (i * 14);
        int start_pc = cr.readShort(eoff + 0);
        int end_pc = cr.readShort(eoff + 2);
        int char_start = cr.readInt(eoff + 4);
        int char_end = cr.readInt(eoff + 8);
        int flags = cr.readShort(eoff + 12);
        entries[i] = new CRTEntry(rootId, start_pc, end_pc, char_start, char_end, flags);
    }/*from ww  w.ja v a  2  s  .c o m*/
    return new CharacterRangeTableAttribute(rootId, length, entries);
}