FileDocCategorySizeDatePackage
CstEnumRef.javaAPI DocAndroid 5.1 API1877Thu Mar 12 22:18:30 GMT 2015com.android.dexgen.rop.cst

CstEnumRef

public final class CstEnumRef extends CstMemberRef
Constant type to represent a reference to a particular constant value of an enumerated type.

Fields Summary
private CstFieldRef
fieldRef
{@code null-ok;} the corresponding field ref, lazily initialized
Constructors Summary
public CstEnumRef(CstNat nat)
Constructs an instance.

param
nat {@code non-null;} the name-and-type; the defining class is derived from this

        super(new CstType(nat.getFieldType()), nat);

        fieldRef = null;
    
Methods Summary
public CstFieldRefgetFieldRef()
Get a {@link CstFieldRef} that corresponds with this instance.

return
{@code non-null;} the corresponding field reference

        if (fieldRef == null) {
            fieldRef = new CstFieldRef(getDefiningClass(), getNat());
        }

        return fieldRef;
    
public com.android.dexgen.rop.type.TypegetType()
{@inheritDoc} Note: This returns the enumerated type.

        return getDefiningClass().getClassType();
    
public java.lang.StringtypeName()
{@inheritDoc}

        return "enum";