Class CstNat
java.lang.Object
com.android.dx.rop.cst.Constant
com.android.dx.rop.cst.CstNat
- All Implemented Interfaces:
ToHuman, Comparable<Constant>
Constants of type
CONSTANT_NameAndType_info.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final CstNatnon-null;the instance for nameTYPEand descriptorjava.lang.Class, which is useful when dealing with wrapped primitives -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected intcompareTo0(Constant other) Compare the values of this and another instance, which are guaranteed to be of the same class.booleanGets the descriptor.Gets the field type corresponding to this instance's descriptor.getName()Gets the name.inthashCode()booleanReturnstrueif this instance is a category-2 constant, meaning it takes up two slots in the constant pool, orfalseif this instance is category-1.final booleanGets whether this instance has the name of a standard class initialization method.final booleanGets whether this instance has the name of a standard instance initialization method.toHuman()Returns an unadorned but human-readable version of the name-and-type value.toString()typeName()Returns the human name for the particular type of constant this instance is.
-
Field Details
-
PRIMITIVE_TYPE_NAT
non-null;the instance for nameTYPEand descriptorjava.lang.Class, which is useful when dealing with wrapped primitives
-
-
Constructor Details
-
CstNat
-
-
Method Details
-
equals
-
hashCode
-
compareTo0
Compare the values of this and another instance, which are guaranteed to be of the same class. Subclasses must implement this.- Specified by:
compareTo0in classConstant- Parameters:
other-non-null;the instance to compare to- Returns:
-1,0, or1, as usual for a comparison
-
toString
-
typeName
-
isCategory2
public 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.- Specified by:
isCategory2in classConstant- Returns:
trueiff this instance is category-2
-
getName
-
getDescriptor
-
toHuman
Returns an unadorned but human-readable version of the name-and-type value.- Returns:
non-null;the human form
-
getFieldType
Gets the field type corresponding to this instance's descriptor. This method is only valid to call if the descriptor in fact describes a field (and not a method).- Returns:
non-null;the field type
-
isInstanceInit
public final boolean isInstanceInit()Gets whether this instance has the name of a standard instance initialization method. This is just a convenient shorthand forgetName().getString().equals("<init>").- Returns:
trueiff this is a reference to an instance initialization method
-
isClassInit
public final boolean isClassInit()Gets whether this instance has the name of a standard class initialization method. This is just a convenient shorthand forgetName().getString().equals("<clinit>").- Returns:
trueiff this is a reference to an instance initialization method
-