com.davemorrissey.labs.subscaleview.decoder

## Class CompatDecoderFactory<T>

- java.lang.Object
- - com.davemorrissey.labs.subscaleview.decoder.CompatDecoderFactory<T>

Type Parameters:
  `T` - The base type of the decoder this factory will produce.

All Implemented Interfaces:
  DecoderFactory<T>

    public class CompatDecoderFactory<T>
    extends Object
    implements DecoderFactory<T>

Compatibility factory to instantiate decoders with empty public constructors.

### Constructor Summary

Constructors
Constructor and Description
`CompatDecoderFactory(Class<? extends T> clazz)` Construct a factory for the given class.
`CompatDecoderFactory(Class<? extends T> clazz, Bitmap.Config bitmapConfig)` Construct a factory for the given class.

### Method Summary

All Methods Instance Methods Concrete Methods
`T` `make()` Produce a new instance of a decoder with type `T`.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### CompatDecoderFactory

    public CompatDecoderFactory(@NonNull
                                Class<? extends T> clazz)

Construct a factory for the given class. This must have a default constructor.

Parameters:
  `clazz` - a class that implements `ImageDecoder` or `ImageRegionDecoder`.

#### CompatDecoderFactory

    public CompatDecoderFactory(@NonNull
                                Class<? extends T> clazz,
                                Bitmap.Config bitmapConfig)

Construct a factory for the given class. This must have a constructor that accepts a `Bitmap.Config` instance.

Parameters:
  `clazz` - a class that implements `ImageDecoder` or `ImageRegionDecoder`.
  `bitmapConfig` - bitmap configuration to be used when loading images.

### Method Detail

#### make

    @NonNull
    public T make()
                    throws IllegalAccessException,
                           InstantiationException,
                           NoSuchMethodException,
                           InvocationTargetException

Description copied from interface: `DecoderFactory`
Produce a new instance of a decoder with type `T`.

Specified by:
  `make` in interface `DecoderFactory<T>`
Returns:
  a new instance of your decoder.
Throws:
  `IllegalAccessException` - if the factory class cannot be instantiated.
  `InstantiationException` - if the factory class cannot be instantiated.
  `NoSuchMethodException` - if the factory class cannot be instantiated.
  `InvocationTargetException` - if the factory class cannot be instantiated.