FileDocCategorySizeDatePackage
StackMapAttribute.javaAPI DocJ2ME CLDC 1.12147Wed Feb 05 15:56:02 GMT 2003components

StackMapAttribute

public class StackMapAttribute extends Attribute

Fields Summary
public StackMapFrame[]
data
Constructors Summary
public StackMapAttribute(UnicodeConstant name, int l, StackMapFrame[] d)

    super( name, l );
    this.data = d;
    
Methods Summary
public voidcountConstantReferences(boolean isRelocatable)

    super.countConstantReferences( isRelocatable );
    for (int i = 0; i < data.length; i++) {
        data[i].countConstantReferences(isRelocatable);
    }
    
public voidexternalize(ConstantPool p)

    super.externalize( p );
     for (int i = 0; i < data.length; i++) {
        data[i].externalize(p);
    }
    
public static AttributefinishReadAttribute(java.io.DataInput in, UnicodeConstant name, ConstantObject[] globals)

    int length = in.readInt();
    // Read the number of frames
    int n = in.readUnsignedShort();
    StackMapFrame d[] = new StackMapFrame[n];
    // Read each frame
    for (int i = 0; i < n; i++) { 
        d[i] = new StackMapFrame(in, globals);
    }
    return new StackMapAttribute(name, length, d);
    
public static AttributereadAttribute(java.io.DataInput i, ConstantObject[] globals)

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

    int length = 2;
    o.writeShort(data.length);
    for ( int i = 0; i < data.length; i++ ){
        length += data[i].writeData(o);
    }
    return length;