Package org.refcodes.factory
Interface UnmarshalTypeFactory<T,SRC>
-
- Type Parameters:
T
- The type of the data structure to which an marshaled (external) representation is to be unmarshaled.SRC
- The type of the marshaled representation.
- All Known Subinterfaces:
UnmarshalTypeFactory.UnmarshalTypeFactoryComposite<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 UnmarshalTypeFactory<T,SRC>
TheUnmarshalTypeFactory
defines the functionality which must be provided in order to create unmarshaling functionality from an external representation such as aString
or anInputStream
to an internal representation of a given data structure.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
UnmarshalTypeFactory.UnmarshalTypeFactoryComplement<T,C>
TheUnmarshalTypeFactory.UnmarshalTypeFactoryComplement
provides inverse functionality to theUnmarshalTypeFactory
.static interface
UnmarshalTypeFactory.UnmarshalTypeFactoryComposite<T,SRC,C>
TheUnmarshalTypeFactory.UnmarshalTypeFactoryComposite
providesUnmarshalTypeFactory
as well asUnmarshalTypeFactory.UnmarshalTypeFactoryComplement
functionality.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description T
toUnmarshaled(SRC aExternalRepresentation)
This method creates / retrieves (converts to) an instance from the provided external representation.default T
toUnmarshaled(SRC aExternalRepresentation, java.util.Map<java.lang.String,java.lang.String> aProperties)
This method creates / retrieves (converts to) an instance from the provided external representation.
-
-
-
Method Detail
-
toUnmarshaled
T toUnmarshaled(SRC aExternalRepresentation) throws org.refcodes.exception.UnmarshalException
This method creates / retrieves (converts to) an instance from the provided external representation.- Parameters:
aExternalRepresentation
- The external representation of the data structure to be created.- Returns:
- The according unmarshaled data structure from the external representation.
- Throws:
org.refcodes.exception.UnmarshalException
- Thrown when unmarshaling / deserializing an object fails.
-
toUnmarshaled
default T toUnmarshaled(SRC aExternalRepresentation, java.util.Map<java.lang.String,java.lang.String> aProperties) throws org.refcodes.exception.UnmarshalException
This method creates / retrieves (converts to) an instance from the provided external representation.- Parameters:
aExternalRepresentation
- The external representation of the data structure to be created.aProperties
- The dynamic properties which are used to configure the desired result.- Returns:
- The according unmarshaled data structure from the external representation.
- Throws:
org.refcodes.exception.UnmarshalException
- Thrown when unmarshaling / deserializing an object fails.
-
-