com.android.dx.rop.cst
Class CstMemberRef

java.lang.Object
  extended by com.android.dx.rop.cst.Constant
      extended by com.android.dx.rop.cst.TypedConstant
          extended by com.android.dx.rop.cst.CstMemberRef
All Implemented Interfaces:
TypeBearer, ToHuman, Comparable<Constant>
Direct Known Subclasses:
CstBaseMethodRef, CstEnumRef, CstFieldRef

public abstract class CstMemberRef
extends TypedConstant

Constants of type CONSTANT_*ref_info.


Method Summary
protected  int compareTo0(Constant other)
          Compare the values of this and another instance, which are guaranteed to be of the same class.
 boolean equals(Object other)
          
 CstType getDefiningClass()
          Gets the type of the defining class.
 CstNat getNat()
          Gets the defining name-and-type.
 int hashCode()
          
 boolean isCategory2()
          Returns true if this instance is a category-2 constant, meaning it takes up two slots in the constant pool, or false if this instance is category-1.
 String toHuman()
          Return the "human" string form of this instance.
 String toString()
          
 
Methods inherited from class com.android.dx.rop.cst.TypedConstant
getBasicFrameType, getBasicType, getFrameType, isConstant
 
Methods inherited from class com.android.dx.rop.cst.Constant
compareTo, typeName
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.android.dx.rop.type.TypeBearer
getType
 

Method Detail

equals

public final boolean equals(Object other)

Overrides:
equals in class Object

hashCode

public final int hashCode()

Overrides:
hashCode in class Object

compareTo0

protected int compareTo0(Constant other)
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().

Specified by:
compareTo0 in class Constant
Parameters:
other - non-null; the instance to compare to
Returns:
-1, 0, or 1, as usual for a comparison

toString

public final String toString()

Overrides:
toString in class Object

isCategory2

public final boolean isCategory2()
Returns true if this instance is a category-2 constant, meaning it takes up two slots in the constant pool, or false if this instance is category-1.

Specified by:
isCategory2 in class Constant
Returns:
true iff this instance is category-2

toHuman

public final String toHuman()
Return the "human" string form of this instance. This is generally less "debuggy" than toString().

Returns:
non-null; the human string form

getDefiningClass

public final CstType getDefiningClass()
Gets the type of the defining class.

Returns:
non-null; the type of defining class

getNat

public final CstNat getNat()
Gets the defining name-and-type.

Returns:
non-null; the name-and-type


Copyright © 2015. All rights reserved.