Package nonapi.io.github.classgraph.json
Class ClassFields
java.lang.Object
nonapi.io.github.classgraph.json.ClassFields
The list of fields that can be (de)serialized (non-final, non-transient, non-synthetic, accessible), and their
corresponding resolved (concrete) types.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Comparator
<Field> Used to sort fields into deterministic order.(package private) final Map
<String, FieldTypeInfo> Map from field name to field and resolved type.(package private) final List
<FieldTypeInfo> The list of fields that can be (de)serialized (non-final, non-transient, non-synthetic, accessible), and their corresponding resolved (concrete) types.(package private) Field
If non-null, this is the field that has anId
annotation.private static final String
The name of the SerializationFormat class (used by ClassGraph to serialize a ScanResult).private static final Comparator
<Field> Used to sort fields into deterministic order for SerializationFormat class (which needs to have "format" field in first position for ClassGraph's serialization format) (#383). -
Constructor Summary
ConstructorsConstructorDescriptionClassFields
(Class<?> cls, boolean resolveTypes, boolean onlySerializePublicFields, ClassFieldCache classFieldCache, ReflectionUtils reflectionUtils) Constructor. -
Method Summary
-
Field Details
-
fieldOrder
The list of fields that can be (de)serialized (non-final, non-transient, non-synthetic, accessible), and their corresponding resolved (concrete) types.For arrays, the
Type
will be aClass<?>
reference whereClass.isArray()
is true, andClass.getComponentType()
is the element type (the element type will itself be an array-typedClass<?>
reference for multi-dimensional arrays).For generics, the
Type
will be an implementation ofParameterizedType
. -
fieldNameToFieldTypeInfo
Map from field name to field and resolved type. -
idField
Field idFieldIf non-null, this is the field that has anId
annotation. -
FIELD_NAME_ORDER_COMPARATOR
Used to sort fields into deterministic order. -
SERIALIZATION_FORMAT_FIELD_NAME_ORDER_COMPARATOR
Used to sort fields into deterministic order for SerializationFormat class (which needs to have "format" field in first position for ClassGraph's serialization format) (#383). -
SERIALIZATION_FORMAT_CLASS_NAME
The name of the SerializationFormat class (used by ClassGraph to serialize a ScanResult).
-
-
Constructor Details
-
ClassFields
public ClassFields(Class<?> cls, boolean resolveTypes, boolean onlySerializePublicFields, ClassFieldCache classFieldCache, ReflectionUtils reflectionUtils) Constructor.- Parameters:
cls
- the classresolveTypes
- whether to resolve typesonlySerializePublicFields
- whether to only serialize public fieldsclassFieldCache
- the class field cache
-