Java Code Examples for org.jf.dexlib2.iface.instruction.formats.Instruction21t

Following code examples demonstrate how to use org.jf.dexlib2.iface.instruction.formats.Instruction21tfrom android. These examples are extracted from various highly rated open source projects. You can directly use these code snippets or view their entire linked source code. These snippets are extracted to provide contextual information about how to use this class in the real world. These samples also let you understand some good practices on how to use org.jf.dexlib2.iface.instruction.formats.Instruction21tand various code implementation of this class.

    public static ImmutableInstruction21t of(Instruction21t instruction) {
        if (instruction instanceof ImmutableInstruction21t) {
            return (ImmutableInstruction21t) instruction;
        }
        return new ImmutableInstruction21t(
                instruction.getOpcode(),
                instruction.getRegisterA(),
                instruction.getCodeOffset());
    } 


    protected IfStmt ifStatement(DexBody body) {
        Instruction21t i = (Instruction21t) instruction;
        BinopExpr condition = getComparisonExpr(body, i.getRegisterA());
        IfStmt jif = Jimple.v().newIfStmt(condition,
                                    targetInstruction.getUnit());
        
        
		if (IDalvikTyper.ENABLE_DVKTYPER) {
			Debug.printDbg(IDalvikTyper.DEBUG, "constraint: "+ jif);
			
        }
		
		return jif;
        
    }