1 package com.bumptech.glide.provider; 2 3 import com.bumptech.glide.load.Encoder; 4 import com.bumptech.glide.load.ResourceDecoder; 5 import com.bumptech.glide.load.ResourceEncoder; 6 7 import java.io.File; 8 9 /** 10 * A {@link com.bumptech.glide.provider.DataLoadProvider} that returns {@code null} for every class. 11 * 12 * @param <T> unused data type. 13 * @param <Z> unused resource type. 14 */ 15 public class EmptyDataLoadProvider<T, Z> implements DataLoadProvider<T, Z> { 16 private static final DataLoadProvider<?, ?> EMPTY_DATA_LOAD_PROVIDER = new EmptyDataLoadProvider<Object, Object>(); 17 18 @SuppressWarnings("unchecked") 19 public static <T, Z> DataLoadProvider<T, Z> get() { 20 return (DataLoadProvider<T, Z>) EMPTY_DATA_LOAD_PROVIDER; 21 } 22 23 @Override 24 public ResourceDecoder<File, Z> getCacheDecoder() { 25 return null; 26 } 27 28 @Override 29 public ResourceDecoder<T, Z> getSourceDecoder() { 30 return null; 31 } 32 33 @Override 34 public Encoder<T> getSourceEncoder() { 35 return null; 36 } 37 38 @Override 39 public ResourceEncoder<Z> getEncoder() { 40 return null; 41 } 42 } 43