Top Description Constructors Methods
org.droidparts.dexmaker.dx.rop.cst

public final Class CstFieldRef

extends CstMemberRef
Class Inheritance
Imports
org.droidparts.dexmaker.dx.rop.type.Type

Constants of type CONSTANT_Fieldref_info.

Constructor Summary

AccessConstructor and Description
public
CstFieldRef(CstType
non-null; the type of the defining class
definingClass
,
CstNat
non-null; the name-and-type
nat
)

Constructs an instance.

Method Summary

Modifier and TypeMethod and Description
protected int
compareTo0(Constant
non-null; the instance to compare to
other
)

Overrides org.droidparts.dexmaker.dx.rop.cst.CstMemberRef.compareTo0.

Compare the values of this and another instance, which are guaranteed to be of the same class.
public static CstFieldRef

Returns:

non-null; the corresponding static field
forPrimitiveType
(Type
non-null; the primitive type
primitiveType
)

Returns an instance of this class that represents the static field which should hold the class corresponding to a given primitive type.

public Type

Returns:

non-null; the field's type
getType
()

Implements org.droidparts.dexmaker.dx.rop.type.TypeBearer.getType.

Returns the type of this field.
public String
typeName()

Implements abstract org.droidparts.dexmaker.dx.rop.cst.Constant.typeName.

Returns the human name for the particular type of constant this instance is.
Inherited from org.droidparts.dexmaker.dx.rop.cst.CstMemberRef:
equalsgetDefiningClassgetNathashCodeisCategory2toHumantoString

Constructor Detail

CstFieldRefback to summary
public CstFieldRef(CstType definingClass, CstNat nat)

Constructs an instance.

Parameters
definingClass:CstType

non-null; the type of the defining class

nat:CstNat

non-null; the name-and-type

Method Detail

compareTo0back to summary
protected int compareTo0(Constant other)

Overrides org.droidparts.dexmaker.dx.rop.cst.CstMemberRef.compareTo0.

Doc from org.droidparts.dexmaker.dx.rop.cst.CstMemberRef.compareTo0.

Compare the values of this and another instance, which are guaranteed to be of the same class. Subclasses must implement this.

Note

This implementation just compares the defining class and name, and it is up to subclasses to compare the rest after calling super.compareTo0().

Parameters
other:Constant

Doc from org.droidparts.dexmaker.dx.rop.cst.Constant.compareTo0.

non-null; the instance to compare to

Returns:int

Doc from org.droidparts.dexmaker.dx.rop.cst.Constant.compareTo0.

-1, 0, or 1, as usual for a comparison

Annotations
@Override
forPrimitiveTypeback to summary
public static CstFieldRef forPrimitiveType(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 Type#INT, this method returns an instance corresponding to the field java.lang.Integer.TYPE.

Parameters
primitiveType:Type

non-null; the primitive type

Returns:CstFieldRef

non-null; the corresponding static field

getTypeback to summary
public Type getType()

Implements org.droidparts.dexmaker.dx.rop.type.TypeBearer.getType.

Returns the type of this field.

Returns:Type

non-null; the field's type

typeNameback to summary
public String typeName()

Implements abstract org.droidparts.dexmaker.dx.rop.cst.Constant.typeName.

Doc from org.droidparts.dexmaker.dx.rop.cst.Constant.typeName.

Returns the human name for the particular type of constant this instance is.

Returns:String

non-null; the name

Annotations
@Override