Class Os
java.lang.Object
org.apache.tools.ant.taskdefs.condition.Os
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringOS family that can be tested for.static final StringOS family that can be tested for.static final StringOS family that can be tested for.static final StringOS family that can be tested for.static final StringOS family that can be tested for.static final StringOS family that can be tested for.static final StringOS family that can be tested for.static final StringOS family that can be tested for.static final StringOS family that can be tested for.static final StringOS family that can be tested for.static final StringOS family that can be tested for.static final StringOS family that can be tested for. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleaneval()Determines if the OS on which Ant is executing matches the type of that set in setFamily.static booleanDetermines if the OS on which Ant is executing matches the given OS architecture.static booleanDetermines if the OS on which Ant is executing matches the given OS family.static booleanDetermines if the OS on which Ant is executing matches the given OS name.static booleanDetermines if the OS on which Ant is executing matches the given OS family, name, architecture and versionstatic booleanDetermines if the OS on which Ant is executing matches the given OS version.voidSets the desired OS architecturevoidSets the desired OS family typevoidSets the desired OS namevoidsetVersion(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:
evalin 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
-