Package it.tidalwave.image.op
Class ImplementationFactoryRegistry
- java.lang.Object
-
- it.tidalwave.image.op.ImplementationFactoryRegistry
-
public class ImplementationFactoryRegistry extends java.lang.Object
- Author:
- Fabrizio Giudici
-
-
Constructor Summary
Constructors Constructor Description ImplementationFactoryRegistry()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ImageModel
createImageModel(java.lang.Object image)
OperationImplementation
findImplementation(Operation operation, ImageModel imageModel, boolean canConvert)
Finds the concrete implementation for a given operation.static ImplementationFactoryRegistry
getDefault()
-
-
-
Method Detail
-
getDefault
@Nonnull public static ImplementationFactoryRegistry getDefault()
-
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
- operationimageModel
- the imageModelcanConvert
- is image conversion acceptable?- Returns:
- the implementation
- Throws:
java.lang.UnsupportedOperationException
- if no implementation has been found
-
-