com.android.dx.io.OpcodeInfo Java Examples

The following examples show how to use com.android.dx.io.OpcodeInfo. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: InsnDecoder.java    From Box with Apache License 2.0 5 votes vote down vote up
private DecodedInstruction decodeRawInsn(ShortArrayCodeInput in) throws EOFException {
	int opcodeUnit = in.read();
	int opcode = Opcodes.extractOpcodeFromUnit(opcodeUnit);
	OpcodeInfo.Info opcodeInfo;
	try {
		opcodeInfo = OpcodeInfo.get(opcode);
	} catch (IllegalArgumentException e) {
		LOG.warn("Ignore decode error: '{}', replace with NOP instruction", e.getMessage());
		opcodeInfo = OpcodeInfo.NOP;
	}
	return opcodeInfo.getFormat().decode(opcodeUnit, in);
}
 
Example #2
Source File: DecodedInstruction.java    From Box with Apache License 2.0 5 votes vote down vote up
/**
 * Decodes an instruction from the given input source.
 */
public static DecodedInstruction decode(CodeInput in) throws EOFException {
    int opcodeUnit = in.read();
    int opcode = Opcodes.extractOpcodeFromUnit(opcodeUnit);
    InstructionCodec format = OpcodeInfo.getFormat(opcode);

    return format.decode(opcodeUnit, in);
}
 
Example #3
Source File: InsnDecoder.java    From Box with Apache License 2.0 5 votes vote down vote up
private DecodedInstruction decodeRawInsn(ShortArrayCodeInput in) throws EOFException {
	int opcodeUnit = in.read();
	int opcode = Opcodes.extractOpcodeFromUnit(opcodeUnit);
	OpcodeInfo.Info opcodeInfo;
	try {
		opcodeInfo = OpcodeInfo.get(opcode);
	} catch (IllegalArgumentException e) {
		LOG.warn("Ignore decode error: '{}', replace with NOP instruction", e.getMessage());
		opcodeInfo = OpcodeInfo.NOP;
	}
	return opcodeInfo.getFormat().decode(opcodeUnit, in);
}
 
Example #4
Source File: DecodedInstruction.java    From Box with Apache License 2.0 5 votes vote down vote up
/**
 * Decodes an instruction from the given input source.
 */
public static DecodedInstruction decode(CodeInput in) throws EOFException {
    int opcodeUnit = in.read();
    int opcode = Opcodes.extractOpcodeFromUnit(opcodeUnit);
    InstructionCodec format = OpcodeInfo.getFormat(opcode);

    return format.decode(opcodeUnit, in);
}
 
Example #5
Source File: DecodedInstruction.java    From J2ME-Loader with Apache License 2.0 5 votes vote down vote up
/**
 * Decodes an instruction from the given input source.
 */
public static DecodedInstruction decode(CodeInput in) throws EOFException {
    int opcodeUnit = in.read();
    int opcode = Opcodes.extractOpcodeFromUnit(opcodeUnit);
    InstructionCodec format = OpcodeInfo.getFormat(opcode);

    return format.decode(opcodeUnit, in);
}
 
Example #6
Source File: DecodedInstruction.java    From buck with Apache License 2.0 5 votes vote down vote up
/**
 * Decodes an instruction from the given input source.
 */
public static DecodedInstruction decode(CodeInput in) throws EOFException {
    int opcodeUnit = in.read();
    int opcode = Opcodes.extractOpcodeFromUnit(opcodeUnit);
    InstructionCodec format = OpcodeInfo.getFormat(opcode);

    return format.decode(opcodeUnit, in);
}
 
Example #7
Source File: Dop.java    From Box with Apache License 2.0 2 votes vote down vote up
/**
 * Gets the opcode name.
 *
 * @return {@code non-null;} the opcode name
 */
public String getName() {
    return OpcodeInfo.getName(opcode);
}
 
Example #8
Source File: Dop.java    From Box with Apache License 2.0 2 votes vote down vote up
/**
 * Gets the opcode name.
 *
 * @return {@code non-null;} the opcode name
 */
public String getName() {
    return OpcodeInfo.getName(opcode);
}
 
Example #9
Source File: Dop.java    From J2ME-Loader with Apache License 2.0 2 votes vote down vote up
/**
 * Gets the opcode name.
 *
 * @return {@code non-null;} the opcode name
 */
public String getName() {
    return OpcodeInfo.getName(opcode);
}
 
Example #10
Source File: Dop.java    From buck with Apache License 2.0 2 votes vote down vote up
/**
 * Gets the opcode name.
 *
 * @return {@code non-null;} the opcode name
 */
public String getName() {
    return OpcodeInfo.getName(opcode);
}