Class Os
- java.lang.Object
- 
- org.apache.tools.ant.taskdefs.condition.Os
 
- 
- 
Field SummaryFields Modifier and Type Field Description static java.lang.StringFAMILY_9XOS family that can be tested for.static java.lang.StringFAMILY_DOSOS family that can be tested for.static java.lang.StringFAMILY_MACOS family that can be tested for.static java.lang.StringFAMILY_NETWAREOS family that can be tested for.static java.lang.StringFAMILY_NTOS family that can be tested for.static java.lang.StringFAMILY_OS2OS family that can be tested for.static java.lang.StringFAMILY_OS400OS family that can be tested for.static java.lang.StringFAMILY_TANDEMOS family that can be tested for.static java.lang.StringFAMILY_UNIXOS family that can be tested for.static java.lang.StringFAMILY_VMSOS family that can be tested for.static java.lang.StringFAMILY_WINDOWSOS family that can be tested for.static java.lang.StringFAMILY_ZOSOS family that can be tested for.
 - 
Method SummaryModifier and Type Method Description booleaneval()Determines if the OS on which Ant is executing matches the type of that set in setFamily.static booleanisArch(java.lang.String arch)Determines if the OS on which Ant is executing matches the given OS architecture.static booleanisFamily(java.lang.String family)Determines if the OS on which Ant is executing matches the given OS family.static booleanisName(java.lang.String name)Determines if the OS on which Ant is executing matches the given OS name.static booleanisOs(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 versionstatic booleanisVersion(java.lang.String version)Determines if the OS on which Ant is executing matches the given OS version.voidsetArch(java.lang.String arch)Sets the desired OS architecturevoidsetFamily(java.lang.String f)Sets the desired OS family typevoidsetName(java.lang.String name)Sets the desired OS namevoidsetVersion(java.lang.String version)Sets the desired OS version
 
- 
- 
- 
Field Detail- 
FAMILY_WINDOWSpublic static final java.lang.String FAMILY_WINDOWS OS family that can be tested for. "windows"- See Also:
- Constant Field Values
 
 - 
FAMILY_9Xpublic static final java.lang.String FAMILY_9X OS family that can be tested for. "win9x"- See Also:
- Constant Field Values
 
 - 
FAMILY_NTpublic static final java.lang.String FAMILY_NT OS family that can be tested for. "winnt"- See Also:
- Constant Field Values
 
 - 
FAMILY_OS2public static final java.lang.String FAMILY_OS2 OS family that can be tested for. "os/2"- See Also:
- Constant Field Values
 
 - 
FAMILY_NETWAREpublic static final java.lang.String FAMILY_NETWARE OS family that can be tested for. "netware"- See Also:
- Constant Field Values
 
 - 
FAMILY_DOSpublic static final java.lang.String FAMILY_DOS OS family that can be tested for. "dos"- See Also:
- Constant Field Values
 
 - 
FAMILY_MACpublic static final java.lang.String FAMILY_MAC OS family that can be tested for. "mac"- See Also:
- Constant Field Values
 
 - 
FAMILY_TANDEMpublic static final java.lang.String FAMILY_TANDEM OS family that can be tested for. "tandem"- See Also:
- Constant Field Values
 
 - 
FAMILY_UNIXpublic static final java.lang.String FAMILY_UNIX OS family that can be tested for. "unix"- See Also:
- Constant Field Values
 
 - 
FAMILY_VMSpublic static final java.lang.String FAMILY_VMS OS family that can be tested for. "openvms"- See Also:
- Constant Field Values
 
 - 
FAMILY_ZOSpublic static final java.lang.String FAMILY_ZOS OS family that can be tested for. "z/os"- See Also:
- Constant Field Values
 
 - 
FAMILY_OS400public static final java.lang.String FAMILY_OS400 OS family that can be tested for. "os/400"- See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
setFamilypublic void setFamily(java.lang.String f) Sets 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
 
 
 - 
setNamepublic void setName(java.lang.String name) Sets the desired OS name- Parameters:
- name- The OS name
 
 - 
setArchpublic void setArch(java.lang.String arch) Sets the desired OS architecture- Parameters:
- arch- The OS architecture
 
 - 
setVersionpublic void setVersion(java.lang.String version) Sets the desired OS version- Parameters:
- version- The OS version
 
 - 
evalpublic boolean eval() throws BuildExceptionDetermines 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:
- setFamily(String)
 
 - 
isFamilypublic static boolean isFamily(java.lang.String family) 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
 
 - 
isNamepublic static boolean isName(java.lang.String name) 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
 
 - 
isArchpublic static boolean isArch(java.lang.String arch) 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
 
 - 
isVersionpublic static boolean isVersion(java.lang.String version) 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
 
 - 
isOspublic 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- 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
 
 
- 
 
-