Class TranscoderRegistry
- java.lang.Object
-
- com.bumptech.glide.load.resource.transcode.TranscoderRegistry
-
public class TranscoderRegistry extends java.lang.ObjectA class that allowsResourceTranscoders to be registered and retrieved by the classes they convert between.
-
-
Constructor Summary
Constructors Constructor Description TranscoderRegistry()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <Z,R>
ResourceTranscoder<Z,R>get(java.lang.Class<Z> resourceClass, java.lang.Class<R> transcodedClass)Returns the currently registeredResourceTranscoderfor the given classes.<Z,R>
java.util.List<java.lang.Class<R>>getTranscodeClasses(java.lang.Class<Z> resourceClass, java.lang.Class<R> transcodeClass)<Z,R>
voidregister(java.lang.Class<Z> decodedClass, java.lang.Class<R> transcodedClass, ResourceTranscoder<Z,R> transcoder)Registers the givenResourceTranscoderusing the given classes so it can later be retrieved using the given classes.
-
-
-
Method Detail
-
register
public <Z,R> void register(@NonNull java.lang.Class<Z> decodedClass, @NonNull java.lang.Class<R> transcodedClass, @NonNull ResourceTranscoder<Z,R> transcoder)Registers the givenResourceTranscoderusing the given classes so it can later be retrieved using the given classes.- Type Parameters:
Z- The type of the resource that the transcoder transcodes from.R- The type of the resource that the transcoder transcodes to.- Parameters:
decodedClass- The class of the resource that the transcoder transcodes from.transcodedClass- The class of the resource that the transcoder transcodes to.transcoder- The transcoder.
-
get
@NonNull public <Z,R> ResourceTranscoder<Z,R> get(@NonNull java.lang.Class<Z> resourceClass, @NonNull java.lang.Class<R> transcodedClass)
Returns the currently registeredResourceTranscoderfor the given classes.- Type Parameters:
Z- The type of the resource that the transcoder transcodes from.R- The type of the resource that the transcoder transcodes to.- Parameters:
resourceClass- The class of the resource that the transcoder transcodes from.transcodedClass- The class of the resource that the transcoder transcodes to.
-
getTranscodeClasses
@NonNull public <Z,R> java.util.List<java.lang.Class<R>> getTranscodeClasses(@NonNull java.lang.Class<Z> resourceClass, @NonNull java.lang.Class<R> transcodeClass)
-
-