Package com.android.dx.rop.cst
Class CstProtoRef
java.lang.Object
com.android.dx.rop.cst.Constant
com.android.dx.rop.cst.TypedConstant
com.android.dx.rop.cst.CstProtoRef
- All Implemented Interfaces:
TypeBearer
,ToHuman
,Comparable<Constant>
Prototype reference.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected int
compareTo0
(Constant other) Compare the values of this and another instance, which are guaranteed to be of the same class.boolean
getType()
Gets the type associated with this instance.int
hashCode()
boolean
Returnstrue
if this instance is a category-2 constant, meaning it takes up two slots in the constant pool, orfalse
if this instance is category-1.static CstProtoRef
Makes an instance for the given value.toHuman()
Return the "human" string form of this instance.final String
toString()
typeName()
Returns the human name for the particular type of constant this instance is.Methods inherited from class com.android.dx.rop.cst.TypedConstant
getBasicFrameType, getBasicType, getFrameType, isConstant
-
Constructor Details
-
CstProtoRef
-
-
Method Details
-
make
Makes an instance for the given value. This may (but does not necessarily) return an already-allocated instance.- Parameters:
descriptor
- the method descriptor- Returns:
non-null;
the appropriate instance
-
equals
-
hashCode
public int hashCode() -
isCategory2
public boolean isCategory2()Returnstrue
if this instance is a category-2 constant, meaning it takes up two slots in the constant pool, orfalse
if this instance is category-1.- Specified by:
isCategory2
in classConstant
- Returns:
true
iff this instance is category-2
-
typeName
Returns the human name for the particular type of constant this instance is. -
compareTo0
Compare the values of this and another instance, which are guaranteed to be of the same class. Subclasses must implement this.- Specified by:
compareTo0
in classConstant
- Parameters:
other
-non-null;
the instance to compare to- Returns:
-1
,0
, or1
, as usual for a comparison
-
toHuman
Return the "human" string form of this instance. This is generally less "debuggy" thantoString()
.- Returns:
non-null;
the human string form
-
toString
-
getPrototype
-
getType
Description copied from interface:TypeBearer
Gets the type associated with this instance.- Returns:
non-null;
the type
-