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

  Constructors
  Constructor
  Description
  `NewInstanceFactory()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `<T extends ViewModel>
  T`
  `create(Class<T> modelClass)`
  Creates a new instance of the given `Class`.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### NewInstanceFactory

    public NewInstanceFactory()

- ## Method Details

  - ### create

    @Nonnull public <T extends ViewModel> T create(@Nonnull Class<T> modelClass)
    Description copied from interface: `ViewModelProvider.Factory`
    Creates a new instance of the given `Class`.

    Specified by:
      `create` in interface `ViewModelProvider.Factory`
    Type Parameters:
      `T` - The type parameter for the ViewModel.
    Parameters:
      `modelClass` - a `Class` whose instance is requested
    Returns:
      a newly created ViewModel