Package com.tonic.analysis.instruction
Enum ArithmeticShiftInstruction.ShiftType
- java.lang.Object
-
- java.lang.Enum<ArithmeticShiftInstruction.ShiftType>
-
- com.tonic.analysis.instruction.ArithmeticShiftInstruction.ShiftType
-
- All Implemented Interfaces:
Serializable,Comparable<ArithmeticShiftInstruction.ShiftType>
- Enclosing class:
- ArithmeticShiftInstruction
public static enum ArithmeticShiftInstruction.ShiftType extends Enum<ArithmeticShiftInstruction.ShiftType>
The shift operation kinds, each pairing a JVM opcode with its mnemonic.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ISHLLeft shift of an int, using the low five bits of the shift count.ISHRArithmetic right shift of an int, propagating the sign bit.IUSHRLogical right shift of an int, filling the vacated high bits with zero.LSHLLeft shift of a long, using the low six bits of the int shift count.LSHRArithmetic right shift of a long, propagating the sign bit.LUSHRLogical right shift of a long, filling the vacated high bits with zero.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ArithmeticShiftInstruction.ShiftTypefromOpcode(int opcode)Looks up the shift type for a JVM opcode.StringgetMnemonic()intgetOpcode()static ArithmeticShiftInstruction.ShiftTypevalueOf(String name)Returns the enum constant of this type with the specified name.static ArithmeticShiftInstruction.ShiftType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ISHL
public static final ArithmeticShiftInstruction.ShiftType ISHL
Left shift of an int, using the low five bits of the shift count.
-
LSHL
public static final ArithmeticShiftInstruction.ShiftType LSHL
Left shift of a long, using the low six bits of the int shift count.
-
ISHR
public static final ArithmeticShiftInstruction.ShiftType ISHR
Arithmetic right shift of an int, propagating the sign bit.
-
LSHR
public static final ArithmeticShiftInstruction.ShiftType LSHR
Arithmetic right shift of a long, propagating the sign bit.
-
IUSHR
public static final ArithmeticShiftInstruction.ShiftType IUSHR
Logical right shift of an int, filling the vacated high bits with zero.
-
LUSHR
public static final ArithmeticShiftInstruction.ShiftType LUSHR
Logical right shift of a long, filling the vacated high bits with zero.
-
-
Method Detail
-
values
public static ArithmeticShiftInstruction.ShiftType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ArithmeticShiftInstruction.ShiftType c : ArithmeticShiftInstruction.ShiftType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ArithmeticShiftInstruction.ShiftType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
getOpcode
public int getOpcode()
- Returns:
- the opcode
-
getMnemonic
public String getMnemonic()
- Returns:
- the mnemonic
-
fromOpcode
public static ArithmeticShiftInstruction.ShiftType fromOpcode(int opcode)
Looks up the shift type for a JVM opcode.- Parameters:
opcode- the JVM opcode- Returns:
- the matching type, or null if the opcode is not a shift opcode
-
-