Enum EJVMVendor

java.lang.Object
java.lang.Enum<EJVMVendor>
com.helger.commons.system.EJVMVendor
All Implemented Interfaces:
Serializable, Comparable<EJVMVendor>, java.lang.constant.Constable

public enum EJVMVendor extends Enum<EJVMVendor>
Determine the current JVM (Java Virtual Machine) vendor.
Author:
Philip Helger
  • Enum Constant Details

    • SUN_CLIENT

      public static final EJVMVendor SUN_CLIENT
    • SUN_SERVER

      public static final EJVMVendor SUN_SERVER
    • ORACLE_CLIENT

      public static final EJVMVendor ORACLE_CLIENT
    • ORACLE_SERVER

      public static final EJVMVendor ORACLE_SERVER
    • UNKNOWN

      public static final EJVMVendor UNKNOWN
  • Method Details

    • values

      public static EJVMVendor[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static EJVMVendor valueOf(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:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • determineIfItIsCurrentJVMVendor

      protected abstract boolean determineIfItIsCurrentJVMVendor()
    • isJVMVendor

      public final boolean isJVMVendor()
    • isSun

      public final boolean isSun()
      Returns:
      true if this is a Sun JVM (usually for Java ≤ 1.6).
    • isOracle

      public final boolean isOracle()
      Returns:
      true if this is an Oracle JVM (for Java ≥ 1.7).
    • getCurrentVendor

      @Nonnull public static EJVMVendor getCurrentVendor()
      Returns:
      The current JVM vendor. If the vendor could not be determined, UNKNOWN is returned and never null.