com.springsource.util.env
Enum JvmVendor

java.lang.Object
  extended by java.lang.Enum<JvmVendor>
      extended by com.springsource.util.env.JvmVendor
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<JvmVendor>

public enum JvmVendor
extends java.lang.Enum<JvmVendor>

Identifies the vendor of a JVM implementation. The vendor of the currently running JVM can be accessed from current(). When no vendor can be determined, the vendor is identified as UNKNOWN.

Concurrent Semantics
Threadsafe.

Since:
1.0
Author:
Rob Harrop

Enum Constant Summary
APPLE
          Apple.
BEA
          BEA Systems.
IBM
          IBM.
SUN
          Sun Microsystems.
UNKNOWN
          Unknown.
 
Field Summary
private static JvmVendor current
           
private  java.lang.String identifer
           
 
Method Summary
static JvmVendor current()
          Gets the identifier for the vendor of the currently running JVM.
 boolean isOneOf(JvmVendor... jvmVendors)
          Indicates whether this JvmVendor is one of the supplied list of vendors.
static JvmVendor valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static JvmVendor[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

SUN

public static final JvmVendor SUN
Sun Microsystems.


APPLE

public static final JvmVendor APPLE
Apple.


IBM

public static final JvmVendor IBM
IBM.


BEA

public static final JvmVendor BEA
BEA Systems.


UNKNOWN

public static final JvmVendor UNKNOWN
Unknown.

Field Detail

current

private static final JvmVendor current

identifer

private final java.lang.String identifer
Method Detail

values

public static JvmVendor[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (JvmVendor c : JvmVendor.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static JvmVendor valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

current

public static JvmVendor current()
Gets the identifier for the vendor of the currently running JVM.

Returns:
the identifier for the JVM vendor.

isOneOf

public boolean isOneOf(JvmVendor... jvmVendors)
Indicates whether this JvmVendor is one of the supplied list of vendors.

Parameters:
jvmVendors - the vendors to check against.
Returns:
true if this JvmVendor is in the supplied list, otherwise false.