Class ObjectMapperExtensionsKt
-
- All Implemented Interfaces:
public final class ObjectMapperExtensionsKt
-
-
Method Summary
Modifier and Type Method Description final static <T extends Any> ObjectMapper<T>get(ObjectMapper.Factory $self)Create an object mapper with the given Factory for objects of type T, accepting parameterized types. final static <T extends Any> ObjectMapper<T>get(ObjectMapper.Factory $self, KClass<T> type)Get an object mapper for the kotlin class provided. final static <T extends Any> TypeSerializer<T>get(TypeSerializerCollection $self)Get the appropriate TypeSerializer for the provided type T, or null if none is applicable. final static <T extends Any> TypeSerializer<T>get(TypeSerializerCollection $self, KClass<T> type)Get the appropriate TypeSerializer for the provided type type, or null if none is applicable. final static <A extends Annotation> ObjectMapper.Factory.BuilderaddProcessor(ObjectMapper.Factory.Builder $self, KClass<A> definition, Processor.Factory<A, Object> factory)Register a Processor that will process fields after write, accepting Kotlin types. final static <A extends Annotation, T extends Any> ObjectMapper.Factory.BuilderaddProcessor(ObjectMapper.Factory.Builder $self, KClass<A> definition, KClass<T> valueType, Processor.Factory<A, T> factory)Register a Processor that will process fields after write, accepting Kotlin types. final static <A extends Annotation> ObjectMapper.Factory.BuilderaddProcessor(ObjectMapper.Factory.Builder $self, Processor.Factory<A, Object> factory)Register a Processor that will process fields after write, accepting parameterized types. final static <A extends Annotation, T extends Any> ObjectMapper.Factory.BuilderaddProcessorFull(ObjectMapper.Factory.Builder $self, Processor.Factory<A, T> factory)Register a Processor that will process fields after write, accepting parameterized types. final static <A extends Annotation> ObjectMapper.Factory.BuilderaddConstraint(ObjectMapper.Factory.Builder $self, KClass<A> definition, Constraint.Factory<A, Object> factory)Register a Constraint that will be used to validate fields, accepting Kotlin types. final static <A extends Annotation, T extends Any> ObjectMapper.Factory.BuilderaddConstraint(ObjectMapper.Factory.Builder $self, KClass<A> definition, KClass<T> valueType, Constraint.Factory<A, T> factory)Register a Constraint that will be used to validate fields, accepting Kotlin types. final static <A extends Annotation> ObjectMapper.Factory.BuilderaddConstraint(ObjectMapper.Factory.Builder $self, Constraint.Factory<A, Object> factory)Register a Constraint that will be used to validate fields, accepting parameterized types. final static <A extends Annotation, T extends Any> ObjectMapper.Factory.BuilderaddConstraintFull(ObjectMapper.Factory.Builder $self, Constraint.Factory<A, T> factory)Register a Constraint that will be used to validate fields, accepting parameterized types. -
-
Method Detail
-
get
final static <T extends Any> ObjectMapper<T> get(ObjectMapper.Factory $self)
Create an object mapper with the given Factory for objects of type T, accepting parameterized types.
-
get
final static <T extends Any> ObjectMapper<T> get(ObjectMapper.Factory $self, KClass<T> type)
Get an object mapper for the kotlin class provided.
This cannot be used for parameterized types.
-
get
final static <T extends Any> TypeSerializer<T> get(TypeSerializerCollection $self)
Get the appropriate TypeSerializer for the provided type T, or null if none is applicable.
-
get
final static <T extends Any> TypeSerializer<T> get(TypeSerializerCollection $self, KClass<T> type)
Get the appropriate TypeSerializer for the provided type type, or null if none is applicable.
-
addProcessor
final static <A extends Annotation> ObjectMapper.Factory.Builder addProcessor(ObjectMapper.Factory.Builder $self, KClass<A> definition, Processor.Factory<A, Object> factory)
Register a Processor that will process fields after write, accepting Kotlin types.
-
addProcessor
final static <A extends Annotation, T extends Any> ObjectMapper.Factory.Builder addProcessor(ObjectMapper.Factory.Builder $self, KClass<A> definition, KClass<T> valueType, Processor.Factory<A, T> factory)
Register a Processor that will process fields after write, accepting Kotlin types.
-
addProcessor
final static <A extends Annotation> ObjectMapper.Factory.Builder addProcessor(ObjectMapper.Factory.Builder $self, Processor.Factory<A, Object> factory)
Register a Processor that will process fields after write, accepting parameterized types.
-
addProcessorFull
final static <A extends Annotation, T extends Any> ObjectMapper.Factory.Builder addProcessorFull(ObjectMapper.Factory.Builder $self, Processor.Factory<A, T> factory)
Register a Processor that will process fields after write, accepting parameterized types.
-
addConstraint
final static <A extends Annotation> ObjectMapper.Factory.Builder addConstraint(ObjectMapper.Factory.Builder $self, KClass<A> definition, Constraint.Factory<A, Object> factory)
Register a Constraint that will be used to validate fields, accepting Kotlin types.
-
addConstraint
final static <A extends Annotation, T extends Any> ObjectMapper.Factory.Builder addConstraint(ObjectMapper.Factory.Builder $self, KClass<A> definition, KClass<T> valueType, Constraint.Factory<A, T> factory)
Register a Constraint that will be used to validate fields, accepting Kotlin types.
-
addConstraint
final static <A extends Annotation> ObjectMapper.Factory.Builder addConstraint(ObjectMapper.Factory.Builder $self, Constraint.Factory<A, Object> factory)
Register a Constraint that will be used to validate fields, accepting parameterized types.
-
addConstraintFull
final static <A extends Annotation, T extends Any> ObjectMapper.Factory.Builder addConstraintFull(ObjectMapper.Factory.Builder $self, Constraint.Factory<A, T> factory)
Register a Constraint that will be used to validate fields, accepting parameterized types.
-
-
-
-