|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.plexus.util.Os
public class Os
Condition that tests the OS type.
Field Summary | |
---|---|
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
|
static String |
OS_ARCH
|
static String |
OS_FAMILY
|
static String |
OS_NAME
|
static String |
OS_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 Set<String> |
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: dos mac netware os/2 tandem unix windows win9x z/os os/400 openvms |
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 |
void |
setVersion(String version)
Sets the desired OS version |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String FAMILY_DOS
public static final String FAMILY_MAC
public static final String FAMILY_NETWARE
public static final String FAMILY_OS2
public static final String FAMILY_TANDEM
public static final String FAMILY_UNIX
public static final String FAMILY_WINDOWS
public static final String FAMILY_WIN9X
public static final String FAMILY_ZOS
public static final String FAMILY_OS400
public static final String FAMILY_OPENVMS
public static final String OS_NAME
public static final String OS_ARCH
public static final String OS_VERSION
public static final String OS_FAMILY
Constructor Detail |
---|
public Os()
public Os(String family)
family
- a String valueMethod Detail |
---|
public void setFamily(String f)
f
- The OS family type desiredpublic void setName(String name)
name
- The OS namepublic void setArch(String arch)
arch
- The OS architecturepublic void setVersion(String version)
version
- The OS versionpublic boolean eval() throws Exception
Exception
setFamily(String)
public static boolean isFamily(String family)
family
- the family to check for
public static boolean isName(String name)
name
- the OS name to check for
public static boolean isArch(String arch)
arch
- the OS architecture to check for
public static boolean isVersion(String version)
version
- the OS version to check for
public static boolean isOs(String family, String name, String arch, String version)
family
- The OS familyname
- The OS namearch
- The OS architectureversion
- The OS version
public static boolean isValidFamily(String theFamily)
theFamily
- the family to check.
public static Set<String> getValidFamilies()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |