|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.android.dx.util.MutabilityControl
com.android.dx.cf.code.SwitchList
public final class SwitchList
List of (value, target) mappings representing the choices of a
tableswitch or lookupswitch instruction. It
also holds the default target for the switch.
| Constructor Summary | |
|---|---|
SwitchList(int size)
Constructs an instance. |
|
| Method Summary | |
|---|---|
void |
add(int value,
int target)
Adds the given item. |
int |
getDefaultTarget()
Gets the default target. |
int |
getTarget(int n)
Gets the indicated target. |
IntList |
getTargets()
Gets the list of all targets. |
int |
getValue(int n)
Gets the indicated test value. |
IntList |
getValues()
Gets the list of all case values. |
void |
removeSuperfluousDefaults()
Shrinks this instance if possible, removing test elements that refer to the default target. |
void |
setDefaultTarget(int target)
Sets the default target. |
void |
setImmutable()
Makes this instance immutable. |
int |
size()
Gets the size of the list. |
| Methods inherited from class com.android.dx.util.MutabilityControl |
|---|
isImmutable, isMutable, throwIfImmutable, throwIfMutable |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SwitchList(int size)
size - >= 0; the number of elements to be in the table| Method Detail |
|---|
public void setImmutable()
setImmutable in class MutabilityControlpublic int size()
>= 0; the list sizepublic int getValue(int n)
n - >= 0;, < size(); which index
public int getTarget(int n)
size()
returns the default target.
n - >= 0, <= size(); which index
>= 0; the targetpublic int getDefaultTarget()
getTarget(size()).
>= 0; the default targetpublic IntList getTargets()
non-null; the target listpublic IntList getValues()
non-null; the case value listpublic void setDefaultTarget(int target)
target - >= 0; the absolute (not relative) default target
address
public void add(int value,
int target)
value - the test valuetarget - >= 0; the absolute (not relative) target addresspublic void removeSuperfluousDefaults()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||