Package icyllis.modernui.lifecycle
Class ViewModelProvider.NewInstanceFactory
java.lang.Object
icyllis.modernui.lifecycle.ViewModelProvider.NewInstanceFactory
- All Implemented Interfaces:
ViewModelProvider.Factory
- Enclosing class:
ViewModelProvider
public static class ViewModelProvider.NewInstanceFactory
extends Object
implements ViewModelProvider.Factory
Simple factory, which calls empty constructor on the give class.
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
NewInstanceFactory
public NewInstanceFactory()
-
-
Method Details
-
create
Description copied from interface:ViewModelProvider.Factory
Creates a new instance of the givenClass
.- Specified by:
create
in interfaceViewModelProvider.Factory
- Type Parameters:
T
- The type parameter for the ViewModel.- Parameters:
modelClass
- aClass
whose instance is requested- Returns:
- a newly created ViewModel
-