FileDocCategorySizeDatePackage
CstFieldRef.javaAPI DocAndroid 5.1 API2476Thu Mar 12 22:18:30 GMT 2015com.android.dx.rop.cst

CstFieldRef

public final class CstFieldRef extends CstMemberRef
Constants of type {@code CONSTANT_Fieldref_info}.

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

param
definingClass {@code non-null;} the type of the defining class
param
nat {@code 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;
        CstString thisDescriptor = getNat().getDescriptor();
        CstString 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 {@code java.lang.Integer.TYPE}.

param
primitiveType {@code non-null;} the primitive type
return
{@code 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
{@code non-null;} the field's type

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

        return "field";