MCPcopy Create free account
hub / github.com/5zig/The-5zig-Mod / getPlatform

Method getPlatform

Utils/src/eu/the5zig/util/Utils.java:637–648  ·  view source on GitHub ↗

Gets the current Platform of the Client. @return the current Platform of the Client.

()

Source from the content-addressed store, hash-verified

635 * @return the current Platform of the Client.
636 */
637 public static Platform getPlatform() {
638 String osName = getOSName().toLowerCase(Locale.ROOT);
639 if (osName.contains("win"))
640 return Platform.WINDOWS;
641 if (osName.contains("mac"))
642 return Platform.MAC;
643 if (osName.contains("linux") || osName.contains("sunos") || osName.contains("unix"))
644 return Platform.LINUX;
645 if (osName.contains("solaris"))
646 return Platform.SOLARIS;
647 return Platform.UNKNOWN;
648 }
649
650 /**
651 * Merges two Arrays.

Callers 15

getJavaExecutableMethod · 0.95
VariablesMethod · 0.95
VariablesMethod · 0.95
VariablesMethod · 0.95
VariablesMethod · 0.95
VariablesMethod · 0.95
VariablesMethod · 0.95
VariablesMethod · 0.95
VariablesMethod · 0.95
VariablesMethod · 0.95
VariablesMethod · 0.95
VariablesMethod · 0.95

Calls 2

getOSNameMethod · 0.95
containsMethod · 0.45

Tested by

no test coverage detected