Class ClassInfo (1.41.8)

public final class ClassInfo

Computes class information to determine data key name/value pairs associated with the class.

Implementation is thread-safe.

Inheritance

java.lang.Object > ClassInfo

Static Methods

of(Class<?> underlyingClass)

public static ClassInfo of(Class<?> underlyingClass)

Returns the class information for the given underlying class.

Parameter
NameDescription
underlyingClassClass<?>

underlying class or null for null result

Returns
TypeDescription
ClassInfo

class information or null for null input

of(Class<?> underlyingClass, boolean ignoreCase)

public static ClassInfo of(Class<?> underlyingClass, boolean ignoreCase)

Returns the class information for the given underlying class.

Parameters
NameDescription
underlyingClassClass<?>

underlying class or null for null result

ignoreCaseboolean

whether field names are case sensitive

Returns
TypeDescription
ClassInfo

class information or null for null input

Methods

getField(String name)

public Field getField(String name)

Returns the field for the given FieldInfo#getName().

Parameter
NameDescription
nameString

FieldInfo#getName() or null

Returns
TypeDescription
Field

field or null for none

getFieldInfo(String name)

public FieldInfo getFieldInfo(String name)

Returns the information for the given FieldInfo#getName().

Parameter
NameDescription
nameString

FieldInfo#getName() or null

Returns
TypeDescription
FieldInfo

field information or null for none

getFieldInfos()

public Collection<FieldInfo> getFieldInfos()

Returns an unmodifiable collection of the FieldInfos for this class, without any guarantee of order.

If you need sorted order, instead use #getNames() with #getFieldInfo(String).

Returns
TypeDescription
Collection<FieldInfo>

getIgnoreCase()

public final boolean getIgnoreCase()

Returns whether field names are case sensitive.

Returns
TypeDescription
boolean

getNames()

public Collection<String> getNames()

Returns an unmodifiable sorted set (with any possible null member first) of names.

Returns
TypeDescription
Collection<String>

getUnderlyingClass()

public Class<?> getUnderlyingClass()

Returns the underlying class.

Returns
TypeDescription
Class<?>

isEnum()

public boolean isEnum()

Returns the underlying class is an enum.

Returns
TypeDescription
boolean