Java Code Examples for com.android.dx.io.Opcodes#IF_NE

The following examples show how to use com.android.dx.io.Opcodes#IF_NE . 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: Dop.java    From Box with Apache License 2.0 6 votes vote down vote up
/**
 * Gets the opcode for the opposite test of this instance. This is only
 * valid for opcodes which are in fact tests.
 *
 * @return {@code non-null;} the opposite test
 */
public Dop getOppositeTest() {
    switch (opcode) {
        case Opcodes.IF_EQ:  return Dops.IF_NE;
        case Opcodes.IF_NE:  return Dops.IF_EQ;
        case Opcodes.IF_LT:  return Dops.IF_GE;
        case Opcodes.IF_GE:  return Dops.IF_LT;
        case Opcodes.IF_GT:  return Dops.IF_LE;
        case Opcodes.IF_LE:  return Dops.IF_GT;
        case Opcodes.IF_EQZ: return Dops.IF_NEZ;
        case Opcodes.IF_NEZ: return Dops.IF_EQZ;
        case Opcodes.IF_LTZ: return Dops.IF_GEZ;
        case Opcodes.IF_GEZ: return Dops.IF_LTZ;
        case Opcodes.IF_GTZ: return Dops.IF_LEZ;
        case Opcodes.IF_LEZ: return Dops.IF_GTZ;
    }

    throw new IllegalArgumentException("bogus opcode: " + this);
}
 
Example 2
Source File: Dop.java    From Box with Apache License 2.0 6 votes vote down vote up
/**
 * Gets the opcode for the opposite test of this instance. This is only
 * valid for opcodes which are in fact tests.
 *
 * @return {@code non-null;} the opposite test
 */
public Dop getOppositeTest() {
    switch (opcode) {
        case Opcodes.IF_EQ:  return Dops.IF_NE;
        case Opcodes.IF_NE:  return Dops.IF_EQ;
        case Opcodes.IF_LT:  return Dops.IF_GE;
        case Opcodes.IF_GE:  return Dops.IF_LT;
        case Opcodes.IF_GT:  return Dops.IF_LE;
        case Opcodes.IF_LE:  return Dops.IF_GT;
        case Opcodes.IF_EQZ: return Dops.IF_NEZ;
        case Opcodes.IF_NEZ: return Dops.IF_EQZ;
        case Opcodes.IF_LTZ: return Dops.IF_GEZ;
        case Opcodes.IF_GEZ: return Dops.IF_LTZ;
        case Opcodes.IF_GTZ: return Dops.IF_LEZ;
        case Opcodes.IF_LEZ: return Dops.IF_GTZ;
    }

    throw new IllegalArgumentException("bogus opcode: " + this);
}
 
Example 3
Source File: Dop.java    From J2ME-Loader with Apache License 2.0 6 votes vote down vote up
/**
 * Gets the opcode for the opposite test of this instance. This is only
 * valid for opcodes which are in fact tests.
 *
 * @return {@code non-null;} the opposite test
 */
public Dop getOppositeTest() {
    switch (opcode) {
        case Opcodes.IF_EQ:  return Dops.IF_NE;
        case Opcodes.IF_NE:  return Dops.IF_EQ;
        case Opcodes.IF_LT:  return Dops.IF_GE;
        case Opcodes.IF_GE:  return Dops.IF_LT;
        case Opcodes.IF_GT:  return Dops.IF_LE;
        case Opcodes.IF_LE:  return Dops.IF_GT;
        case Opcodes.IF_EQZ: return Dops.IF_NEZ;
        case Opcodes.IF_NEZ: return Dops.IF_EQZ;
        case Opcodes.IF_LTZ: return Dops.IF_GEZ;
        case Opcodes.IF_GEZ: return Dops.IF_LTZ;
        case Opcodes.IF_GTZ: return Dops.IF_LEZ;
        case Opcodes.IF_LEZ: return Dops.IF_GTZ;
    }

    throw new IllegalArgumentException("bogus opcode: " + this);
}
 
Example 4
Source File: Dop.java    From buck with Apache License 2.0 6 votes vote down vote up
/**
 * Gets the opcode for the opposite test of this instance. This is only
 * valid for opcodes which are in fact tests.
 *
 * @return {@code non-null;} the opposite test
 */
public Dop getOppositeTest() {
    switch (opcode) {
        case Opcodes.IF_EQ:  return Dops.IF_NE;
        case Opcodes.IF_NE:  return Dops.IF_EQ;
        case Opcodes.IF_LT:  return Dops.IF_GE;
        case Opcodes.IF_GE:  return Dops.IF_LT;
        case Opcodes.IF_GT:  return Dops.IF_LE;
        case Opcodes.IF_LE:  return Dops.IF_GT;
        case Opcodes.IF_EQZ: return Dops.IF_NEZ;
        case Opcodes.IF_NEZ: return Dops.IF_EQZ;
        case Opcodes.IF_LTZ: return Dops.IF_GEZ;
        case Opcodes.IF_GEZ: return Dops.IF_LTZ;
        case Opcodes.IF_GTZ: return Dops.IF_LEZ;
        case Opcodes.IF_LEZ: return Dops.IF_GTZ;
    }

    throw new IllegalArgumentException("bogus opcode: " + this);
}