public final class ClassInfoComputes class information to determine data key name/value pairs associated with the class.
Implementation is thread-safe.
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 |
| Returns | |
|---|---|
| Type | Description |
ClassInfo |
class information or |
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 |
ignoreCase |
booleanwhether field names are case sensitive |
| Returns | |
|---|---|
| Type | Description |
ClassInfo |
class information or |
Methods
getField(String name)
public Field getField(String name)Returns the field for the given FieldInfo#getName().
| Parameter | |
|---|---|
| Name | Description |
name |
StringFieldInfo#getName() or |
| Returns | |
|---|---|
| Type | Description |
Field |
field or |
getFieldInfo(String name)
public FieldInfo getFieldInfo(String name)Returns the information for the given FieldInfo#getName().
| Parameter | |
|---|---|
| Name | Description |
name |
StringFieldInfo#getName() or |
| Returns | |
|---|---|
| Type | Description |
FieldInfo |
field information or |
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 |
|