Class ImplementationFactoryRegistry


  • public class ImplementationFactoryRegistry
    extends java.lang.Object
    Author:
    Fabrizio Giudici
    • Constructor Detail

      • ImplementationFactoryRegistry

        public ImplementationFactoryRegistry()
    • Method Detail

      • createImageModel

        @Nonnull
        public ImageModel createImageModel​(@Nonnull
                                           java.lang.Object image)
      • findImplementation

        @Nonnull
        public OperationImplementation findImplementation​(@Nonnull
                                                          Operation operation,
                                                          @Nonnull
                                                          ImageModel imageModel,
                                                          boolean canConvert)
        Finds the concrete implementation for a given operation. If canConvert is false, only the first strictly compatible implementations is returned; otherwise the first implementation that is compatible through a conversion is returned.
        Parameters:
        operation - operation
        imageModel - the imageModel
        canConvert - is image conversion acceptable?
        Returns:
        the implementation
        Throws:
        java.lang.UnsupportedOperationException - if no implementation has been found