Factory
interface Factory
Known Indirect Subclasses
|
Implementations of Factory
interface are responsible to instantiate ViewModels.
Summary
Public methods |
abstract T |
Creates a new instance of the given Class .
|
Public methods
create
@NonNull abstract fun <T : ViewModel!> create(@NonNull modelClass: Class<T>): T
Creates a new instance of the given Class
.
Parameters |
modelClass |
Class<T>: a Class whose instance is requested |
<T> |
The type parameter for the ViewModel. |
Return |
T |
a newly created ViewModel |
Content and code samples on this page are subject to the licenses described in the Content License. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2020-11-05 UTC.