Class Os

java.lang.Object
org.apache.maven.shared.utils.Os

@Deprecated public class Os extends Object
Deprecated.
use org.apache.commons.lang3.SystemUtils instead

Condition that tests the OS type.

Author:
Stefan Bodewig, Magesh Umasankar, Brian Fox, Mark Struberg
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Deprecated.
    OS family that can be tested for.
    static final String
    Deprecated.
    OS family that can be tested for.
    static final String
    Deprecated.
    OS family that can be tested for.
    static final String
    Deprecated.
    OS family that can be tested for.
    static final String
    Deprecated.
    OS family that can be tested for.
    static final String
    Deprecated.
    OS family that can be tested for.
    static final String
    Deprecated.
    OS family that can be tested for.
    static final String
    Deprecated.
    OS family that can be tested for.
    static final String
    Deprecated.
    OS family that can be tested for.
    static final String
    Deprecated.
    OS family that can be tested for.
    static final String
    Deprecated.
    OS family that can be tested for.
    static final String
    Deprecated.
    OS family that can be tested for.
    static final String
    Deprecated.
    System line separator , e.g.
    static final String
    Deprecated.
    The OA architecture.
    static final String
    Deprecated.
    OS Family.
    static final String
    Deprecated.
    The OS Name.
    static final String
    Deprecated.
    The OS version.
    static final String
    Deprecated.
    The path separator.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Os()
    Deprecated.
    Default constructor.
    Os(String family)
    Deprecated.
    Constructor that sets the family attribute.
  • Method Summary

    Modifier and Type
    Method
    Description
    static Set<String>
    Deprecated.
    The set of valid families.
    static boolean
    isArch(String arch)
    Deprecated.
    Determines if the OS on which Ant is executing matches the given OS architecture.
    static boolean
    isFamily(String family)
    Deprecated.
    Determines if the OS on which Ant is executing matches the given OS family.
    static boolean
    isName(String name)
    Deprecated.
    Determines if the OS on which Ant is executing matches the given OS name.
    static boolean
    Deprecated.
    Test if the given family String represents a valid Family.
    static boolean
    isVersion(String version)
    Deprecated.
    Determines if the OS on which Ant is executing matches the given OS version.

    Methods inherited from class java.lang.Object

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

    • OS_NAME

      public static final String OS_NAME
      Deprecated.
      The OS Name.
    • OS_ARCH

      public static final String OS_ARCH
      Deprecated.
      The OA architecture.
    • OS_VERSION

      public static final String OS_VERSION
      Deprecated.
      The OS version.
    • PATH_SEP

      public static final String PATH_SEP
      Deprecated.
      The path separator.
    • LINE_SEP

      public static final String LINE_SEP
      Deprecated.
      System line separator , e.g. "\n" on unixoid systems and "\r\n" on Windows.
    • OS_FAMILY

      public static final String OS_FAMILY
      Deprecated.
      OS Family.
    • FAMILY_WINDOWS

      public static final String FAMILY_WINDOWS
      Deprecated.
      OS family that can be tested for. "windows"
      See Also:
    • FAMILY_WIN9X

      public static final String FAMILY_WIN9X
      Deprecated.
      OS family that can be tested for. "win9x"
      See Also:
    • FAMILY_NT

      public static final String FAMILY_NT
      Deprecated.
      OS family that can be tested for. "winnt"
      See Also:
    • FAMILY_OS2

      public static final String FAMILY_OS2
      Deprecated.
      OS family that can be tested for. "os/2"
      See Also:
    • FAMILY_NETWARE

      public static final String FAMILY_NETWARE
      Deprecated.
      OS family that can be tested for. "netware"
      See Also:
    • FAMILY_DOS

      public static final String FAMILY_DOS
      Deprecated.
      OS family that can be tested for. "dos"
      See Also:
    • FAMILY_MAC

      public static final String FAMILY_MAC
      Deprecated.
      OS family that can be tested for. "mac"
      See Also:
    • FAMILY_TANDEM

      public static final String FAMILY_TANDEM
      Deprecated.
      OS family that can be tested for. "tandem"
      See Also:
    • FAMILY_UNIX

      public static final String FAMILY_UNIX
      Deprecated.
      OS family that can be tested for. "unix"
      See Also:
    • FAMILY_OPENVMS

      public static final String FAMILY_OPENVMS
      Deprecated.
      OS family that can be tested for. "openvms"
      See Also:
    • FAMILY_ZOS

      public static final String FAMILY_ZOS
      Deprecated.
      OS family that can be tested for. "z/os"
      See Also:
    • FAMILY_OS400

      public static final String FAMILY_OS400
      Deprecated.
      OS family that can be tested for. "os/400"
      See Also:
  • Constructor Details

    • Os

      public Os()
      Deprecated.
      Default constructor.
    • Os

      public Os(String family)
      Deprecated.
      Constructor that sets the family attribute.
      Parameters:
      family - a String value
  • Method Details

    • getValidFamilies

      public static Set<String> getValidFamilies()
      Deprecated.
      The set of valid families. This methods initializes the set until VALID_FAMILIES constant is set.
      Returns:
      the set of families
    • isFamily

      public static boolean isFamily(String family)
      Deprecated.
      Determines if the OS on which Ant is executing matches the given OS family.
      Parameters:
      family - the family to check for
      Returns:
      true if the OS matches
    • isName

      public static boolean isName(String name)
      Deprecated.
      Determines if the OS on which Ant is executing matches the given OS name.
      Parameters:
      name - the OS name to check for
      Returns:
      true if the OS matches
    • isArch

      public static boolean isArch(String arch)
      Deprecated.
      Determines if the OS on which Ant is executing matches the given OS architecture.
      Parameters:
      arch - the OS architecture to check for
      Returns:
      true if the OS matches
    • isVersion

      public static boolean isVersion(String version)
      Deprecated.
      Determines if the OS on which Ant is executing matches the given OS version.
      Parameters:
      version - the OS version to check for
      Returns:
      true if the OS matches
    • isValidFamily

      public static boolean isValidFamily(String family)
      Deprecated.
      Test if the given family String represents a valid Family.
      Parameters:
      family - the os family
      Returns:
      true if 'family' represents a valid OS-Family, false otherwise