FileDocCategorySizeDatePackage
LineNumberTableAttribute.javaAPI DocJ2ME CLDC 1.11722Wed Feb 05 15:56:02 GMT 2003components

LineNumberTableAttribute

public class LineNumberTableAttribute extends Attribute

Fields Summary
public LineNumberTableEntry[]
data
Constructors Summary
public LineNumberTableAttribute(UnicodeConstant name, int l, LineNumberTableEntry[] d)

    super( name, l );
    data = d;
    
Methods Summary
public static AttributefinishReadAttribute(java.io.DataInput in, UnicodeConstant name)

    int l;
    int n;
    LineNumberTableEntry d[];

    l  = in.readInt();
    n  = in.readUnsignedShort();
    d = new LineNumberTableEntry[ n ];
    for ( int i = 0; i < n; i++ ){
        d[i] = new LineNumberTableEntry( in.readUnsignedShort(), in.readUnsignedShort() );
    }
    return new LineNumberTableAttribute( name, l, d );
    
public static AttributereadAttribute(java.io.DataInput i, ConstantObject[] t)

    UnicodeConstant name;

    name = (UnicodeConstant)t[i.readUnsignedShort()];
    return finishReadAttribute( i, name );
    
protected intwriteData(java.io.DataOutput o)

    int n = data.length;
    o.writeShort( n );
    for ( int i = 0; i < n; i++ ){
        data[i].write( o );
    }
    return 2+LineNumberTableEntry.size*n;