public final class ClassInfo extends Object
Implementation is thread-safe.
| Modifier and Type | Method and Description |
|---|---|
Field |
getField(String
Returns the field for the given
FieldInfo.
|
FieldInfo |
getFieldInfo(String
Returns the information for the given
FieldInfo.
|
Collection |
getFieldInfos()
Returns an unmodifiable collection of the
FieldInfos for this class, without any guarantee of order.
|
boolean |
getIgnoreCase()
Returns whether field names are case sensitive.
|
Collection |
getNames()
Returns an unmodifiable sorted set (with any possible
null member first) of
names.
|
Class |
getUnderlyingClass()
Returns the underlying class.
|
boolean |
isEnum()
Returns the underlying class is an enum.
|
static ClassInfo |
of(Class
Returns the class information for the given underlying class.
|
static ClassInfo |
of(Class
Returns the class information for the given underlying class.
|
public static ClassInfoof(Class <?> underlyingClass)
underlyingClass - underlying class or
null for
null result
null for
null input
public static ClassInfoof(Class <?> underlyingClass, boolean ignoreCase)
underlyingClass - underlying class or
null for
null result
ignoreCase - whether field names are case sensitive
null for
null input
public Class<?> getUnderlyingClass()
public final boolean getIgnoreCase()
public FieldInfogetFieldInfo(String name)
FieldInfo.getName() .
name -
FieldInfo.getName() or
null
null for none
public FieldgetField(String name)
FieldInfo.getName() .
name -
FieldInfo.getName() or
null
null for none
public boolean isEnum()
public Collection<String > getNames()
null member first) of
names.
public Collection<FieldInfo > getFieldInfos()
FieldInfos for this class, without any guarantee of order.
If you need sorted order, instead use getNames() with getFieldInfo(String).