FileDocCategorySizeDatePackage
CstFieldRef.javaAPI DocAndroid 1.5 API2445Wed May 06 22:41:02 BST 2009com.android.dx.rop.cst

CstFieldRef

public final class CstFieldRef extends CstMemberRef
Constants of type CONSTANT_Fieldref_info.

Fields Summary
Constructors Summary
public CstFieldRef(CstType definingClass, CstNat nat)
Constructs an instance.

param
definingClass non-null; the type of the defining class
param
nat non-null; the name-and-type

        super(definingClass, nat);
    
Methods Summary
protected intcompareTo0(Constant other)
{@inheritDoc}

        int cmp = super.compareTo0(other);

        if (cmp != 0) {
            return cmp;
        }

        CstFieldRef otherField = (CstFieldRef) other;
        CstUtf8 thisDescriptor = getNat().getDescriptor();
        CstUtf8 otherDescriptor = otherField.getNat().getDescriptor();
        return thisDescriptor.compareTo(otherDescriptor);
    
public static com.android.dx.rop.cst.CstFieldRefforPrimitiveType(com.android.dx.rop.type.Type primitiveType)
Returns an instance of this class that represents the static field which should hold the class corresponding to a given primitive type. For example, if given {@link Type#INT}, this method returns an instance corresponding to the field java.lang.Integer.TYPE.

param
primitiveType non-null; the primitive type
return
non-null; the corresponding static field

        return new CstFieldRef(CstType.forBoxedPrimitiveType(primitiveType),
                CstNat.PRIMITIVE_TYPE_NAT);
    
public com.android.dx.rop.type.TypegetType()
Returns the type of this field.

return
non-null; the field's type

        return getNat().getFieldType();
    
public java.lang.StringtypeName()
{@inheritDoc}

        return "field";