MCPcopy Create free account
hub / github.com/HumbleUI/Skija / OperatingSystem

Enum OperatingSystem

shared/java/impl/OperatingSystem.java:5–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3import java.util.Locale;
4
5public enum OperatingSystem {
6 WINDOWS,
7 LINUX,
8 MACOS,
9 UNKNOWN;
10
11 public static final OperatingSystem CURRENT;
12
13 static {
14 String os = System.getProperty("os.name").toLowerCase(Locale.ROOT);
15 if (os.contains("mac") || os.contains("darwin")) {
16 CURRENT = MACOS;
17 } else if (os.contains("windows")) {
18 CURRENT = WINDOWS;
19 } else if (os.contains("nux") || os.contains("nix")) {
20 CURRENT = LINUX;
21 } else {
22 CURRENT = UNKNOWN;
23 }
24 }
25}

Callers

nothing calls this directly

Calls 2

getPropertyMethod · 0.80
containsMethod · 0.45

Tested by

no test coverage detected