Class Os
java.lang.Object
org.apache.tools.ant.taskdefs.condition.Os
- All Implemented Interfaces:
- Condition
Condition that tests the OS type.
- Since:
- Ant 1.4
- 
Field SummaryFieldsModifier 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 SummaryConstructors
- 
Method SummaryModifier 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_WINDOWSOS family that can be tested for. "windows"- See Also:
 
- 
FAMILY_9XOS family that can be tested for. "win9x"- See Also:
 
- 
FAMILY_NTOS family that can be tested for. "winnt"- See Also:
 
- 
FAMILY_OS2OS family that can be tested for. "os/2"- See Also:
 
- 
FAMILY_NETWAREOS family that can be tested for. "netware"- See Also:
 
- 
FAMILY_DOSOS family that can be tested for. "dos"- See Also:
 
- 
FAMILY_MACOS family that can be tested for. "mac"- See Also:
 
- 
FAMILY_TANDEMOS family that can be tested for. "tandem"- See Also:
 
- 
FAMILY_UNIXOS family that can be tested for. "unix"- See Also:
 
- 
FAMILY_VMSOS family that can be tested for. "openvms"- See Also:
 
- 
FAMILY_ZOSOS family that can be tested for. "z/os"- See Also:
 
- 
FAMILY_OS400OS family that can be tested for. "os/400"- See Also:
 
 
- 
- 
Constructor Details- 
Ospublic Os()Default constructor
- 
OsConstructor that sets the family attribute- Parameters:
- family- a String value
 
 
- 
- 
Method Details- 
setFamilySets the desired OS family type- Parameters:
- f- The OS family type desired- Possible values: - dos
- mac
- netware
- os/2
- tandem
- unix
- windows
- win9x
- z/os
- os/400
 
 
- 
setNameSets the desired OS name- Parameters:
- name- The OS name
 
- 
setArchSets the desired OS architecture- Parameters:
- arch- The OS architecture
 
- 
setVersionSets the desired OS version- Parameters:
- version- The OS version
 
- 
evalDetermines if the OS on which Ant is executing matches the type of that set in setFamily.- Specified by:
- evalin interface- Condition
- Returns:
- true if the os matches.
- Throws:
- BuildException- if there is an error.
- See Also:
 
- 
isFamilyDetermines 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
 
- 
isNameDetermines 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
 
- 
isArchDetermines 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
 
- 
isVersionDetermines 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
 
- 
isOsDetermines if the OS on which Ant is executing matches the given OS family, name, architecture and version- 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
 
 
-