private boolean isGoodVersion(int minorVersion, int majorVersion) {
    /* Valid version ranges are typically of the form
     * "A.0 through B.C inclusive" where A <= B and C >= 0,
     * which is why we don't have a CLASS_FILE_MIN_MINOR_VERSION.
     */
    if (minorVersion >= 0) {
      /* Check against max first to handle the case where
       * MIN_MAJOR == MAX_MAJOR.
       */
      if (majorVersion == CLASS_FILE_MAX_MAJOR_VERSION) {
        return minorVersion <= CLASS_FILE_MAX_MINOR_VERSION;
      } else return majorVersion < CLASS_FILE_MAX_MAJOR_VERSION
              && majorVersion >= CLASS_FILE_MIN_MAJOR_VERSION;
    }

    return false;
  }
Sees if the .class file header version are within range.

@param minorVersion the value of a classfile "minor_version" field
@param majorVersion the value of a classfile "major_version" field
@return true if the parameters are valid and within range
android/android_framework/dex-maker/src/main/java/com/android/dx/cf/direct/DirectClassFile.java