Class OperatingSystem

java.lang.Object
io.micronaut.security.oauth2.keycloack.v16.OperatingSystem

public class OperatingSystem extends Object
Forked from `spock.util.environment.OperatingSystem`. Provides information on the current operating system, such as its name, version, and family.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
    An operating system family.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the current operating system.
    Returns the family of the operating system.
    Returns the name of the operating system, as returned by the os.name system property.
    Returns the version of the operating system, as returned by the os.version system property.
    boolean
    Tells whether the operating system family is Linux.
    boolean
    Tells whether the operating system family is Mac OS.
    boolean
    Tells whether the operating system family is anything other than those listed above.
    boolean
    Tells whether the operating system family is Solaris.
    boolean
    Tells whether the operating system family is Windows.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • getName

      public String getName()
      Returns the name of the operating system, as returned by the os.name system property.
      Returns:
      the name of the operating system, as returned by the os.name system property
    • getVersion

      public String getVersion()
      Returns the version of the operating system, as returned by the os.version system property.
      Returns:
      the version of the operating system, as returned by the os.version system property
    • getFamily

      public OperatingSystem.Family getFamily()
      Returns the family of the operating system.
      Returns:
      the family of the operating system
    • isLinux

      public boolean isLinux()
      Tells whether the operating system family is Linux.
      Returns:
      whether the operating system family is Linux
    • isMacOs

      public boolean isMacOs()
      Tells whether the operating system family is Mac OS.
      Returns:
      whether the operating system family is Mac OS
    • isWindows

      public boolean isWindows()
      Tells whether the operating system family is Windows.
      Returns:
      whether the operating system family is Windows
    • isSolaris

      public boolean isSolaris()
      Tells whether the operating system family is Solaris.
      Returns:
      whether the operating system family is Solaris
    • isOther

      public boolean isOther()
      Tells whether the operating system family is anything other than those listed above.
      Returns:
      whether the operating system family is anything other than those listed above
    • getCurrent

      public static OperatingSystem getCurrent()
      Returns the current operating system.
      Returns:
      the current operating system