org.apache.tools.ant.taskdefs.condition
public class Os extends Object implements Condition
Since: Ant 1.4
Field Summary | |
---|---|
static String | FAMILY_9X
OS family that can be tested for. |
static String | FAMILY_DOS
OS family that can be tested for. |
static String | FAMILY_MAC
OS family that can be tested for. |
static String | FAMILY_NETWARE
OS family that can be tested for. |
static String | FAMILY_NT
OS family that can be tested for. |
static String | FAMILY_OS2
OS family that can be tested for. |
static String | FAMILY_OS400 OS family that can be tested for. |
static String | FAMILY_TANDEM
OS family that can be tested for. |
static String | FAMILY_UNIX
OS family that can be tested for. |
static String | FAMILY_VMS
OS family that can be tested for. |
static String | FAMILY_WINDOWS
OS family that can be tested for. |
static String | FAMILY_ZOS
OS family that can be tested for. |
Constructor Summary | |
---|---|
Os()
Default constructor
| |
Os(String family)
Constructor that sets the family attribute |
Method Summary | |
---|---|
boolean | eval()
Determines if the OS on which Ant is executing matches the type of
that set in setFamily. |
static boolean | isArch(String arch)
Determines if the OS on which Ant is executing matches the
given OS architecture.
|
static boolean | isFamily(String family)
Determines if the OS on which Ant is executing matches the
given OS family. |
static boolean | isName(String name)
Determines if the OS on which Ant is executing matches the
given OS name.
|
static boolean | isOs(String family, String name, String arch, String version)
Determines if the OS on which Ant is executing matches the
given OS family, name, architecture and version
|
static boolean | isVersion(String version)
Determines if the OS on which Ant is executing matches the
given OS version.
|
void | setArch(String arch)
Sets the desired OS architecture
|
void | setFamily(String f)
Sets the desired OS family type
|
void | setName(String name)
Sets the desired OS name
|
void | setVersion(String version)
Sets the desired OS version
|
Parameters: family a String value
Returns: true if the os matches.
Throws: BuildException if there is an error.
See Also: setFamily
Parameters: arch the OS architecture to check for
Returns: true if the OS matches
Since: 1.7
Parameters: family the family to check for
Returns: true if the OS matches
Since: 1.5
Parameters: name the OS name to check for
Returns: true if the OS matches
Since: 1.7
Parameters: family The OS family name The OS name arch The OS architecture version The OS version
Returns: true if the OS matches
Since: 1.7
Parameters: version the OS version to check for
Returns: true if the OS matches
Since: 1.7
Parameters: arch The OS architecture
Parameters: f The OS family type desired
Possible values:
Parameters: name The OS name
Parameters: version The OS version