Class ClassInfo (1.45.3)

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
Name Description
underlyingClass Class<?>

underlying class or null for null result

Returns
Type Description
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
Name Description
underlyingClass Class<?>

underlying class or null for null result

ignoreCase boolean

whether field names are case sensitive

Returns
Type Description
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
Name Description
name String

FieldInfo#getName() or null

Returns
Type Description
Field

field or null for none

getFieldInfo(String name)

public FieldInfo getFieldInfo(String name)

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

Parameter
Name Description
name String

FieldInfo#getName() or null

Returns
Type Description
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
Type Description
Collection<FieldInfo>

getIgnoreCase()

public final boolean getIgnoreCase()

Returns whether field names are case sensitive.

Returns
Type Description
boolean

getNames()

public Collection<String> getNames()

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

Returns
Type Description
Collection<String>

getUnderlyingClass()

public Class<?> getUnderlyingClass()

Returns the underlying class.

Returns
Type Description
Class<?>

isEnum()

public boolean isEnum()

Returns the underlying class is an enum.

Returns
Type Description
boolean