com.bumptech.glide.Registry.getDecodePaths()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(2.0k)|赞(0)|评价(0)|浏览(163)

本文整理了Java中com.bumptech.glide.Registry.getDecodePaths方法的一些代码示例,展示了Registry.getDecodePaths的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Registry.getDecodePaths方法的具体详情如下:
包路径:com.bumptech.glide.Registry
类名称:Registry
方法名:getDecodePaths

Registry.getDecodePaths介绍

暂无

代码示例

代码示例来源:origin: bumptech/glide

@Nullable
public <Data, TResource, Transcode> LoadPath<Data, TResource, Transcode> getLoadPath(
  @NonNull Class<Data> dataClass, @NonNull Class<TResource> resourceClass,
  @NonNull Class<Transcode> transcodeClass) {
 LoadPath<Data, TResource, Transcode> result =
   loadPathCache.get(dataClass, resourceClass, transcodeClass);
 if (loadPathCache.isEmptyLoadPath(result)) {
  return null;
 } else if (result == null) {
  List<DecodePath<Data, TResource, Transcode>> decodePaths =
    getDecodePaths(dataClass, resourceClass, transcodeClass);
  // It's possible there is no way to decode or transcode to the desired types from a given
  // data class.
  if (decodePaths.isEmpty()) {
   result = null;
  } else {
   result =
     new LoadPath<>(
       dataClass, resourceClass, transcodeClass, decodePaths, throwableListPool);
  }
  loadPathCache.put(dataClass, resourceClass, transcodeClass, result);
 }
 return result;
}

代码示例来源:origin: mozilla-tw/Rocket

public <Data, TResource, Transcode> LoadPath<Data, TResource, Transcode> getLoadPath(
  Class<Data> dataClass, Class<TResource> resourceClass, Class<Transcode> transcodeClass) {
 LoadPath<Data, TResource, Transcode> result =
   loadPathCache.get(dataClass, resourceClass, transcodeClass);
 if (result == null && !loadPathCache.contains(dataClass, resourceClass, transcodeClass)) {
  List<DecodePath<Data, TResource, Transcode>> decodePaths =
    getDecodePaths(dataClass, resourceClass, transcodeClass);
  // It's possible there is no way to decode or transcode to the desired types from a given
  // data class.
  if (decodePaths.isEmpty()) {
   result = null;
  } else {
   result = new LoadPath<>(dataClass, resourceClass, transcodeClass, decodePaths,
     exceptionListPool);
  }
  loadPathCache.put(dataClass, resourceClass, transcodeClass, result);
 }
 return result;
}

相关文章