added in version 1.0.0
belongs to Maven artifact android.arch.lifecycle:viewmodel:1.1.1
belongs to Maven artifact android.arch.lifecycle:viewmodel:1.1.1
ViewModelProvider.NewInstanceFactory
public
static
class
ViewModelProvider.NewInstanceFactory
extends Object
implements
ViewModelProvider.Factory
java.lang.Object | |
↳ | android.arch.lifecycle.ViewModelProvider.NewInstanceFactory |
Simple factory, which calls empty constructor on the give class.
Summary
Public constructors | |
---|---|
ViewModelProvider.NewInstanceFactory()
|
Public methods | |
---|---|
<T extends ViewModel>
T
|
create(Class<T> modelClass)
Creates a new instance of the given |
Inherited methods | |
---|---|
Public constructors
Public methods
create
added in version 1.0.0
T create (Class<T> modelClass)
Creates a new instance of the given Class
.
Parameters | |
---|---|
modelClass |
Class : a Class whose instance is requested |
Returns | |
---|---|
T |
a newly created ViewModel |
Annotations
Interfaces
Classes
- AndroidViewModel
- Lifecycle
- LifecycleRegistry
- LifecycleService
- LiveData
- LiveDataReactiveStreams
- MediatorLiveData
- MutableLiveData
- ProcessLifecycleOwner
- ServiceLifecycleDispatcher
- Transformations
- ViewModel
- ViewModelProvider
- ViewModelProvider.AndroidViewModelFactory
- ViewModelProvider.NewInstanceFactory
- ViewModelProviders
- ViewModelProviders.DefaultFactory
- ViewModelStore
- ViewModelStores
Enums