org.apache.tools.ant.taskdefs.condition
Class Os
java.lang.Object
org.apache.tools.ant.taskdefs.condition.Os
- Condition
public class Os
extends java.lang.Object
Condition that tests the OS type.
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.
|
Os() - Default constructor
|
Os(String family) - Constructor that sets the family attribute
|
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
|
FAMILY_9X
public static final String FAMILY_9X
OS family that can be tested for.
FAMILY_DOS
public static final String FAMILY_DOS
OS family that can be tested for.
FAMILY_MAC
public static final String FAMILY_MAC
OS family that can be tested for.
FAMILY_NETWARE
public static final String FAMILY_NETWARE
OS family that can be tested for.
FAMILY_NT
public static final String FAMILY_NT
OS family that can be tested for.
FAMILY_OS2
public static final String FAMILY_OS2
OS family that can be tested for.
FAMILY_OS400
public static final String FAMILY_OS400
OS family that can be tested for.
FAMILY_TANDEM
public static final String FAMILY_TANDEM
OS family that can be tested for.
FAMILY_UNIX
public static final String FAMILY_UNIX
OS family that can be tested for.
FAMILY_VMS
public static final String FAMILY_VMS
OS family that can be tested for.
FAMILY_WINDOWS
public static final String FAMILY_WINDOWS
OS family that can be tested for.
FAMILY_ZOS
public static final String FAMILY_ZOS
OS family that can be tested for.
Os
public Os()
Default constructor
Os
public Os(String family)
Constructor that sets the family attribute
eval
public boolean eval()
throws BuildException
Determines if the OS on which Ant is executing matches the type of
that set in setFamily.
- eval in interface Condition
isArch
public static boolean isArch(String arch)
Determines if the OS on which Ant is executing matches the
given OS architecture.
arch
- the OS architecture to check for
isFamily
public static boolean isFamily(String family)
Determines if the OS on which Ant is executing matches the
given OS family.
family
- the family to check for
isName
public static boolean isName(String name)
Determines if the OS on which Ant is executing matches the
given OS name.
name
- the OS name to check for
isOs
public 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
family
- The OS familyname
- The OS namearch
- The OS architectureversion
- The OS version
isVersion
public static boolean isVersion(String version)
Determines if the OS on which Ant is executing matches the
given OS version.
version
- the OS version to check for
setArch
public void setArch(String arch)
Sets the desired OS architecture
arch
- The OS architecture
setFamily
public void setFamily(String f)
Sets the desired OS family type
f
- The OS family type desired
Possible values:
- dos
- mac
- netware
- os/2
- tandem
- unix
- windows
- win9x
- z/os
- os/400
setName
public void setName(String name)
Sets the desired OS name
setVersion
public void setVersion(String version)
Sets the desired OS version