Package proguard.classfile.instruction
Class InstructionUtil
java.lang.Object
proguard.classfile.instruction.InstructionUtil
Utility methods for converting between representations of names and descriptions.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic bytearrayTypeFromInternalType(char internalType) Returns the 'newarray' type constant for the given internal primitive type.static charinternalTypeFromArrayType(byte arrayType) Returns the internal type corresponding to the given 'newarray' type.static booleanisStaticCall(byte opcode) Check if an instruction opcode refers to a static call (i.e.
-
Constructor Details
-
InstructionUtil
public InstructionUtil()
-
-
Method Details
-
internalTypeFromArrayType
public static char internalTypeFromArrayType(byte arrayType) Returns the internal type corresponding to the given 'newarray' type.- Parameters:
arrayType-Instruction.ARRAY_T_BOOLEAN,Instruction.ARRAY_T_BYTE,Instruction.ARRAY_T_CHAR,Instruction.ARRAY_T_SHORT,Instruction.ARRAY_T_INT,Instruction.ARRAY_T_LONG,Instruction.ARRAY_T_FLOAT, orInstruction.ARRAY_T_DOUBLE.- Returns:
TypeConstants.BOOLEAN,TypeConstants.BYTE,TypeConstants.CHAR,TypeConstants.SHORT,TypeConstants.INT,TypeConstants.LONG,TypeConstants.FLOAT, orTypeConstants.DOUBLE.
-
arrayTypeFromInternalType
public static byte arrayTypeFromInternalType(char internalType) Returns the 'newarray' type constant for the given internal primitive type.- Parameters:
internalType- a primitive typeTypeConstants.BOOLEAN,TypeConstants.BYTE,TypeConstants.CHAR,TypeConstants.SHORT,TypeConstants.INT,TypeConstants.LONG,TypeConstants.FLOAT, orTypeConstants.DOUBLE.- Returns:
- the array type constant corresponding to the given primitive type;
TypeConstants.BOOLEAN,TypeConstants.BYTE,TypeConstants.CHAR,TypeConstants.SHORT,TypeConstants.INT,TypeConstants.LONG,TypeConstants.FLOAT, orTypeConstants.DOUBLE. - See Also:
-
isStaticCall
public static boolean isStaticCall(byte opcode) Check if an instruction opcode refers to a static call (i.e. no calling instance needed).- Parameters:
opcode- The instruction opcode to check- Returns:
- False if this call requires a calling instance, true otherwise.
-