public static ReferenceType convertIntToReferenceType(final int type) {
    switch (type) {
      case 0:
        return ReferenceType.CONDITIONAL_TRUE;
      case 1:
        return ReferenceType.CONDITIONAL_FALSE;
      case 2:
        return ReferenceType.UNCONDITIONAL;
      case 3:
        return ReferenceType.SWITCH;
      case 4:
        return ReferenceType.CALL_DIRECT;
      case 5:
        return ReferenceType.CALL_INDIRECT;
      case 6:
        return ReferenceType.CALL_INDIRECT;
      case 7:
        return ReferenceType.CALL_VIRTUAL;
      case 8:
        return ReferenceType.DATA;
      case 9:
        return ReferenceType.DATA_STRING;
      default:
        throw new IllegalArgumentException("Error type is outside of reference type range");
    }
  }
Converts an integer to the corresponding reference type.

@param type integer indicating the type.
@return the reference type corresponding to the integer argument.
java/zylib/src/main/java/com/google/security/zynamics/zylib/disassembly/ReferenceType.java