Package org.apache.commons.exec
Class OS
java.lang.Object
org.apache.commons.exec.OS
Condition that tests the OS type.
- Version:
- $Id: OS.java 1556869 2014-01-09 16:51:11Z britter $
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
Determines if the OS on which Ant is executing matches the given OS architecture.private static boolean
Determines if the OS on which Ant is executing matches the given OS family.static boolean
static boolean
static boolean
static boolean
static boolean
static boolean
static boolean
static boolean
static boolean
static boolean
static boolean
static boolean
Determines if the OS on which Ant is executing matches the given OS name.static boolean
Determines if the OS on which Ant is executing matches the given OS family, name, architecture and versionstatic boolean
Determines if the OS on which Ant is executing matches the given OS version.
-
Field Details
-
FAMILY_OS_400
- See Also:
-
FAMILY_Z_OS
- See Also:
-
FAMILY_WIN9X
- See Also:
-
FAMILY_OPENVMS
- See Also:
-
FAMILY_UNIX
- See Also:
-
FAMILY_TANDEM
- See Also:
-
FAMILY_MAC
- See Also:
-
FAMILY_DOS
- See Also:
-
FAMILY_NETWARE
- See Also:
-
FAMILY_OS_2
- See Also:
-
FAMILY_WINDOWS
- See Also:
-
OS_NAME
-
OS_ARCH
-
OS_VERSION
-
PATH_SEP
-
-
Constructor Details
-
OS
private OS()Default constructor
-
-
Method Details
-
isFamily
Determines if the OS on which Ant is executing matches the given OS family. * Possible values:
- dos
- mac
- netware
- os/2
- tandem
- unix
- windows
- win9x
- z/os
- os/400
- Parameters:
family
- the family to check for- Returns:
- true if the OS matches
-
isFamilyDOS
public static boolean isFamilyDOS() -
isFamilyMac
public static boolean isFamilyMac() -
isFamilyNetware
public static boolean isFamilyNetware() -
isFamilyOS2
public static boolean isFamilyOS2() -
isFamilyTandem
public static boolean isFamilyTandem() -
isFamilyUnix
public static boolean isFamilyUnix() -
isFamilyWindows
public static boolean isFamilyWindows() -
isFamilyWin9x
public static boolean isFamilyWin9x() -
isFamilyZOS
public static boolean isFamilyZOS() -
isFamilyOS400
public static boolean isFamilyOS400() -
isFamilyOpenVms
public static boolean isFamilyOpenVms() -
isName
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
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
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
-
isOs
Determines if the OS on which Ant is executing matches the given OS family, name, architecture and version- Parameters:
family
- The OS familyname
- The OS namearch
- The OS architectureversion
- The OS version- Returns:
- true if the OS matches
-