Class DefaultConnectorFactoryDescriptor.SerializerSupplier<T>
java.lang.Object
de.iip_ecosphere.platform.connectors.DefaultConnectorFactoryDescriptor.SerializerSupplier<T>
- Type Parameters:
T- the data type
- Enclosing class:
DefaultConnectorFactoryDescriptor
Type-safe serializer supplier.
- Author:
- Holger Eichelberger, SSE
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSerializerSupplier(Supplier<ChanneledConnectorOutputTypeAdapter.ChanneledSerializer<T>> supplier, Class<T> cls) Creates an instance. -
Method Summary
Modifier and TypeMethodDescriptionReturns an instance if apparently type-compatible.
-
Field Details
-
supplier
-
cls
-
-
Constructor Details
-
SerializerSupplier
public SerializerSupplier(Supplier<ChanneledConnectorOutputTypeAdapter.ChanneledSerializer<T>> supplier, Class<T> cls) Creates an instance.- Parameters:
supplier- the suppliercls- the data type of the serializer
-
-
Method Details
-
get
Returns an instance if apparently type-compatible.- Type Parameters:
TT- the desired data type- Parameters:
cls- the desired data type class- Returns:
- the instance or null if it is not possible to create/cast an instance
-