public final class EncodedMethod extends EncodedMember implements java.lang.Comparable<EncodedMethod>
| Constructor and Description |
|---|
EncodedMethod(CstMethodRef method,
int accessFlags,
DalvCode code,
TypeList throwsList)
Constructs an instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addContents(DexFile file)
Populates a
DexFile with items from within this instance. |
int |
compareTo(EncodedMethod other) |
void |
debugPrint(java.io.PrintWriter out,
boolean verbose)
Does a human-friendly dump of this instance.
|
int |
encode(DexFile file,
AnnotatedOutput out,
int lastIndex,
int dumpSeq)
Encodes this instance to the given output.
|
boolean |
equals(java.lang.Object other) |
CstString |
getName()
Gets the name.
|
CstMethodRef |
getRef()
Gets the constant for the method.
|
java.lang.String |
toHuman()
Return the "human" string form of this instance.
|
java.lang.String |
toString() |
getAccessFlagspublic EncodedMethod(CstMethodRef method, int accessFlags, DalvCode code, TypeList throwsList)
method - non-null; constant for the methodaccessFlags - access flagscode - null-ok; code for the method, if it is neither
abstract nor nativethrowsList - non-null; list of possibly-thrown exceptions,
just used in generating debugging output (listings)public boolean equals(java.lang.Object other)
equals in class java.lang.Objectpublic int compareTo(EncodedMethod other)
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).
compareTo in interface java.lang.Comparable<EncodedMethod>public java.lang.String toString()
toString in class java.lang.Objectpublic void addContents(DexFile file)
DexFile with items from within this instance.addContents in class EncodedMemberfile - non-null; the file to populatepublic final java.lang.String toHuman()
toString().public final CstString getName()
getName in class EncodedMembernon-null; the namepublic void debugPrint(java.io.PrintWriter out,
boolean verbose)
debugPrint in class EncodedMemberout - non-null; where to dumpverbose - whether to be verbose with the outputpublic final CstMethodRef getRef()
non-null; the constantpublic int encode(DexFile file, AnnotatedOutput out, int lastIndex, int dumpSeq)
encode in class EncodedMemberfile - non-null; file this instance is part ofout - non-null; where to write tolastIndex - >= 0; the previous member index value encoded, or
0 if this is the first element to encodedumpSeq - >= 0; sequence number of this instance for
annotation purposes>= 0; the member index value that was encodedCopyright © 2020. All Rights Reserved.