Package org.ehcache.sizeof
Enum FlyweightType
- java.lang.Object
-
- java.lang.Enum<FlyweightType>
-
- org.ehcache.sizeof.FlyweightType
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<FlyweightType>
enum FlyweightType extends java.lang.Enum<FlyweightType>
Enum with all the flyweight types that we check for sizeOf measurements
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BIGDECIMAL
java.math.BigDecimalBIGINTEGER
java.math.BigIntegerBOOLEAN
java.lang.BooleanBYTE
java.lang.ByteCHARACTER
java.lang.CharacterCLASS
java.lang.ClassCODINGERRORACTION
java.nio.charset.CodingErrorActionDATATYPECONSTANTS_FIELD
javax.xml.datatype.DatatypeConstants.FieldENUM
java.lang.EnumINTEGER
java.lang.IntegerLOCALE
java.lang.LocaleLOGGER
java.util.LoggerLONG
java.lang.LongMATHCONTEXT
java.math.MathContextMISC
misc comparisons that can not rely on the object's class.PROXY
java.net.ProxyQNAME
javax.xml.namespace.QNameSHORT
java.lang.Short
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Class<?>
clazz
private static java.util.Set<java.util.Locale>
GLOBAL_LOCALES
private static java.util.Map<java.lang.Class<?>,FlyweightType>
TYPE_MAPPINGS
-
Constructor Summary
Constructors Modifier Constructor Description private
FlyweightType(java.lang.Class<?> clazz)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description (package private) static FlyweightType
getFlyweightType(java.lang.Class<?> aClazz)
Will return the Flyweight enum instance for the flyweight Class, or null if type isn't flyweight(package private) abstract boolean
isShared(java.lang.Object obj)
Whether this is a shared objectstatic FlyweightType
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static FlyweightType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
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 Detail
-
TYPE_MAPPINGS
private static final java.util.Map<java.lang.Class<?>,FlyweightType> TYPE_MAPPINGS
-
GLOBAL_LOCALES
private static final java.util.Set<java.util.Locale> GLOBAL_LOCALES
-
clazz
private final java.lang.Class<?> clazz
-
-
Method Detail
-
values
public static FlyweightType[] 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 (FlyweightType c : FlyweightType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static FlyweightType 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 namejava.lang.NullPointerException
- if the argument is null
-
isShared
abstract boolean isShared(java.lang.Object obj)
Whether this is a shared object- Parameters:
obj
- the object to check for- Returns:
- true, if shared
-
getFlyweightType
static FlyweightType getFlyweightType(java.lang.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
-
-