Package nonapi.io.github.classgraph.json
Class ClassFields
- java.lang.Object
-
- nonapi.io.github.classgraph.json.ClassFields
-
class ClassFields extends java.lang.Object
The list of fields that can be (de)serialized (non-final, non-transient, non-synthetic, accessible), and their corresponding resolved (concrete) types.
-
-
Field Summary
Fields Modifier and Type Field Description private static java.util.Comparator<java.lang.reflect.Field>
FIELD_NAME_ORDER_COMPARATOR
Used to sort fields into deterministic order.(package private) java.util.Map<java.lang.String,FieldTypeInfo>
fieldNameToFieldTypeInfo
Map from field name to field and resolved type.(package private) java.util.List<FieldTypeInfo>
fieldOrder
The list of fields that can be (de)serialized (non-final, non-transient, non-synthetic, accessible), and their corresponding resolved (concrete) types.(package private) java.lang.reflect.Field
idField
If non-null, this is the field that has anId
annotation.private static java.lang.String
SERIALIZATION_FORMAT_CLASS_NAME
The name of the SerializationFormat class (used by ClassGraph to serialize a ScanResult).private static java.util.Comparator<java.lang.reflect.Field>
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).
-
Constructor Summary
Constructors Constructor Description ClassFields(java.lang.Class<?> cls, boolean resolveTypes, boolean onlySerializePublicFields, ClassFieldCache classFieldCache, ReflectionUtils reflectionUtils)
Constructor.
-
-
-
Field Detail
-
fieldOrder
final java.util.List<FieldTypeInfo> 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
final java.util.Map<java.lang.String,FieldTypeInfo> fieldNameToFieldTypeInfo
Map from field name to field and resolved type.
-
idField
java.lang.reflect.Field idField
If non-null, this is the field that has anId
annotation.
-
FIELD_NAME_ORDER_COMPARATOR
private static final java.util.Comparator<java.lang.reflect.Field> FIELD_NAME_ORDER_COMPARATOR
Used to sort fields into deterministic order.
-
SERIALIZATION_FORMAT_FIELD_NAME_ORDER_COMPARATOR
private static final java.util.Comparator<java.lang.reflect.Field> 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
private static final java.lang.String SERIALIZATION_FORMAT_CLASS_NAME
The name of the SerializationFormat class (used by ClassGraph to serialize a ScanResult).
-
-
Constructor Detail
-
ClassFields
public ClassFields(java.lang.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
-
-