Class Os
java.lang.Object
org.apache.tools.ant.taskdefs.condition.Os
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
OS family that can be tested for.static final String
OS family that can be tested for.static final String
OS family that can be tested for.static final String
OS family that can be tested for.static final String
OS family that can be tested for.static final String
OS family that can be tested for.static final String
OS family that can be tested for.static final String
OS family that can be tested for.static final String
OS family that can be tested for.static final String
OS family that can be tested for.static final String
OS family that can be tested for.static final String
OS family that can be tested for. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
eval()
Determines if the OS on which Ant is executing matches the type of that set in setFamily.static boolean
Determines if the OS on which Ant is executing matches the given OS architecture.static boolean
Determines if the OS on which Ant is executing matches the given OS family.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.void
Sets the desired OS architecturevoid
Sets the desired OS family typevoid
Sets the desired OS namevoid
setVersion
(String version) Sets the desired OS version
-
Field Details
-
FAMILY_WINDOWS
-
FAMILY_9X
-
FAMILY_NT
-
FAMILY_OS2
-
FAMILY_NETWARE
-
FAMILY_DOS
-
FAMILY_MAC
-
FAMILY_TANDEM
-
FAMILY_UNIX
-
FAMILY_VMS
-
FAMILY_ZOS
-
FAMILY_OS400
-
-
Constructor Details
-
Os
public Os()Default constructor -
Os
Constructor that sets the family attribute- Parameters:
family
- a String value
-
-
Method Details
-
setFamily
Sets the desired OS family type- Parameters:
f
- The OS family type desiredPossible values:
- dos
- mac
- netware
- os/2
- tandem
- unix
- windows
- win9x
- z/os
- os/400
-
setName
-
setArch
Sets the desired OS architecture- Parameters:
arch
- The OS architecture
-
setVersion
Sets the desired OS version- Parameters:
version
- The OS version
-
eval
Determines if the OS on which Ant is executing matches the type of that set in setFamily.- Specified by:
eval
in interfaceCondition
- Returns:
- true if the os matches.
- Throws:
BuildException
- if there is an error.- See Also:
-
isFamily
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
- Since:
- 1.5
-
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
- Since:
- 1.7
-
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
- Since:
- 1.7
-
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
- Since:
- 1.7
-
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
- Since:
- 1.7
-