Package io.micronaut.context.condition
Class OperatingSystem
- java.lang.Object
-
- io.micronaut.context.condition.OperatingSystem
-
public final class OperatingSystem extends java.lang.ObjectDetails of the current operating system.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static OperatingSystemgetCurrent()Resolves and returns the current operating system.Requires.FamilygetFamily()booleanisLinux()booleanisMacOs()booleanisSolaris()booleanisWindows()
-
-
-
Method Detail
-
getCurrent
public static OperatingSystem getCurrent()
Resolves and returns the current operating system.- Returns:
- the current operating system.
-
isLinux
public boolean isLinux()
- Returns:
trueif the current operating system is in the Linux family.
-
isWindows
public boolean isWindows()
- Returns:
trueif the current operating system is in the Windows family.
-
isMacOs
public boolean isMacOs()
- Returns:
trueif the current operating system is in the Mac OS family.
-
isSolaris
public boolean isSolaris()
- Returns:
trueif the current operating system is in the Solaris family.
-
getFamily
public Requires.Family getFamily()
- Returns:
- The OS family
-
-