Class Constant
java.lang.Object
com.android.dx.rop.cst.Constant
- All Implemented Interfaces:
ToHuman, Comparable<Constant>
- Direct Known Subclasses:
CstAnnotation, CstArray, CstCallSiteRef, CstInvokeDynamic, CstNat, TypedConstant
Base class for constants of all sorts.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal intThis compares in class-major and value-minor order.protected abstract intcompareTo0(Constant other) Compare the values of this and another instance, which are guaranteed to be of the same class.abstract booleanReturnstrueif this instance is a category-2 constant, meaning it takes up two slots in the constant pool, orfalseif this instance is category-1.abstract StringtypeName()Returns the human name for the particular type of constant this instance is.
-
Constructor Details
-
Constant
public Constant()
-
-
Method Details
-
isCategory2
public abstract boolean isCategory2()Returnstrueif this instance is a category-2 constant, meaning it takes up two slots in the constant pool, orfalseif this instance is category-1.- Returns:
trueiff this instance is category-2
-
typeName
Returns the human name for the particular type of constant this instance is.- Returns:
non-null;the name
-
compareTo
This compares in class-major and value-minor order.- Specified by:
compareToin interfaceComparable<Constant>
-
compareTo0
Compare the values of this and another instance, which are guaranteed to be of the same class. Subclasses must implement this.- Parameters:
other-non-null;the instance to compare to- Returns:
-1,0, or1, as usual for a comparison
-