Package org.refcodes.factory
Interface MarshalTypeFactory<T,SRC>
-
- Type Parameters:
T
- The type of the data structure from which a marshaled (external) representation is to be unmarshaled.SRC
- The type of the marshaled (external) representation.
- All Known Subinterfaces:
MarshalTypeFactory.MarshalTypeFactoryComposite<T,SRC,C>
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface MarshalTypeFactory<T,SRC>
TheMarshalTypeFactory
defines the functionality which must be provided in order to create marshaling functionality from an internal representation of a given data structure to an external representation such as aString
or anInputStream
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
MarshalTypeFactory.MarshalTypeFactoryComplement<T,C>
TheMarshalTypeFactory.MarshalTypeFactoryComplement
provides inverse functionality to theMarshalTypeFactory
.static interface
MarshalTypeFactory.MarshalTypeFactoryComposite<T,SRC,C>
TheMarshalTypeFactory.MarshalTypeFactoryComposite
providesMarshalTypeFactory
as well asMarshalTypeFactory.MarshalTypeFactoryComplement
functionality.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description SRC
toMarshaled(T aDataStructure)
This method creates / retrieves (converts to) from the provided data structure to its external representation.default SRC
toMarshaled(T aDataStructure, Map<String,String> aProperties)
This method creates / retrieves (converts to) an instance from the provided external representation.
-
-
-
Method Detail
-
toMarshaled
SRC toMarshaled(T aDataStructure) throws org.refcodes.exception.MarshalException
This method creates / retrieves (converts to) from the provided data structure to its external representation.- Parameters:
aDataStructure
- The data structure to be marshaled.- Returns:
- The according marshaled data structure from the external representation.
- Throws:
org.refcodes.exception.MarshalException
- Thrown when marshaling / serializing a data structure fails.
-
toMarshaled
default SRC toMarshaled(T aDataStructure, Map<String,String> aProperties) throws org.refcodes.exception.MarshalException
This method creates / retrieves (converts to) an instance from the provided external representation.- Parameters:
aDataStructure
- The data structure to be marshaled.aProperties
- The dynamic properties which are used to configure the desired result.- Returns:
- The according marshaled data structure from the external representation.
- Throws:
org.refcodes.exception.MarshalException
- Thrown when marshaling / serializing a data structure fails.
-
-