MCPcopy Create free account
hub / github.com/JetBrains/skija / Platform

Enum Platform

shared/java/impl/Platform.java:5–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3import org.jetbrains.annotations.*;
4
5public enum Platform {
6 WINDOWS,
7 LINUX,
8 MACOS_X64,
9 MACOS_ARM64;
10
11 @ApiStatus.Internal public static final Platform[] _values = values();
12
13 public static final Platform CURRENT;
14
15 static {
16 String os = System.getProperty("os.name").toLowerCase();
17 if (os.contains("mac") || os.contains("darwin")) {
18 if ("aarch64".equals(System.getProperty("os.arch")))
19 CURRENT = MACOS_ARM64;
20 else
21 CURRENT = MACOS_X64;
22 } else if (os.contains("windows"))
23 CURRENT = WINDOWS;
24 else if (os.contains("nux") || os.contains("nix"))
25 CURRENT = LINUX;
26 else
27 throw new RuntimeException("Unsupported platform: " + os);
28 }
29}

Callers

nothing calls this directly

Calls 3

getPropertyMethod · 0.80
containsMethod · 0.45
equalsMethod · 0.45

Tested by

no test coverage detected