1 package com.davemorrissey.labs.subscaleview.decoder; 2 3 import java.lang.reflect.InvocationTargetException; 4 5 /** 6 * Interface for {@link ImageDecoder} and {@link ImageRegionDecoder} factories. 7 * @param <T> the class of decoder that will be produced. 8 */ 9 public interface DecoderFactory<T> { 10 11 /** 12 * Produce a new instance of a decoder with type {@link T}. 13 * @return a new instance of your decoder. 14 * @throws IllegalAccessException if the factory class cannot be instantiated. 15 * @throws InstantiationException if the factory class cannot be instantiated. 16 * @throws NoSuchMethodException if the factory class cannot be instantiated. 17 * @throws InvocationTargetException if the factory class cannot be instantiated. 18 */ 19 T make() throws IllegalAccessException, InstantiationException, NoSuchMethodException, InvocationTargetException; 20 21 } 22