FileDocCategorySizeDatePackage
CstFieldRef.javaAPI DocAndroid 5.1 API2480Thu Mar 12 22:18:30 GMT 2015com.android.dexgen.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;
        CstUtf8 thisDescriptor = getNat().getDescriptor();
        CstUtf8 otherDescriptor = otherField.getNat().getDescriptor();
        return thisDescriptor.compareTo(otherDescriptor);
    
public static com.android.dexgen.rop.cst.CstFieldRefforPrimitiveType(com.android.dexgen.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.dexgen.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";