Package it.tidalwave.image.op
Class ImplementationFactory
- java.lang.Object
-
- it.tidalwave.image.op.ImplementationFactory
-
- Direct Known Subclasses:
ImplementationFactoryJ2D
public abstract class ImplementationFactory extends java.lang.Object
- Author:
- Fabrizio Giudici
-
-
Constructor Summary
Constructors Constructor Description ImplementationFactory()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract boolean
canConvertFrom(java.lang.Class imageClass)
Return true if we can convert the given imageClass into our specific image class.abstract boolean
canConvertTo(java.lang.Class<?> imageClass)
abstract ImageModel
convertFrom(java.lang.Object image)
Converts the given image into our specific image representation.abstract java.lang.Object
convertTo(java.lang.Object image)
ImageModel
createImageModel(java.awt.image.BufferedImage image)
OperationImplementation<Operation,java.lang.Object>
findImplementation(Operation operation)
Finds the concrete implementation for a given operation.void
registerImplementation(java.lang.Class<? extends Operation> operationClass, java.lang.Class<? extends OperationImplementation> implementationClass)
void
unregisterImplementation(java.lang.Class<? extends Operation> operationClass)
-
-
-
Method Detail
-
registerImplementation
public void registerImplementation(@Nonnull java.lang.Class<? extends Operation> operationClass, @Nonnull java.lang.Class<? extends OperationImplementation> implementationClass)
-
unregisterImplementation
public void unregisterImplementation(@Nonnull java.lang.Class<? extends Operation> operationClass)
-
findImplementation
@Nonnull public OperationImplementation<Operation,java.lang.Object> findImplementation(@Nonnull Operation operation)
Finds the concrete implementation for a given operation.- Parameters:
operation
- operation- Returns:
- the implementation (null if not supported)
-
createImageModel
@Nonnull public ImageModel createImageModel(@Nonnull java.awt.image.BufferedImage image)
-
canConvertFrom
public abstract boolean canConvertFrom(@Nonnull java.lang.Class imageClass)
Return true if we can convert the given imageClass into our specific image class.
-
convertFrom
@Nonnull public abstract ImageModel convertFrom(@Nonnull java.lang.Object image)
Converts the given image into our specific image representation.
-
canConvertTo
public abstract boolean canConvertTo(@Nonnull java.lang.Class<?> imageClass)
-
convertTo
@Nonnull public abstract java.lang.Object convertTo(@Nonnull java.lang.Object image)
-
-