InputMergerFactory
abstract class InputMergerFactory
kotlin.Any | |
↳ | androidx.work.InputMergerFactory |
A factory object that creates InputMerger
instances. The factory is invoked every time a work runs. You can override the default implementation of this factory by manually initializing WorkManager
(see WorkManager#initialize(Context, Configuration)
and specifying a new InputMergerFactory
in Configuration.Builder#setInputMergerFactory(InputMergerFactory)
.
Summary
Public constructors | |
---|---|
<init>() A factory object that creates |
Public methods | |
---|---|
abstract InputMerger? |
createInputMerger(@NonNull className: String) Override this method to create an instance of a given its fully qualified class name. |
Public constructors
<init>
InputMergerFactory()
A factory object that creates InputMerger
instances. The factory is invoked every time a work runs. You can override the default implementation of this factory by manually initializing WorkManager
(see WorkManager#initialize(Context, Configuration)
and specifying a new InputMergerFactory
in Configuration.Builder#setInputMergerFactory(InputMergerFactory)
.
Public methods
createInputMerger
@Nullable abstract fun createInputMerger(@NonNull className: String): InputMerger?
Override this method to create an instance of a given its fully qualified class name.
Throwing anException
here will crash the application. If an InputMergerFactory
is unable to create an instance of a InputMerger
, it should return null
so it can delegate to the default InputMergerFactory
.
Parameters | |
---|---|
className |
String: The fully qualified class name for the InputMerger |
Return | |
---|---|
InputMerger? |
an instance of InputMerger |