-
public class TranscoderRegistryA class that allows com.mobwith.imgmodule.load.resource.transcode.ResourceTranscoders to be registered and retrieved by the classes they convert between.
-
-
Method Summary
Modifier and Type Method Description synchronized <Z, R> voidregister(@NonNull() Class<Z> decodedClass, @NonNull() Class<R> transcodedClass, @NonNull() ResourceTranscoder<Z, R> transcoder)Registers the given com.mobwith.imgmodule.load.resource.transcode.ResourceTranscoder usingthe given classes so it can later be retrieved using the given classes. synchronized <Z, R> ResourceTranscoder<Z, R>get(@NonNull() Class<Z> resourceClass, @NonNull() Class<R> transcodedClass)Returns the currently registered for the given classes. synchronized <Z, R> List<Class<R>>getTranscodeClasses(@NonNull() Class<Z> resourceClass, @NonNull() Class<R> transcodeClass)-
-
Method Detail
-
register
synchronized <Z, R> void register(@NonNull() Class<Z> decodedClass, @NonNull() Class<R> transcodedClass, @NonNull() ResourceTranscoder<Z, R> transcoder)
Registers the given com.mobwith.imgmodule.load.resource.transcode.ResourceTranscoder usingthe given classes so it can later be retrieved using the given classes.
- 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() synchronized <Z, R> ResourceTranscoder<Z, R> get(@NonNull() Class<Z> resourceClass, @NonNull() Class<R> transcodedClass)
Returns the currently registered for the given classes.
- Parameters:
resourceClass- The class of the resource that the transcoder transcodes from.transcodedClass- The class of the resource that the transcoder transcodes to.
-
-
-
-