org.codehaus.plexus.util
public class Os extends Object
Since: 1.0
Version: $Revision: 6549 $
Field Summary | |
---|---|
String | arch |
String | family |
static String | FAMILY_DOS |
static String | FAMILY_MAC |
static String | FAMILY_NETWARE |
static String | FAMILY_OPENVMS |
static String | FAMILY_OS2 |
static String | FAMILY_OS400 |
static String | FAMILY_TANDEM |
static String | FAMILY_UNIX |
static String | FAMILY_WIN9X |
static String | FAMILY_WINDOWS |
static String | FAMILY_ZOS |
String | name |
static String | OS_ARCH |
static String | OS_FAMILY |
static String | OS_NAME |
static String | OS_VERSION |
static String | PATH_SEP |
static Set | validFamilies |
String | version |
Constructor Summary | |
---|---|
Os()
Default constructor | |
Os(String family)
Constructor that sets the family attribute
|
Method Summary | |
---|---|
boolean | eval()
Determines if the current OS matches the type of that
set in setFamily.
|
static String | getOsFamily()
Helper method to determine the current OS family.
|
static Set | getValidFamilies() |
static boolean | isArch(String arch)
Determines if the current OS matches the given OS
architecture.
|
static boolean | isFamily(String family)
Determines if the current OS matches the given OS
family.
|
static boolean | isName(String name)
Determines if the current OS matches the given OS
name.
|
static boolean | isOs(String family, String name, String arch, String version)
Determines if the current OS matches the given OS
family, name, architecture and version.
|
static boolean | isValidFamily(String theFamily)
Helper method to check if the given family is in the
following list:
|
static boolean | isVersion(String version)
Determines if the current OS matches the given OS
version.
|
void | setArch(String arch)
Sets the desired OS architecture
|
void | setFamily(String f)
Sets the desired OS family type
|
void | setName(String name)
Sets the desired OS name
|
static Set | setValidFamilies()
Initializes the set of valid families. |
void | setVersion(String version)
Sets the desired OS version
|
Parameters: family a String value
See Also: setFamily
Returns: name of current OS family.
Since: 1.4.2
Returns: a copy of the valid families
Since: 1.4.2
Parameters: arch the OS architecture to check for
Returns: true if the OS matches
Since: 1.0
Parameters: family the family to check for
Returns: true if the OS matches
Since: 1.0
Parameters: name the OS name to check for
Returns: true if the OS matches
Since: 1.0
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.0
Parameters: theFamily the family to check.
Returns: true if one of the valid families.
Since: 1.4.2
Parameters: version the OS version to check for
Returns: true if the OS matches
Since: 1.0
Parameters: arch The OS architecture
Parameters: f The OS family type desired
Possible values:
Parameters: name The OS name
Parameters: version The OS version