Class StdReflector
java.lang.Object
tech.ydb.yoj.databind.schema.reflect.StdReflector
- All Implemented Interfaces:
Reflector
Standard
Reflector implementation, suitable for most usages. By default, reflecting record classes, Kotlin
data classes, POJOs and simple types such as int is supported.
You can override default Reflector by creating a custom SchemaRegistry with your own instance of
StdReflector with a different set of type factories, or a wholly different implementation
altogether. You then have to pass the SchemaRegistry to *Schema.of(...) methods to use it instead of
the default one.
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReflectType<?>reflectFieldType(Type genericType, FieldValueType bindingType) Gets reflection information for a field, potentially a deep sub-field of some type which can have schema.<T> ReflectType<T>reflectRootType(Class<T> type) Gets reflection information for a root type, that is, a type that can have aschema: a public concrete class.
-
Field Details
-
instance
-
-
Constructor Details
-
StdReflector
-
-
Method Details
-
reflectRootType
Description copied from interface:ReflectorGets reflection information for a root type, that is, a type that can have aschema: a public concrete class.- Specified by:
reflectRootTypein interfaceReflector- Type Parameters:
T- type to get reflection information for- Parameters:
type- type to get reflection information for- Returns:
- basic reflection information for
type
-
reflectFieldType
Description copied from interface:ReflectorGets reflection information for a field, potentially a deep sub-field of some type which can have schema.- Specified by:
reflectFieldTypein interfaceReflector- Parameters:
genericType- generic type of field to get reflection information forbindingType- value type suitable for data-binding of typegenericType- Returns:
- basic reflection information for the field
-