SwitchInsnpublic final class SwitchInsn extends Insn Instruction which contains switch cases. |
Fields Summary |
---|
private final com.android.dexgen.util.IntList | cases{@code non-null;} list of switch cases |
Constructors Summary |
---|
public SwitchInsn(Rop opcode, SourcePosition position, RegisterSpec result, RegisterSpecList sources, com.android.dexgen.util.IntList cases)Constructs an instance.
super(opcode, position, result, sources);
if (opcode.getBranchingness() != Rop.BRANCH_SWITCH) {
throw new IllegalArgumentException("bogus branchingness");
}
if (cases == null) {
throw new NullPointerException("cases == null");
}
this.cases = cases;
|
Methods Summary |
---|
public void | accept(Visitor visitor){@inheritDoc}
visitor.visitSwitchInsn(this);
| public boolean | contentEquals(Insn b){@inheritDoc}
SwitchInsn always compares false. The current use for this method
never encounters {@code SwitchInsn}s
return false;
| public com.android.dexgen.util.IntList | getCases()Gets the list of switch cases.
return cases;
| public com.android.dexgen.rop.type.TypeList | getCatches(){@inheritDoc}
return StdTypeList.EMPTY;
| public java.lang.String | getInlineString(){@inheritDoc}
return cases.toString();
| public Insn | withAddedCatch(com.android.dexgen.rop.type.Type type){@inheritDoc}
throw new UnsupportedOperationException("unsupported");
| public Insn | withNewRegisters(RegisterSpec result, RegisterSpecList sources){@inheritDoc}
return new SwitchInsn(getOpcode(), getPosition(),
result,
sources,
cases);
| public Insn | withRegisterOffset(int delta){@inheritDoc}
return new SwitchInsn(getOpcode(), getPosition(),
getResult().withOffset(delta),
getSources().withOffset(delta),
cases);
|
|