Class Os


  • @Deprecated
    public class Os
    extends java.lang.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 java.lang.String FAMILY_DOS
      Deprecated.
      OS family that can be tested for.
      static java.lang.String FAMILY_MAC
      Deprecated.
      OS family that can be tested for.
      static java.lang.String FAMILY_NETWARE
      Deprecated.
      OS family that can be tested for.
      static java.lang.String FAMILY_NT
      Deprecated.
      OS family that can be tested for.
      static java.lang.String FAMILY_OPENVMS
      Deprecated.
      OS family that can be tested for.
      static java.lang.String FAMILY_OS2
      Deprecated.
      OS family that can be tested for.
      static java.lang.String FAMILY_OS400
      Deprecated.
      OS family that can be tested for.
      static java.lang.String FAMILY_TANDEM
      Deprecated.
      OS family that can be tested for.
      static java.lang.String FAMILY_UNIX
      Deprecated.
      OS family that can be tested for.
      static java.lang.String FAMILY_WIN9X
      Deprecated.
      OS family that can be tested for.
      static java.lang.String FAMILY_WINDOWS
      Deprecated.
      OS family that can be tested for.
      static java.lang.String FAMILY_ZOS
      Deprecated.
      OS family that can be tested for.
      static java.lang.String LINE_SEP
      Deprecated.
      System line separator , e.g.
      static java.lang.String OS_ARCH
      Deprecated.
      The OA architecture.
      static java.lang.String OS_FAMILY
      Deprecated.
      OS Family.
      static java.lang.String OS_NAME
      Deprecated.
      The OS Name.
      static java.lang.String OS_VERSION
      Deprecated.
      The OS version.
      static java.lang.String PATH_SEP
      Deprecated.
      The path separator.
    • Constructor Summary

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

      All Methods Static Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      static java.util.Set<java.lang.String> getValidFamilies()
      Deprecated.
      The set of valid families.
      static boolean isArch​(java.lang.String arch)
      Deprecated.
      Determines if the OS on which Ant is executing matches the given OS architecture.
      static boolean isFamily​(java.lang.String family)
      Deprecated.
      Determines if the OS on which Ant is executing matches the given OS family.
      static boolean isName​(java.lang.String name)
      Deprecated.
      Determines if the OS on which Ant is executing matches the given OS name.
      static boolean isValidFamily​(java.lang.String family)
      Deprecated.
      Test if the given family String represents a valid Family.
      static boolean isVersion​(java.lang.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 Detail

      • OS_NAME

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        public static final java.lang.String FAMILY_OS400
        Deprecated.
        OS family that can be tested for. "os/400"
        See Also:
        Constant Field Values
    • Constructor Detail

      • Os

        public Os()
        Deprecated.
        Default constructor.
      • Os

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

      • getValidFamilies

        public static java.util.Set<java.lang.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​(java.lang.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​(java.lang.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​(java.lang.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​(java.lang.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​(java.lang.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