Package jnr.constants.platform
Class ConstantResolver<E extends Enum<E>>
java.lang.Object
jnr.constants.platform.ConstantResolver<E>
Provides forward and reverse lookup utilities to cross-platform enums
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringprivate final booleanprivate Constant[]private intprivate ConstantSetprivate final Objectprivate final AtomicLongprivate E[] -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateConstantResolver(Class<E> enumType) privateConstantResolver(Class<E> enumType, int firstUnknown, int lastUnknown, boolean bitmask) -
Method Summary
Modifier and TypeMethodDescription(package private) final boolean(package private) final Stringdescription(E e) (package private) static <T extends Enum<T>>
ConstantResolver<T> getBitmaskResolver(Class<T> enumType) private ConstantgetConstant(E e) private ConstantSet(package private) static <T extends Enum<T>>
ConstantResolver<T> getResolver(Class<T> enumType) (package private) static <T extends Enum<T>>
ConstantResolver<T> getResolver(Class<T> enumType, int first, int last) (package private) final int(package private) final longprivate Constant(package private) final EvalueOf(long value)
-
Field Details
-
__UNKNOWN_CONSTANT__
- See Also:
-
modLock
-
enumType
-
reverseLookupMap
-
nextUnknown
-
bitmask
private final boolean bitmask -
cache
-
valueCache
-
cacheGuard
private volatile int cacheGuard -
constants
-
-
Constructor Details
-
ConstantResolver
-
ConstantResolver
-
-
Method Details
-
getResolver
-
getResolver
-
getBitmaskResolver
-
getConstant
-
lookupAndCacheConstant
-
intValue
-
longValue
-
description
-
defined
-
valueOf
-
getConstants
-