Class ImmutablePackedSwitchPayload
- java.lang.Object
-
- org.jf.dexlib2.immutable.instruction.ImmutableInstruction
-
- org.jf.dexlib2.immutable.instruction.ImmutablePackedSwitchPayload
-
- All Implemented Interfaces:
PackedSwitchPayload,Instruction,PayloadInstruction,SwitchPayload
public class ImmutablePackedSwitchPayload extends ImmutableInstruction implements PackedSwitchPayload
-
-
Field Summary
Fields Modifier and Type Field Description static OpcodeOPCODEprotected com.google.common.collect.ImmutableList<? extends ImmutableSwitchElement>switchElements-
Fields inherited from class org.jf.dexlib2.immutable.instruction.ImmutableInstruction
opcode
-
-
Constructor Summary
Constructors Constructor Description ImmutablePackedSwitchPayload(com.google.common.collect.ImmutableList<? extends ImmutableSwitchElement> switchElements)ImmutablePackedSwitchPayload(java.util.List<? extends SwitchElement> switchElements)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetCodeUnits()Gets the size of this instruction.FormatgetFormat()java.util.List<? extends SwitchElement>getSwitchElements()static ImmutablePackedSwitchPayloadof(PackedSwitchPayload instruction)-
Methods inherited from class org.jf.dexlib2.immutable.instruction.ImmutableInstruction
getOpcode, immutableListOf, of
-
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 com.google.common.collect.ImmutableList<? extends ImmutableSwitchElement> switchElements
-
-
Constructor Detail
-
ImmutablePackedSwitchPayload
public ImmutablePackedSwitchPayload(@Nullable java.util.List<? extends SwitchElement> switchElements)
-
ImmutablePackedSwitchPayload
public ImmutablePackedSwitchPayload(@Nullable com.google.common.collect.ImmutableList<? extends ImmutableSwitchElement> switchElements)
-
-
Method Detail
-
of
@Nonnull public static ImmutablePackedSwitchPayload of(PackedSwitchPayload instruction)
-
getSwitchElements
@Nonnull public java.util.List<? extends SwitchElement> getSwitchElements()
- Specified by:
getSwitchElementsin interfacePackedSwitchPayload- Specified by:
getSwitchElementsin interfaceSwitchPayload- 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:InstructionGets the size of this instruction.- Specified by:
getCodeUnitsin interfaceInstruction- Overrides:
getCodeUnitsin classImmutableInstruction- 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:
getFormatin classImmutableInstruction
-
-