Package icyllis.modernui.util

# Interface Parcelable.ClassLoaderCreator<T>

All Superinterfaces:
  `Parcelable.Creator<T>`

Enclosing interface:
  `Parcelable`

Functional Interface:
  This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface Parcelable.ClassLoaderCreator<T> extends Parcelable.Creator<T>
Specialization of `Parcelable.Creator` that allows you to receive the `ClassLoader` the object is being created in.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `default T`
  `createFromParcel(Parcel source)`
  Create a new instance of the `Parcelable` class, instantiating it from the given `Parcel` whose data had previously been written by `Parcelable.writeToParcel(Parcel, int)`.
  `T`
  `createFromParcel(Parcel source, ClassLoader loader)`
  Create a new instance of the `Parcelable` class, instantiating it from the given `Parcel` whose data had previously been written by `Parcelable.writeToParcel(Parcel, int)` and using the given `ClassLoader`.

- ## Method Details

  - ### createFromParcel

    default T createFromParcel(@NonNull Parcel source)
    Description copied from interface: `Parcelable.Creator`
    Create a new instance of the `Parcelable` class, instantiating it from the given `Parcel` whose data had previously been written by `Parcelable.writeToParcel(Parcel, int)`.
    Specified by:
      `createFromParcel` in interface `Parcelable.Creator<T>`
    Parameters:
      `source` - the stream to read the object's data from
    Returns:
      a new instance of the `Parcelable` class

  - ### createFromParcel

    T createFromParcel(@NonNull Parcel source, @Nullable ClassLoader loader)
    Create a new instance of the `Parcelable` class, instantiating it from the given `Parcel` whose data had previously been written by `Parcelable.writeToParcel(Parcel, int)` and using the given `ClassLoader`.
    Parameters:
      `source` - the stream to read the object's data from
      `loader` - the class loader that this object is being created in
    Returns:
      a new instance of the `Parcelable` class