jfun.util.os
Class Os

java.lang.Object
  extended by jfun.util.os.Os

public class Os
extends java.lang.Object

Os specific information. Used to eliminate platform sensitivity. A copy-paste-change from Ant.

Zephyr Business Solution

Author:
Ben Yu

Constructor Summary
Os()
           
 
Method Summary
static boolean isArch(java.lang.String arch)
          Determines if the OS on which Ant is executing matches the given OS architecture.
static boolean isFamily(java.lang.String family)
          Determines if the OS on which Ant is executing matches the given OS family.
static boolean isName(java.lang.String name)
          Determines if the OS on which Ant is executing matches the given OS name.
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
static boolean isVersion(java.lang.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
 

Constructor Detail

Os

public Os()
Method Detail

isFamily

public 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

isName

public 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

isArch

public 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

isVersion

public 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

isOs

public 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