Modifier and Type | Field and Description |
---|---|
static java.lang.String |
FAMILY_9X
OS family that can be tested for.
|
static java.lang.String |
FAMILY_DOS
OS family that can be tested for.
|
static java.lang.String |
FAMILY_MAC
OS family that can be tested for.
|
static java.lang.String |
FAMILY_NETWARE
OS family that can be tested for.
|
static java.lang.String |
FAMILY_NT
OS family that can be tested for.
|
static java.lang.String |
FAMILY_OS2
OS family that can be tested for.
|
static java.lang.String |
FAMILY_OS400
OS family that can be tested for.
|
static java.lang.String |
FAMILY_TANDEM
OS family that can be tested for.
|
static java.lang.String |
FAMILY_UNIX
OS family that can be tested for.
|
static java.lang.String |
FAMILY_VMS
OS family that can be tested for.
|
static java.lang.String |
FAMILY_WINDOWS
OS family that can be tested for.
|
static java.lang.String |
FAMILY_ZOS
OS family that can be tested for.
|
Constructor and Description |
---|
Os()
Default constructor
|
Os(java.lang.String family)
Constructor that sets the family attribute
|
Modifier and Type | Method and Description |
---|---|
boolean |
eval()
Determines if the OS on which Ant is executing matches the type of
that set in setFamily.
|
static boolean |
isArch(java.lang.String arch)
Determines if the OS on which Ant is executing matches the
given OS architecture.
|
static boolean |
isFamily(java.lang.String family)
Determines if the OS on which Ant is executing matches the
given OS family.
|
static boolean |
isName(java.lang.String name)
Determines if the OS on which Ant is executing matches the
given OS name.
|
static boolean |
isOs(java.lang.String family,
java.lang.String name,
java.lang.String arch,
java.lang.String version)
Determines if the OS on which Ant is executing matches the
given OS family, name, architecture and version
|
static boolean |
isVersion(java.lang.String version)
Determines if the OS on which Ant is executing matches the
given OS version.
|
void |
setArch(java.lang.String arch)
Sets the desired OS architecture
|
void |
setFamily(java.lang.String f)
Sets the desired OS family type
|
void |
setName(java.lang.String name)
Sets the desired OS name
|
void |
setVersion(java.lang.String version)
Sets the desired OS version
|
public static final java.lang.String FAMILY_WINDOWS
public static final java.lang.String FAMILY_9X
public static final java.lang.String FAMILY_NT
public static final java.lang.String FAMILY_OS2
public static final java.lang.String FAMILY_NETWARE
public static final java.lang.String FAMILY_DOS
public static final java.lang.String FAMILY_MAC
public static final java.lang.String FAMILY_TANDEM
public static final java.lang.String FAMILY_UNIX
public static final java.lang.String FAMILY_VMS
public static final java.lang.String FAMILY_ZOS
public static final java.lang.String FAMILY_OS400
public Os()
public Os(java.lang.String family)
family
- a String valuepublic void setFamily(java.lang.String f)
f
- The OS family type desiredpublic void setName(java.lang.String name)
name
- The OS namepublic void setArch(java.lang.String arch)
arch
- The OS architecturepublic void setVersion(java.lang.String version)
version
- The OS versionpublic boolean eval() throws BuildException
eval
in interface Condition
BuildException
- if there is an error.setFamily(String)
public static boolean isFamily(java.lang.String family)
family
- the family to check forpublic static boolean isName(java.lang.String name)
name
- the OS name to check forpublic static boolean isArch(java.lang.String arch)
arch
- the OS architecture to check forpublic static boolean isVersion(java.lang.String version)
version
- the OS version to check forpublic static boolean isOs(java.lang.String family, java.lang.String name, java.lang.String arch, java.lang.String version)
family
- The OS familyname
- The OS namearch
- The OS architectureversion
- The OS version