Class AbstractSerializerBuilder<T extends AbstractSerializerBuilder>
java.lang.Object
org.eclipse.yasson.internal.serializer.AbstractSerializerBuilder<T>
- Type Parameters:
T
- serialization builder type
- Direct Known Subclasses:
DeserializerBuilder
,SerializerBuilder
Base class for serializer builders.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionModel of a class representing current item and instance (if any).protected ClassModel
getClassModel(Class<?> rawType)
Gets or load class model for a class an its superclasses.Type customization.Generic type of the item.Jsonb runtime context.Resolved runtime type for instance in case ofTypeVariable
orWildcardType
.CurrentItem<?>
Wrapper item for this item.withClassModel(ClassModel classModel)
Class model for this item.withCustomization(Customization customization)
Customization of the class.withRuntimeType(Type runtimeType)
Runtime type for this item.Type for underlying instance to be created from.withWrapper(CurrentItem<?> wrapper)
Wrapper item for this item.
-
Constructor Details
-
AbstractSerializerBuilder
Crates a builder.- Parameters:
jsonbContext
- Not null.
-
-
Method Details
-
withWrapper
Wrapper item for this item.- Parameters:
wrapper
- not null.- Returns:
- Builder instance for call chaining.
-
withCustomization
Customization of the class.- Parameters:
customization
- Class customization- Returns:
- Builder instance for call chaining.
-
withClassModel
Class model for this item.- Parameters:
classModel
- class model- Returns:
- Builder instance for call chaining.
-
withRuntimeType
Runtime type for this item.- Parameters:
runtimeType
- runtime type- Returns:
- Builder instance for call chaining.
-
getClassModel
Gets or load class model for a class an its superclasses.- Parameters:
rawType
- Class to get model for.- Returns:
- Class model.
-
getWrapper
Wrapper item for this item.- Returns:
- Wrapper item.
-
getClassModel
Model of a class representing current item and instance (if any). Known collection classes doesn't need such a model.- Returns:
- model of a class
-
getRuntimeType
Resolved runtime type for instance in case ofTypeVariable
orWildcardType
. Otherwise provided type in type field, or type of field model.- Returns:
- runtime type
-
withType
Type for underlying instance to be created from. In case of type variable or wildcard, will be resolved recursively from parent items.- Parameters:
type
- type of instance not null- Returns:
- builder instance for call chaining
-
getJsonbContext
Jsonb runtime context.- Returns:
- jsonb context
-
getCustomization
Type customization.- Returns:
- customization
-
getGenericType
Generic type of the item.- Returns:
- generic type
-