Class EncodedField
java.lang.Object
com.android.dx.dex.file.EncodedMember
com.android.dx.dex.file.EncodedField
- All Implemented Interfaces:
ToHuman, Comparable<EncodedField>
Representation of a field of a class, of any sort.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddContents(DexFile file) Populates aDexFilewith items from within this instance.intcompareTo(EncodedField other) voiddebugPrint(PrintWriter out, boolean verbose) Does a human-friendly dump of this instance.intencode(DexFile file, AnnotatedOutput out, int lastIndex, int dumpSeq) Encodes this instance to the given output.booleangetName()Gets the name.getRef()Gets the constant for the field.inthashCode()toHuman()Return the "human" string form of this instance.toString()Methods inherited from class EncodedMember
getAccessFlags
-
Constructor Details
-
EncodedField
Constructs an instance.- Parameters:
field-non-null;constant for the fieldaccessFlags- access flags
-
-
Method Details
-
hashCode
-
equals
-
compareTo
Note: This compares the method constants only, ignoring any associated code, because it should never be the case that two different items with the same method constant ever appear in the same list (or same file, even).
- Specified by:
compareToin interfaceComparable<EncodedField>
-
toString
-
addContents
Populates aDexFilewith items from within this instance.- Specified by:
addContentsin classEncodedMember- Parameters:
file-non-null;the file to populate
-
getName
Gets the name.- Specified by:
getNamein classEncodedMember- Returns:
non-null;the name
-
toHuman
-
debugPrint
Does a human-friendly dump of this instance.- Specified by:
debugPrintin classEncodedMember- Parameters:
out-non-null;where to dumpverbose- whether to be verbose with the output
-
getRef
-
encode
Encodes this instance to the given output.- Specified by:
encodein classEncodedMember- Parameters:
file-non-null;file this instance is part ofout-non-null;where to write tolastIndex->= 0;the previous member index value encoded, or0if this is the first element to encodedumpSeq->= 0;sequence number of this instance for annotation purposes- Returns:
>= 0;the member index value that was encoded
-