Class EncodedMethod
java.lang.Object
com.android.dx.dex.file.EncodedMember
com.android.dx.dex.file.EncodedMethod
- All Implemented Interfaces:
ToHuman, Comparable<EncodedMethod>
Class that representats a method of a class.
-
Constructor Summary
ConstructorsConstructorDescriptionEncodedMethod(CstMethodRef method, int accessFlags, DalvCode code, TypeList throwsList) Constructs an instance. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddContents(DexFile file) Populates aDexFilewith items from within this instance.intcompareTo(EncodedMethod 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.booleanfinal CstStringgetName()Gets the name.final CstMethodRefgetRef()Gets the constant for the method.final StringtoHuman()Return the "human" string form of this instance.toString()Methods inherited from class EncodedMember
getAccessFlags
-
Constructor Details
-
EncodedMethod
Constructs an instance.- Parameters:
method-non-null;constant for the methodaccessFlags- access flagscode-null-ok;code for the method, if it is neitherabstractnornativethrowsList-non-null;list of possibly-thrown exceptions, just used in generating debugging output (listings)
-
-
Method Details
-
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<EncodedMethod>
-
toString
-
addContents
Populates aDexFilewith items from within this instance.- Specified by:
addContentsin classEncodedMember- Parameters:
file-non-null;the file to populate
-
toHuman
-
getName
Gets the name.- Specified by:
getNamein classEncodedMember- Returns:
non-null;the name
-
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
Gets the constant for the method.- Returns:
non-null;the constant
-
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
-