Enum Class EJVMVendor

java.lang.Object
java.lang.Enum<EJVMVendor>
com.helger.base.system.EJVMVendor
All Implemented Interfaces:
Serializable, Comparable<EJVMVendor>, 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 class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static EJVMVendor valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null
    • determineIfItIsCurrentJVMVendor

      protected abstract boolean determineIfItIsCurrentJVMVendor()
    • isJVMVendor

      public final boolean isJVMVendor()
      Returns:
      true if this enum constant represents the current JVM vendor, false otherwise.
    • 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

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