FileDocCategorySizeDatePackage
ConstantValueAttribute.javaAPI DocphoneME MR2 API (J2ME)2521Wed May 02 17:59:48 BST 2007components

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;