Package net.solarnetwork.central.support
Record Class OutputSerializationSupportContext<T>
java.lang.Object
java.lang.Record
net.solarnetwork.central.support.OutputSerializationSupportContext<T>
- Record Components:
jsonObjectMapper- the ObjectMapper to use for JSONcborObjectMapper- the ObjectMapper to ues for CBORjsonSerializer- the serializer to use for JSON/CBOR outputregistrar- a property serializer registrar for non-JSON/CBOR output
public record OutputSerializationSupportContext<T>(com.fasterxml.jackson.databind.ObjectMapper jsonObjectMapper, com.fasterxml.jackson.databind.ObjectMapper cborObjectMapper, com.fasterxml.jackson.databind.JsonSerializer<T> jsonSerializer, net.solarnetwork.codec.PropertySerializerRegistrar registrar)
extends Record
Supporting services for output serialization.
-
Constructor Summary
ConstructorsConstructorDescriptionOutputSerializationSupportContext(com.fasterxml.jackson.databind.ObjectMapper jsonObjectMapper, com.fasterxml.jackson.databind.ObjectMapper cborObjectMapper, com.fasterxml.jackson.databind.JsonSerializer<T> jsonSerializer, net.solarnetwork.codec.PropertySerializerRegistrar registrar) Creates an instance of aOutputSerializationSupportContextrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncom.fasterxml.jackson.databind.ObjectMapperReturns the value of thecborObjectMapperrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.com.fasterxml.jackson.databind.ObjectMapperReturns the value of thejsonObjectMapperrecord component.com.fasterxml.jackson.databind.JsonSerializer<T> Returns the value of thejsonSerializerrecord component.net.solarnetwork.codec.PropertySerializerRegistrarReturns the value of theregistrarrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
OutputSerializationSupportContext
public OutputSerializationSupportContext(com.fasterxml.jackson.databind.ObjectMapper jsonObjectMapper, com.fasterxml.jackson.databind.ObjectMapper cborObjectMapper, com.fasterxml.jackson.databind.JsonSerializer<T> jsonSerializer, net.solarnetwork.codec.PropertySerializerRegistrar registrar) Creates an instance of aOutputSerializationSupportContextrecord class.- Parameters:
jsonObjectMapper- the value for thejsonObjectMapperrecord componentcborObjectMapper- the value for thecborObjectMapperrecord componentjsonSerializer- the value for thejsonSerializerrecord componentregistrar- the value for theregistrarrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
jsonObjectMapper
public com.fasterxml.jackson.databind.ObjectMapper jsonObjectMapper()Returns the value of thejsonObjectMapperrecord component.- Returns:
- the value of the
jsonObjectMapperrecord component
-
cborObjectMapper
public com.fasterxml.jackson.databind.ObjectMapper cborObjectMapper()Returns the value of thecborObjectMapperrecord component.- Returns:
- the value of the
cborObjectMapperrecord component
-
jsonSerializer
Returns the value of thejsonSerializerrecord component.- Returns:
- the value of the
jsonSerializerrecord component
-
registrar
public net.solarnetwork.codec.PropertySerializerRegistrar registrar()Returns the value of theregistrarrecord component.- Returns:
- the value of the
registrarrecord component
-