FileDocCategorySizeDatePackage
ConstantValueAttribute.javaAPI DocJ2ME CLDC 1.11725Wed Feb 05 15:56:02 GMT 2003components

ConstantValueAttribute

public class ConstantValueAttribute extends Attribute

Fields Summary
public ConstantObject
data
Constructors Summary
public ConstantValueAttribute(UnicodeConstant name, int l, ConstantObject d)

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

    super.countConstantReferences( isRelocatable );
    data.incReference();
    
public voidexternalize(ConstantPool p)

    super.externalize( p );
    data = p.dup( data );
    
public static AttributefinishReadAttribute(java.io.DataInput i, UnicodeConstant name, ConstantObject[] globals)

    int l;
    int n;
    ConstantObject d;

    l  = i.readInt();
    n  = i.readUnsignedShort();
    d  = globals[n];
    return new ConstantValueAttribute( name, l, 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)

    o.writeShort( data.index );
    return 2;