Class BuilderPackedSwitchPayload
- java.lang.Object
-
- org.jf.dexlib2.builder.BuilderInstruction
-
- org.jf.dexlib2.builder.BuilderSwitchPayload
-
- org.jf.dexlib2.builder.instruction.BuilderPackedSwitchPayload
-
- All Implemented Interfaces:
PackedSwitchPayload
,Instruction
,PayloadInstruction
,SwitchPayload
public class BuilderPackedSwitchPayload extends BuilderSwitchPayload implements PackedSwitchPayload
-
-
Field Summary
Fields Modifier and Type Field Description static Opcode
OPCODE
protected java.util.List<BuilderSwitchElement>
switchElements
-
Fields inherited from class org.jf.dexlib2.builder.BuilderInstruction
opcode
-
-
Constructor Summary
Constructors Constructor Description BuilderPackedSwitchPayload(int startKey, java.util.List<? extends Label> switchElements)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getCodeUnits()
Gets the size of this instruction.Format
getFormat()
java.util.List<BuilderSwitchElement>
getSwitchElements()
-
Methods inherited from class org.jf.dexlib2.builder.BuilderSwitchPayload
getReferrer
-
Methods inherited from class org.jf.dexlib2.builder.BuilderInstruction
getLocation, getOpcode
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jf.dexlib2.iface.instruction.Instruction
getOpcode
-
-
-
-
Field Detail
-
OPCODE
public static final Opcode OPCODE
-
switchElements
@Nonnull protected final java.util.List<BuilderSwitchElement> switchElements
-
-
Constructor Detail
-
BuilderPackedSwitchPayload
public BuilderPackedSwitchPayload(int startKey, @Nullable java.util.List<? extends Label> switchElements)
-
-
Method Detail
-
getSwitchElements
@Nonnull public java.util.List<BuilderSwitchElement> getSwitchElements()
- Specified by:
getSwitchElements
in interfacePackedSwitchPayload
- Specified by:
getSwitchElements
in interfaceSwitchPayload
- Specified by:
getSwitchElements
in classBuilderSwitchPayload
- Returns:
- A list of the switch elements associated with this switch payload instruction. The returned list must have switch elements with keys that are ordered and sequential.
-
getCodeUnits
public int getCodeUnits()
Description copied from interface:Instruction
Gets the size of this instruction.- Specified by:
getCodeUnits
in interfaceInstruction
- Overrides:
getCodeUnits
in classBuilderInstruction
- Returns:
- The size of this instruction, as a count of the number of 16-bit code units that make up this instruction.
-
getFormat
public Format getFormat()
- Specified by:
getFormat
in classBuilderInstruction
-
-