org.apache.geronimo.kernel.config
Class Os

java.lang.Object
  extended by org.apache.geronimo.kernel.config.Os

public class Os
extends Object

Condition that tests the OS type.


Field Summary
static String FAMILY_9X
          OS family that can be tested for.
static String FAMILY_DOS
          OS family that can be tested for.
static String FAMILY_MAC
          OS family that can be tested for.
static String FAMILY_NETWARE
          OS family that can be tested for.
static String FAMILY_NT
          OS family that can be tested for.
static String FAMILY_OS2
          OS family that can be tested for.
static String FAMILY_OS400
          OS family that can be tested for.
static String FAMILY_TANDEM
          OS family that can be tested for.
static String FAMILY_UNIX
          OS family that can be tested for.
static String FAMILY_VMS
          OS family that can be tested for.
static String FAMILY_WINDOWS
          OS family that can be tested for.
static String FAMILY_ZOS
          OS family that can be tested for.
 
Method Summary
static boolean isArch(String arch)
          Determines if the OS on which Ant is executing matches the given OS architecture.
static boolean isFamily(String family)
          Determines if the OS on which Ant is executing matches the given OS family.
static boolean isName(String name)
          Determines if the OS on which Ant is executing matches the given OS name.
static boolean isOs(String family, String name, String arch, String version)
          Determines if the OS on which Ant is executing matches the given OS family, name, architecture and version
static boolean isVersion(String version)
          Determines if the OS on which Ant is executing matches the given OS version.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FAMILY_WINDOWS

public static final String FAMILY_WINDOWS
OS family that can be tested for. "windows"

See Also:
Constant Field Values

FAMILY_9X

public static final String FAMILY_9X
OS family that can be tested for. "win9x"

See Also:
Constant Field Values

FAMILY_NT

public static final String FAMILY_NT
OS family that can be tested for. "winnt"

See Also:
Constant Field Values

FAMILY_OS2

public static final String FAMILY_OS2
OS family that can be tested for. "os/2"

See Also:
Constant Field Values

FAMILY_NETWARE

public static final String FAMILY_NETWARE
OS family that can be tested for. "netware"

See Also:
Constant Field Values

FAMILY_DOS

public static final String FAMILY_DOS
OS family that can be tested for. "dos"

See Also:
Constant Field Values

FAMILY_MAC

public static final String FAMILY_MAC
OS family that can be tested for. "mac"

See Also:
Constant Field Values

FAMILY_TANDEM

public static final String FAMILY_TANDEM
OS family that can be tested for. "tandem"

See Also:
Constant Field Values

FAMILY_UNIX

public static final String FAMILY_UNIX
OS family that can be tested for. "unix"

See Also:
Constant Field Values

FAMILY_VMS

public static final String FAMILY_VMS
OS family that can be tested for. "openvms"

See Also:
Constant Field Values

FAMILY_ZOS

public static final String FAMILY_ZOS
OS family that can be tested for. "z/os"

See Also:
Constant Field Values

FAMILY_OS400

public static final String FAMILY_OS400
OS family that can be tested for. "os/400"

See Also:
Constant Field Values
Method Detail

isFamily

public static boolean isFamily(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

isName

public static boolean isName(String name)
Determines if the OS on which Ant is executing matches the given OS name.

Parameters:
name - The OS family type desired
Possible values:
  • dos
  • mac
  • netware
  • os/2
  • tandem
  • unix
  • windows
  • win9x
  • z/os
  • os/400
Returns:
true if the OS matches
Since:
1.7

isArch

public static boolean isArch(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

isVersion

public static boolean isVersion(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

isOs

public static boolean isOs(String family,
                           String name,
                           String arch,
                           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


Copyright © 2006 Apache Software Foundation. All Rights Reserved.