Enum FlyweightType

java.lang.Object
java.lang.Enum<FlyweightType>
org.ehcache.sizeof.FlyweightType
All Implemented Interfaces:
Serializable, Comparable<FlyweightType>, java.lang.constant.Constable

enum FlyweightType extends Enum<FlyweightType>
Enum with all the flyweight types that we check for sizeOf measurements
  • Enum Constant Details

    • ENUM

      public static final FlyweightType ENUM
      java.lang.Enum
    • CLASS

      public static final FlyweightType CLASS
      java.lang.Class
    • BOOLEAN

      public static final FlyweightType BOOLEAN
      java.lang.Boolean
    • INTEGER

      public static final FlyweightType INTEGER
      java.lang.Integer
    • SHORT

      public static final FlyweightType SHORT
      java.lang.Short
    • BYTE

      public static final FlyweightType BYTE
      java.lang.Byte
    • LONG

      public static final FlyweightType LONG
      java.lang.Long
    • BIGINTEGER

      public static final FlyweightType BIGINTEGER
      java.math.BigInteger
    • BIGDECIMAL

      public static final FlyweightType BIGDECIMAL
      java.math.BigDecimal
    • MATHCONTEXT

      public static final FlyweightType MATHCONTEXT
      java.math.MathContext
    • CHARACTER

      public static final FlyweightType CHARACTER
      java.lang.Character
    • LOCALE

      public static final FlyweightType LOCALE
      java.lang.Locale
    • LOGGER

      public static final FlyweightType LOGGER
      java.util.Logger
    • PROXY

      public static final FlyweightType PROXY
      java.net.Proxy
    • CODINGERRORACTION

      public static final FlyweightType CODINGERRORACTION
      java.nio.charset.CodingErrorAction
    • DATATYPECONSTANTS_FIELD

      public static final FlyweightType DATATYPECONSTANTS_FIELD
      javax.xml.datatype.DatatypeConstants.Field
    • QNAME

      public static final FlyweightType QNAME
      javax.xml.namespace.QName
    • MISC

      public static final FlyweightType MISC
      misc comparisons that can not rely on the object's class.
  • Field Details

    • TYPE_MAPPINGS

      private static final Map<Class<?>,FlyweightType> TYPE_MAPPINGS
    • GLOBAL_LOCALES

      private static final Set<Locale> GLOBAL_LOCALES
    • clazz

      private final Class<?> clazz
  • Constructor Details

    • FlyweightType

      private FlyweightType(Class<?> clazz)
  • Method Details

    • values

      public static FlyweightType[] 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 FlyweightType 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
    • isShared

      abstract boolean isShared(Object obj)
      Whether this is a shared object
      Parameters:
      obj - the object to check for
      Returns:
      true, if shared
    • getFlyweightType

      static FlyweightType getFlyweightType(Class<?> aClazz)
      Will return the Flyweight enum instance for the flyweight Class, or null if type isn't flyweight
      Parameters:
      aClazz - the class we need the FlyweightType instance for
      Returns:
      the FlyweightType, or null