Top Inners Fields Constructors Methods
tools.jackson.databind.util

public final Class ClassUtil

extends Object
Class Inheritance
Imports
java.io.Closeable, .IOException, java.lang.annotation.Annotation, java.lang.reflect.*, java.util.*, java.util.stream.Stream, tools.jackson.core.JacksonException, .JsonGenerator, .StreamWriteFeature, tools.jackson.core.exc.JacksonIOException, tools.jackson.core.util.Named, tools.jackson.databind.JavaType, .PropertyName, tools.jackson.databind.annotation.JacksonStdImpl

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
ClassUtil.Ctor

Value class used for containing information about discovered Constructors

private static class
ClassUtil.EnumTypeLocator

Inner class used to contain gory details of how we can determine details of instances of common JDK types like EnumMaps.

Field Summary

Modifier and TypeField and Description
private static final Class<?>
private static final Iterator<Object>
private static final List<String>
private static final ClassUtil.Ctor[]

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private static void
_addRawSuperTypes(Class<?> cls, Class<?> endBefore, Collection<Class<?>> result, boolean addClassItself)

private static Method[]
public static String
apostrophed(String text)

Returns either 'text' (single-quoted) or [null].

public static String
backticked(String text)

Returns either `text` (backtick-quoted) or [null].

public static String

Returns:

