code: private static String detectSystemType(String systemType, String osName, boolean currentSystem) {
  
      if (!isEmpty(systemType)) {
        return systemType;
      }
      if (isEmpty(osName)) {
        return UNKNOWN;
      }
      String os = osName.toLowerCase(Locale.US).trim();
      if (os.startsWith("windows")) {
        return SYSTEM_TYPE_WINDOWS;
      } else if (os.startsWith("mac")) {
        return SYSTEM_TYPE_MAC_OS;
      } else if (os.startsWith("ios")) {
        return SYSTEM_TYPE_IOS;
      } else if (os.contains("linux")) {
        return SYSTEM_TYPE_LINUX;
      } else if (os.contains("bsd")) {
        return SYSTEM_TYPE_BSD;
      } else if (os.contains("solaris") || os.contains("hp-ux") || os.contains("nix") || os.contains("aix") || os.contains("nextstep") || os.contains("sorix")
          || os.contains("irix")) {
        return SYSTEM_TYPE_UNIX;
      } else if (os.startsWith("z/") || os.startsWith("os/360") || os.startsWith("os/390") || os.startsWith("os/400") || os.startsWith("bs2000")
          || os.startsWith("mvs") || os.startsWith("aix") || os.startsWith("tpf") || os.equals("cms")) {
        return SYSTEM_TYPE_MAINFRAIME;
      } else {
        return UNKNOWN;
      }
    }
docs: @see #getSystemType()
  
  @param osName - see {@link #getSystemName()}.
  @param currentSystem - {@code true} if the value should be determined for the system and JVM currently running (in
  this case additional system-properties might be evaluated), {@code false} otherwise.
  @return the value for {@link #isLimitedDevice()}.