|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.plumtree.openfoundation.platform.XPVendor
public class XPVendor
Enumerated ordinal type for VM vendor. On Java, this is the JVM vendor (Sun, IBM, BEA); on .NET, this is the CLR vendor (currently just Microsoft).
The purpose of this class is to allow you to make assertions based on which vendor you're currently using. It allows you to write code like this:
XPVendor v = XPVendor.GetVendor(); if(v.equals(XPVendor.BEA)) { // ...You can also use it to get the full name of the vendor as specified by the VM vendor itself, using the GetFullName() method.
Field Summary | |
---|---|
static XPVendor |
BEA
Predefined VM vendor for beaJRE. |
static XPVendor |
IBM
Predefined VM vendor for ibmJRE. |
int |
m_id
ID for each XPVendor instance. |
java.lang.String |
m_name
Short name of platform. |
static java.lang.String |
m_realName
Vendor name for current OS using JVM's 'java.vendor' system property. |
static XPVendor |
MICROSOFT
Predefined VM vendor for .NET. |
static XPVendor[] |
platformList
Array of predefined XPVendor objects. |
static XPVendor |
SUN
Predefined VM vendor for sunJRE. |
static XPVendor |
UNKNOWN
Predefined VM vendor for unknown platform. |
Constructor Summary | |
---|---|
protected |
XPVendor()
|
Method Summary | |
---|---|
protected static XPVendor |
computeVendor(java.lang.String vendor)
Create JVM's vendor object using vendors' name. |
boolean |
equals(XPVendor vendor)
Compare if two objects represent the same vendor using their ID's. |
static java.lang.String |
GetFullName()
Returns the full name of the JRE/CLR vendor. |
java.lang.String |
GetName()
Return XPVendor object's platform name. |
static XPVendor |
GetVendor()
Returns the vendor object corresponding to the current VM vendor. |
static XPVendor |
GetVendor(int id)
Gets vendor by ID. |
static java.lang.String |
GetVersion()
Returns the name of the version of the JRE/CLR. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public int m_id
public static java.lang.String m_realName
public java.lang.String m_name
public static final XPVendor UNKNOWN
public static final XPVendor MICROSOFT
public static final XPVendor SUN
public static final XPVendor IBM
public static final XPVendor BEA
public static XPVendor[] platformList
Constructor Detail |
---|
protected XPVendor()
Method Detail |
---|
public static XPVendor GetVendor(int id)
id
- ID for expected vendor.
public java.lang.String GetName()
public boolean equals(XPVendor vendor)
vendor
- object to be compared with current instance.
public java.lang.String toString()
toString
in class java.lang.Object
public static XPVendor GetVendor()
protected static XPVendor computeVendor(java.lang.String vendor)
vendor
- vendor name.
public static java.lang.String GetVersion()
public static java.lang.String GetFullName()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |