Class LoadPathCache


  • public class LoadPathCache
    extends java.lang.Object
    Maintains a cache of data, resource, and transcode classes to available LoadPaths capable of decoding with the requested types.
    • Constructor Summary

      Constructors 
      Constructor Description
      LoadPathCache()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      <Data,​TResource,​Transcode>
      LoadPath<Data,​TResource,​Transcode>
      get​(java.lang.Class<Data> dataClass, java.lang.Class<TResource> resourceClass, java.lang.Class<Transcode> transcodeClass)
      May return NO_PATHS_SIGNAL to indicate that we've previously found that there are 0 available load paths for the requested types.
      boolean isEmptyLoadPath​(LoadPath<?,​?,​?> path)
      Returns true if the given LoadPath is the signal object returned from get(Class, Class, Class) that indicates that we've previously found that there are no available paths to load the requested resources and false otherwise.
      void put​(java.lang.Class<?> dataClass, java.lang.Class<?> resourceClass, java.lang.Class<?> transcodeClass, LoadPath<?,​?,​?> loadPath)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • LoadPathCache

        public LoadPathCache()
    • Method Detail

      • isEmptyLoadPath

        public boolean isEmptyLoadPath​(@Nullable
                                       LoadPath<?,​?,​?> path)
        Returns true if the given LoadPath is the signal object returned from get(Class, Class, Class) that indicates that we've previously found that there are no available paths to load the requested resources and false otherwise.
      • get

        @Nullable
        public <Data,​TResource,​Transcode> LoadPath<Data,​TResource,​Transcode> get​(java.lang.Class<Data> dataClass,
                                                                                                         java.lang.Class<TResource> resourceClass,
                                                                                                         java.lang.Class<Transcode> transcodeClass)
        May return NO_PATHS_SIGNAL to indicate that we've previously found that there are 0 available load paths for the requested types. Callers must check using isEmptyLoadPath(LoadPath) before using any load path returned by this method.
      • put

        public void put​(java.lang.Class<?> dataClass,
                        java.lang.Class<?> resourceClass,
                        java.lang.Class<?> transcodeClass,
                        @Nullable
                        LoadPath<?,​?,​?> loadPath)