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>
    The UnmarshalTypeFactory defines the functionality which must be provided in order to create unmarshaling functionality from an external representation such as a String or an InputStream to an internal representation of a given data structure.
    • 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.