Class OsInfo
- java.lang.Object
-
- com.google.cloud.tools.managedcloudsdk.OsInfo
-
public class OsInfo extends Object
Enum for Operating System detection.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
OsInfo.Architecture
static class
OsInfo.Name
-
Constructor Summary
Constructors Constructor Description OsInfo(OsInfo.Name name, OsInfo.Architecture arch)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description OsInfo.Architecture
arch()
static OsInfo.Architecture
getSystemArchitecture()
static OsInfo
getSystemOsInfo()
Detects and returns the operating system.OsInfo.Name
name()
-
-
-
Constructor Detail
-
OsInfo
public OsInfo(OsInfo.Name name, OsInfo.Architecture arch)
-
-
Method Detail
-
name
public OsInfo.Name name()
-
arch
public OsInfo.Architecture arch()
-
getSystemOsInfo
public static OsInfo getSystemOsInfo() throws UnsupportedOsException
Detects and returns the operating system.- Returns:
- an
OsInfo
representation of the detected OS - Throws:
UnsupportedOsException
- if not Windows, Linux or MacOs
-
getSystemArchitecture
public static OsInfo.Architecture getSystemArchitecture()
-
-