Null if class might be a bean; type String (that identifies why it's not a bean) if not
canBeABeanType
(Class<?> type)

public static void
checkAndFixAccess(Member
Accessor to call setAccessible() on.
member
,
boolean
Whether to always try to make accessor accessible, even if public (true), or only if needed to force by-pass of non-public access (false)
evenIfAlreadyPublic
)

Method that is called if a Member may need forced access, to force a field, method or constructor to be accessible: this is done by calling AccessibleObject#setAccessible(boolean).

public static String
classNameOf(Object inst)

Helper method used to construct appropriate description when passed either type (Class) or an instance; in latter case, class of instance is to be used.

public static Class<?>
public static void
closeOnFailAndThrowAsJacksonE(JsonGenerator g, Exception fail)

Helper method that encapsulate logic in trying to close output generator in case of failure; useful mostly in forcing flush()ing as otherwise error conditions tend to be hard to diagnose.

public static void
closeOnFailAndThrowAsJacksonE(JsonGenerator g, AutoCloseable toClose, Exception fail)

Helper method that encapsulate logic in trying to close given Closeable in case of failure; useful mostly in forcing flush()ing as otherwise error conditions tend to be hard to diagnose.

public static <T> T
createInstance(Class<T> cls, boolean
Whether it is possible to try to change access rights of the default constructor (in case it is not publicly accessible) or not.
canFixAccess
)

Method that can be called to try to create an instantiate of specified type.

public static Object
defaultValue(Class<?> cls)

Helper method used to get default value for wrappers used for primitive types (0 for Integer etc)

public static <T> Iterator<T>
public static <T> Stream<T>
public static String
exceptionMessage(Throwable t)

Helper method that returns Throwable#getMessage() for all other exceptions except for (a) JacksonException, for which getOriginalMessage() is returned, and (b) InvocationTargetException, for which the cause's message is returned, if available.

public static <T> Constructor<T>
findConstructor(Class<T> cls, boolean forceAccess)

public static Class<? extends Enum<?>>
findEnumType(EnumSet<?> s)

Helper method that can be used to dynamically figure out enumeration type of given EnumSet, without having access to its declaration.

public static Class<? extends Enum<?>>
findEnumType(EnumMap<?, ?> m)

Helper method that can be used to dynamically figure out enumeration type of given EnumSet, without having access to its declaration.

public static Class<? extends Enum<?>>
findEnumType(Enum<?> en)

Helper method that can be used to dynamically figure out formal enumeration type (class) for given enumeration.

public static Class<? extends Enum<?>>
findEnumType(Class<?> cls)

Helper method that can be used to dynamically figure out formal enumeration type (class) for given class of an enumeration value.

public static List<Class<?>>
findRawSuperTypes(Class<?> cls, Class<?> endBefore, boolean addClassItself)

public static List<Class<?>>
findSuperClasses(Class<?> cls, Class<?> endBefore, boolean addClassItself)

Method for finding all super classes (but not super interfaces) of given class, starting with the immediate super class and ending in the most distant one.

public static String
getClassDescription(Object classOrInstance)

Helper method used to construct appropriate description when passed either type (Class) or an instance; in latter case, class of instance is to be used.

public static Method[]
getClassMethods(Class<?> cls)

Helper method that gets methods declared in given class; usually a simple thing, but sometimes (as per [databind#785]) more complicated, depending on classloader setup.

public static ClassUtil.Ctor[]
public static Class<?>
public static Class<?>
public static int

Returns:

Major version of JDK we are running on
getJDKMajorVersion
()

public static Class<?>
getOuterClass(Class<?> type)

Method for finding enclosing class for non-static inner classes

public static Throwable
getRootCause(Throwable t)

Method that can be used to find the "root cause", innermost of chained (wrapped) exceptions.

public static String

Returns:

String description of type including generic type parameters, surrounded by backticks, if type passed; or string "null" if {code null} passed
getTypeDescription
(JavaType
Fully resolved type or null
fullType
)

Helper method to create and return "backticked" description of given resolved type (or, "null" if null passed), similar to return vaue of getClassDescription(Object).

public static boolean
hasClass(Object inst, Class<?> raw)

public static boolean
public static boolean
public static boolean
public static boolean
isConcrete(Class<?> type)

Helper method that checks if given class is a concrete one; that is, not an interface or abstract class.

public static boolean
public static boolean
isEnumType(Class<?> rawType)

Helper method that encapsulates reliable check on whether given raw type "is an Enum", that is, is or extends java.lang.Enum.

public static boolean
isJacksonStdImpl(Object impl)

Method that can be called to determine if given Object is the default implementation Jackson uses; as opposed to a custom serializer installed by a module or calling application.

public static boolean
isJacksonStdImpl(Class<?> implClass)

public static boolean

Returns:

True if we can determine that the code is running on JDK 17 or above; false otherwise.
isJDK17OrAbove
()

Convenience method for:

   return getJDKMajorVersion() >= 17
public static boolean
isJDKClass(Class<?> rawType)

Accessor for checking whether given Class is under Java package of java.*, javax.* or sun.* (including all sub-packages).

public static boolean
isJDKCoreClass(Class<?> rawType)

Similar to isJDKClass(Class), but for JDK core classes: those in packages under java.* but NOT under javax.* (or sun.*).

public static String
isLocalType(Class<?> type, boolean allowNonStatic)

public static boolean
public static boolean
public static boolean
isProxyType(Class<?> type)

Helper method used to weed out dynamic Proxy types; types that do not expose concrete method API that we could use to figure out automatic Bean (property) based serialization.

public static boolean
isRecordType(Class<?> cls)

Helper method for detecting Java14-added Record types

public static String
name(String name)

Returns either single-quoted (apostrophe) 'name' (if name not null), or "[null]" if name is null.

public static String
name(PropertyName name)

Returns either single-quoted (apostrophe) 'name' (if name not null), or "[null]" if name is null.

public static String
nameOf(Class<?> cls)

Returns either `cls.getName()` (if `cls` not null), or "[null]" if `cls` is null.

public static String
nameOf(Named named)

Returns either single-quoted (apostrophe) 'named.getName()' (if named not null), or "[null]" if named is null.

public static <T> T
nonNull(T valueOrNull, T defaultValue)

public static String
public static String
public static Class<?>
primitiveType(Class<?> type)

Method that can be used to find primitive type for given class if (but only if) it is either wrapper type or primitive type; returns null if type is neither.

public static String
quotedOr(Object str, String forNull)

public static Class<?>
public static <E extends Throwable> RuntimeException
sneakyThrow(Throwable throwable)

Throw an exception even if it's checked and not declared.

public static void
throwAsIAE(Throwable t)

Method that will wrap 't' as an IllegalArgumentException if it is a checked exception; otherwise (runtime exception or error) throw as is

public static void
throwAsIAE(Throwable t, String msg)

Method that will wrap 't' as an IllegalArgumentException (and with specified message) if it is a checked exception; otherwise (runtime exception or error) throw as is

public static Throwable
throwIfError(Throwable t)

Helper method that will check if argument is an Error, and if so, (re)throw it; otherwise just return

public static Throwable
throwIfJacksonE(Throwable t)

Helper method that will check if argument is an IOException, and if so, (re)throw it; otherwise just return

public static Throwable
throwIfRTE(Throwable t)

Helper method that will check if argument is an RuntimeException, and if so, (re)throw it; otherwise just return

public static Throwable
throwRootCauseIfJacksonE(Throwable t)

Method that works like by calling getRootCause and then either throwing it (if instanceof IOException), or return.

public static void
unwrapAndThrowAsIAE(Throwable t)

Method that will locate the innermost exception for given Throwable; and then wrap it as an IllegalArgumentException if it is a checked exception; otherwise (runtime exception or error) throw as is

public static void
unwrapAndThrowAsIAE(Throwable t, String msg)

Method that will locate the innermost exception for given Throwable; and then wrap it as an IllegalArgumentException if it is a checked exception; otherwise (runtime exception or error) throw as is

public static void
verifyMustOverride(Class<?> expType, Object instance, String method)

public static Class<?>
wrapperType(Class<?> primitiveType)

Helper method for finding wrapper type for given primitive type (why isn't there one in JDK?).

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

CLS_OBJECTback to summary
private static final Class<?> CLS_OBJECT
EMPTY_ITERATORback to summary
private static final Iterator<Object> EMPTY_ITERATOR
JDK_PREFIXESback to summary
private static final List<String> JDK_PREFIXES
NO_CTORSback to summary
private static final ClassUtil.Ctor[] NO_CTORS

Constructor Detail

ClassUtilback to summary
public ClassUtil()

Method Detail

_addRawSuperTypesback to summary
private static void _addRawSuperTypes(Class<?> cls, Class<?> endBefore, Collection<Class<?>> result, boolean addClassItself)
_failGetClassMethodsback to summary
private static Method[] _failGetClassMethods(Class<?> cls, Throwable rootCause) throws IllegalArgumentException
apostrophedback to summary
public static String apostrophed(String text)

Returns either 'text' (single-quoted) or [null].

backtickedback to summary
public static String backticked(String text)

Returns either `text` (backtick-quoted) or [null].

canBeABeanTypeback to summary
public static String canBeABeanType(Class<?> type)
Returns:String

Null if class might be a bean; type String (that identifies why it's not a bean) if not

checkAndFixAccessback to summary
public static void checkAndFixAccess(Member member, boolean evenIfAlreadyPublic)

Method that is called if a Member may need forced access, to force a field, method or constructor to be accessible: this is done by calling AccessibleObject#setAccessible(boolean).

Parameters
member:Member

Accessor to call setAccessible() on.

evenIfAlreadyPublic:boolean

Whether to always try to make accessor accessible, even if public (true), or only if needed to force by-pass of non-public access (false)

classNameOfback to summary
public static String classNameOf(Object inst)

Helper method used to construct appropriate description when passed either type (Class) or an instance; in latter case, class of instance is to be used.

classOfback to summary
public static Class<?> classOf(Object inst)
closeOnFailAndThrowAsJacksonEback to summary
public static void closeOnFailAndThrowAsJacksonE(JsonGenerator g, Exception fail) throws JacksonException

Helper method that encapsulate logic in trying to close output generator in case of failure; useful mostly in forcing flush()ing as otherwise error conditions tend to be hard to diagnose. However, it is often the case that output state may be corrupt so we need to be prepared for secondary exception without masking original one.

Note that exception is thrown as-is if unchecked (likely case); if it is checked, however, RuntimeException is thrown (except for IOException which will be wrapped as JacksonIOException.

Since
3.0 (with this name)
closeOnFailAndThrowAsJacksonEback to summary
public static void closeOnFailAndThrowAsJacksonE(JsonGenerator g, AutoCloseable toClose, Exception fail) throws JacksonException

Helper method that encapsulate logic in trying to close given Closeable in case of failure; useful mostly in forcing flush()ing as otherwise error conditions tend to be hard to diagnose. However, it is often the case that output state may be corrupt so we need to be prepared for secondary exception without masking original one.

createInstanceback to summary
public static <T> T createInstance(Class<T> cls, boolean canFixAccess) throws IllegalArgumentException

Method that can be called to try to create an instantiate of specified type. Instantiation is done using default no-argument constructor.

Parameters
canFixAccess:boolean

Whether it is possible to try to change access rights of the default constructor (in case it is not publicly accessible) or not.

Exceptions
IllegalArgumentException:
If instantiation fails for any reason; except for cases where constructor throws an unchecked exception (which will be passed as is)
defaultValueback to summary
public static Object defaultValue(Class<?> cls)

Helper method used to get default value for wrappers used for primitive types (0 for Integer etc)

emptyIteratorback to summary
public static <T> Iterator<T> emptyIterator()
Annotations
@SuppressWarnings:unchecked
emptyStreamback to summary
public static <T> Stream<T> emptyStream()
Since
2.19
exceptionMessageback to summary
public static String exceptionMessage(Throwable t)

Helper method that returns Throwable#getMessage() for all other exceptions except for (a) JacksonException, for which getOriginalMessage() is returned, and (b) InvocationTargetException, for which the cause's message is returned, if available. Method is used to avoid accidentally including trailing location information twice in message when wrapping exceptions.

findConstructorback to summary
public static <T> Constructor<T> findConstructor(Class<T> cls, boolean forceAccess) throws IllegalArgumentException
findEnumTypeback to summary
public static Class<? extends Enum<?>> findEnumType(EnumSet<?> s)

Helper method that can be used to dynamically figure out enumeration type of given EnumSet, without having access to its declaration. Code is needed to work around design flaw in JDK.

findEnumTypeback to summary
public static Class<? extends Enum<?>> findEnumType(EnumMap<?, ?> m)

Helper method that can be used to dynamically figure out enumeration type of given EnumSet, without having access to its declaration. Code is needed to work around design flaw in JDK.

findEnumTypeback to summary
public static Class<? extends Enum<?>> findEnumType(Enum<?> en)

Helper method that can be used to dynamically figure out formal enumeration type (class) for given enumeration. This is either class of enum instance (for "simple" enumerations), or its superclass (for enums with instance fields or methods)

findEnumTypeback to summary
public static Class<? extends Enum<?>> findEnumType(Class<?> cls)

Helper method that can be used to dynamically figure out formal enumeration type (class) for given class of an enumeration value. This is either class of enum instance (for "simple" enumerations), or its superclass (for enums with instance fields or methods)

Annotations
@SuppressWarnings:unchecked
findRawSuperTypesback to summary
public static List<Class<?>> findRawSuperTypes(Class<?> cls, Class<?> endBefore, boolean addClassItself)
findSuperClassesback to summary
public static List<Class<?>> findSuperClasses(Class<?> cls, Class<?> endBefore, boolean addClassItself)

Method for finding all super classes (but not super interfaces) of given class, starting with the immediate super class and ending in the most distant one. Class itself is included if addClassItself is true.

Note

mostly/only called to resolve mix-ins as that's where we do not care about fully-resolved types, just associated annotations.

getClassDescriptionback to summary
public static String getClassDescription(Object classOrInstance)

Helper method used to construct appropriate description when passed either type (Class) or an instance; in latter case, class of instance is to be used.

getClassMethodsback to summary
public static Method[] getClassMethods(Class<?> cls)

Helper method that gets methods declared in given class; usually a simple thing, but sometimes (as per [databind#785]) more complicated, depending on classloader setup.

Since
2.9
getConstructorsback to summary
public static ClassUtil.Ctor[] getConstructors(Class<?> cls)
Since
2.7
getDeclaringClassback to summary
public static Class<?> getDeclaringClass(Class<?> cls)
getEnclosingClassback to summary
public static Class<?> getEnclosingClass(Class<?> cls)
getJDKMajorVersionback to summary
public static int getJDKMajorVersion()
Returns:int

Major version of JDK we are running on

Exceptions
IllegalStateException:
If JDK version information cannot be determined
Since
2.15
getOuterClassback to summary
public static Class<?> getOuterClass(Class<?> type)

Method for finding enclosing class for non-static inner classes

getRootCauseback to summary
public static Throwable getRootCause(Throwable t)

Method that can be used to find the "root cause", innermost of chained (wrapped) exceptions.

getTypeDescriptionback to summary
public static String getTypeDescription(JavaType fullType)

Helper method to create and return "backticked" description of given resolved type (or, "null" if null passed), similar to return vaue of getClassDescription(Object).

Parameters
fullType:JavaType

Fully resolved type or null

Returns:String

String description of type including generic type parameters, surrounded by backticks, if type passed; or string "null" if {code null} passed

hasClassback to summary
public static boolean hasClass(Object inst, Class<?> raw)
hasEnclosingMethodback to summary
public static boolean hasEnclosingMethod(Class<?> cls)
isBogusClassback to summary
public static boolean isBogusClass(Class<?> cls)
isCollectionMapOrArrayback to summary
public static boolean isCollectionMapOrArray(Class<?> type)
isConcreteback to summary
public static boolean isConcrete(Class<?> type)

Helper method that checks if given class is a concrete one; that is, not an interface or abstract class.

isConcreteback to summary
public static boolean isConcrete(Member member)
isEnumTypeback to summary
public static boolean isEnumType(Class<?> rawType)

Helper method that encapsulates reliable check on whether given raw type "is an Enum", that is, is or extends java.lang.Enum.

isJacksonStdImplback to summary
public static boolean isJacksonStdImpl(Object impl)

Method that can be called to determine if given Object is the default implementation Jackson uses; as opposed to a custom serializer installed by a module or calling application. Determination is done using JacksonStdImpl annotation on handler (serializer, deserializer etc) class.

Note

passing `null` is legal, and will result in true being returned.

isJacksonStdImplback to summary
public static boolean isJacksonStdImpl(Class<?> implClass)
isJDK17OrAboveback to summary
public static boolean isJDK17OrAbove()

Convenience method for:

   return getJDKMajorVersion() >= 17
that also catches any possible exceptions so it is safe to call from static contexts.
Returns:boolean

True if we can determine that the code is running on JDK 17 or above; false otherwise.

Since
2.15
isJDKClassback to summary
public static boolean isJDKClass(Class<?> rawType)

Accessor for checking whether given Class is under Java package of java.*, javax.* or sun.* (including all sub-packages).

Added since some aspects of handling need to be changed for JDK types (and possibly some extensions under javax. and sun.: for example, forcing of access will not work well for future JDKs.

isJDKCoreClassback to summary
public static boolean isJDKCoreClass(Class<?> rawType)

Similar to isJDKClass(Class), but for JDK core classes: those in packages under java.* but NOT under javax.* (or sun.*).

Since
2.20
isLocalTypeback to summary
public static String isLocalType(Class<?> type, boolean allowNonStatic)
isNonStaticInnerClassback to summary
public static boolean isNonStaticInnerClass(Class<?> cls)
isObjectOrPrimitiveback to summary
public static boolean isObjectOrPrimitive(Class<?> cls)
isProxyTypeback to summary
public static boolean isProxyType(Class<?> type)

Helper method used to weed out dynamic Proxy types; types that do not expose concrete method API that we could use to figure out automatic Bean (property) based serialization.

isRecordTypeback to summary
public static boolean isRecordType(Class<?> cls)

Helper method for detecting Java14-added Record types

nameback to summary
public static String name(String name)

Returns either single-quoted (apostrophe) 'name' (if name not null), or "[null]" if name is null.

nameback to summary
public static String name(PropertyName name)

Returns either single-quoted (apostrophe) 'name' (if name not null), or "[null]" if name is null.

nameOfback to summary
public static String nameOf(Class<?> cls)

Returns either `cls.getName()` (if `cls` not null), or "[null]" if `cls` is null.

nameOfback to summary
public static String nameOf(Named named)

Returns either single-quoted (apostrophe) 'named.getName()' (if named not null), or "[null]" if named is null.

nonNullback to summary
public static <T> T nonNull(T valueOrNull, T defaultValue)
nonNullStringback to summary
public static String nonNullString(String str)
nullOrToStringback to summary
public static String nullOrToString(Object value)
primitiveTypeback to summary
public static Class<?> primitiveType(Class<?> type)

Method that can be used to find primitive type for given class if (but only if) it is either wrapper type or primitive type; returns null if type is neither.

Since
2.7
quotedOrback to summary
public static String quotedOr(Object str, String forNull)
rawClassback to summary
public static Class<?> rawClass(JavaType t)
sneakyThrowback to summary
public static <E extends Throwable> RuntimeException sneakyThrow(Throwable throwable) throws Throwable-:E

Throw an exception even if it's checked and not declared.

Annotations
@SuppressWarnings:unchecked
throwAsIAEback to summary
public static void throwAsIAE(Throwable t)

Method that will wrap 't' as an IllegalArgumentException if it is a checked exception; otherwise (runtime exception or error) throw as is

throwAsIAEback to summary
public static void throwAsIAE(Throwable t, String msg)

Method that will wrap 't' as an IllegalArgumentException (and with specified message) if it is a checked exception; otherwise (runtime exception or error) throw as is

throwIfErrorback to summary
public static Throwable throwIfError(Throwable t)

Helper method that will check if argument is an Error, and if so, (re)throw it; otherwise just return

throwIfJacksonEback to summary
public static Throwable throwIfJacksonE(Throwable t) throws JacksonException

Helper method that will check if argument is an IOException, and if so, (re)throw it; otherwise just return

throwIfRTEback to summary
public static Throwable throwIfRTE(Throwable t)

Helper method that will check if argument is an RuntimeException, and if so, (re)throw it; otherwise just return

throwRootCauseIfJacksonEback to summary
public static Throwable throwRootCauseIfJacksonE(Throwable t) throws JacksonException

Method that works like by calling getRootCause and then either throwing it (if instanceof IOException), or return.

unwrapAndThrowAsIAEback to summary
public static void unwrapAndThrowAsIAE(Throwable t)

Method that will locate the innermost exception for given Throwable; and then wrap it as an IllegalArgumentException if it is a checked exception; otherwise (runtime exception or error) throw as is

unwrapAndThrowAsIAEback to summary
public static void unwrapAndThrowAsIAE(Throwable t, String msg)

Method that will locate the innermost exception for given Throwable; and then wrap it as an IllegalArgumentException if it is a checked exception; otherwise (runtime exception or error) throw as is

verifyMustOverrideback to summary
public static void verifyMustOverride(Class<?> expType, Object instance, String method)
wrapperTypeback to summary
public static Class<?> wrapperType(Class<?> primitiveType)

Helper method for finding wrapper type for given primitive type (why isn't there one in JDK?).

Note

throws IllegalArgumentException if given type is NOT primitive type (caller has to check).

tools.jackson.databind.util back to summary

public final Class ClassUtil.Ctor

extends Object
Class Inheritance

Value class used for containing information about discovered Constructors

Field Summary

Modifier and TypeField and Description
private transient Annotation[]
public final Constructor<?>
private transient Annotation[][]
private int

Constructor Summary

AccessConstructor and Description
public
Ctor(Constructor<?> ctor)

Method Summary

Modifier and TypeMethod and Description
public Constructor<?>
public Annotation[]
public Class<?>
public int
public Annotation[][]
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

_annotationsback to summary
private transient Annotation[] _annotations
_ctorback to summary
public final Constructor<?> _ctor
_paramAnnotationsback to summary
private transient Annotation[][] _paramAnnotations
_paramCountback to summary
private int _paramCount

Constructor Detail

Ctorback to summary
public Ctor(Constructor<?> ctor)

Method Detail

getConstructorback to summary
public Constructor<?> getConstructor()
getDeclaredAnnotationsback to summary
public Annotation[] getDeclaredAnnotations()
getDeclaringClassback to summary
public Class<?> getDeclaringClass()
getParamCountback to summary
public int getParamCount()
getParameterAnnotationsback to summary
public Annotation[][] getParameterAnnotations()
tools.jackson.databind.util back to summary

private Class ClassUtil.EnumTypeLocator

extends Object
Class Inheritance

Inner class used to contain gory details of how we can determine details of instances of common JDK types like EnumMaps.

Field Summary

Modifier and TypeField and Description
private final Field
private final Field
private final String
private final String
pack-priv static final ClassUtil.EnumTypeLocator

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public Class<? extends Enum<?>>
public Class<? extends Enum<?>>
enumTypeFor(EnumMap<?, ?> set)

private Object
get(Object bean, Field field)

private static Field
locateField(Class<?> fromClass, String expectedName, Class<?> type)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

enumMapTypeFieldback to summary
private final Field enumMapTypeField
enumSetTypeFieldback to summary
private final Field enumSetTypeField
failForEnumMapback to summary
private final String failForEnumMap
failForEnumSetback to summary
private final String failForEnumSet
instanceback to summary
pack-priv static final ClassUtil.EnumTypeLocator instance

Constructor Detail

EnumTypeLocatorback to summary
private EnumTypeLocator()

Method Detail

enumTypeForback to summary
public Class<? extends Enum<?>> enumTypeFor(EnumSet<?> set)
Annotations
@SuppressWarnings:unchecked
enumTypeForback to summary
public Class<? extends Enum<?>> enumTypeFor(EnumMap<?, ?> set)
Annotations
@SuppressWarnings:unchecked
getback to summary
private Object get(Object bean, Field field)
locateFieldback to summary
private static Field locateField(Class<?> fromClass, String expectedName, Class<?> type) throws Exception