|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.android.dx.dex.code.DalvInsn
com.android.dx.dex.code.VariableSizeInsn
com.android.dx.dex.code.SwitchData
public final class SwitchData
Pseudo-instruction which holds switch data. The switch data is a map of values to target addresses, and this class writes the data in either a "packed" or "sparse" form.
| Constructor Summary | |
|---|---|
SwitchData(SourcePosition position,
CodeAddress user,
IntList cases,
CodeAddress[] targets)
Constructs an instance. |
|
| Method Summary | |
|---|---|
protected String |
argString()
Gets the string form for any arguments to this instance. |
int |
codeSize()
Gets the size of this instruction, in 16-bit code units. |
boolean |
isPacked()
Returns whether or not this instance's data will be output as packed. |
protected String |
listingString0(boolean noteIndices)
Helper for DalvInsn.listingString(java.lang.String, int, boolean), which returns the string
form of this instance suitable for inclusion in a
human-oriented listing dump, not including the instruction
address and without respect for any output formatting. |
DalvInsn |
withRegisters(RegisterSpecList registers)
Returns an instance that is just like this one, except that the register list is replaced by the given one, and its address is reset. |
void |
writeTo(AnnotatedOutput out)
Writes this instance to the given output. |
| Methods inherited from class com.android.dx.dex.code.VariableSizeInsn |
|---|
withOpcode, withRegisterOffset |
| Methods inherited from class com.android.dx.dex.code.DalvInsn |
|---|
expandedPrefix, expandedSuffix, expandedVersion, getAddress, getLowRegVersion, getMinimumRegisterRequirement, getNextAddress, getOpcode, getPosition, getRegisters, hasAddress, hasResult, identifierString, listingString, makeMove, setAddress, toString, withMapper |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SwitchData(SourcePosition position,
CodeAddress user,
IntList cases,
CodeAddress[] targets)
-1).
position - non-null; source positionuser - non-null; address representing the instruction that
uses this instancecases - non-null; sorted list of switch cases (keys)targets - non-null; corresponding list of code addresses; the
branch target for each case| Method Detail |
|---|
public int codeSize()
codeSize in class DalvInsn>= 0; the code size of this instructionpublic void writeTo(AnnotatedOutput out)
writeTo in class DalvInsnout - non-null; where to write topublic DalvInsn withRegisters(RegisterSpecList registers)
withRegisters in class DalvInsnregisters - non-null; new register list
non-null; an appropriately-constructed instancepublic boolean isPacked()
true iff the data is to be packedprotected String argString()
argString in class DalvInsnnull-ok; the string version of any arguments or
null if there are noneprotected String listingString0(boolean noteIndices)
DalvInsn.listingString(java.lang.String, int, boolean), which returns the string
form of this instance suitable for inclusion in a
human-oriented listing dump, not including the instruction
address and without respect for any output formatting. This
method should return null if this instance should
not appear in a listing.
listingString0 in class DalvInsnnoteIndices - whether to include an explicit notation of
constant pool indices
null-ok; the listing string
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||