# Parcelable.ClassLoaderCreator

Added in[API level 13](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

# ClassLoaderCreator

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/android/os/Parcelable.ClassLoaderCreator "View this page in Java")  

```
interface ClassLoaderCreator<T : Any!> : Parcelable.Creator<T>
```

|--------------------------------------------------------------------------------------------------------------------------------------|
| [android.os.Parcelable.ClassLoaderCreator](https://developer.android.com/reference/kotlin/android/os/Parcelable.ClassLoaderCreator#) |

Specialization of[Creator](https://developer.android.com/reference/kotlin/android/os/Parcelable.Creator)that allows you to receive the ClassLoader the object is being created in.

## Summary

|                                                                                                                                                                                                                                                                                                                                             Public methods                                                                                                                                                                                                                                                                                                                                              ||
|-----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| abstractT | [createFromParcel](https://developer.android.com/reference/kotlin/android/os/Parcelable.ClassLoaderCreator#createFromParcel(android.os.Parcel,%20java.lang.ClassLoader))`(`source:` `[Parcel](https://developer.android.com/reference/kotlin/android/os/Parcel)!`, `loader:` `[ClassLoader](https://developer.android.com/reference/kotlin/java/lang/ClassLoader.html#)!`)` Create a new instance of the Parcelable class, instantiating it from the given Parcel whose data had previously been written by[Parcelable.writeToParcel()](https://developer.android.com/reference/kotlin/android/os/Parcelable#writeToParcel(android.os.Parcel,%20kotlin.Int))and using the given ClassLoader. |

| Inherited functions ||
|---|---|
| From class[Creator](https://developer.android.com/reference/kotlin/android/os/Parcelable.Creator) |------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | T                                                                                  | [createFromParcel](https://developer.android.com/reference/kotlin/android/os/Parcelable.Creator#createFromParcel(android.os.Parcel))`(`source:` `[Parcel](https://developer.android.com/reference/kotlin/android/os/Parcel)!`)` <br /> Create a new instance of the Parcelable class, instantiating it from the given Parcel whose data had previously been written by[Parcelable.writeToParcel()](https://developer.android.com/reference/kotlin/android/os/Parcelable#writeToParcel(android.os.Parcel,%20kotlin.Int)). <br /> | | [Array](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-array/index.html)<T>! | [newArray](https://developer.android.com/reference/kotlin/android/os/Parcelable.Creator#newArray(kotlin.Int))`(`size:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` <br /> Create a new array of the Parcelable class. <br />                                                                                                                                                                                                                                                                 | ||

## Public methods

### createFromParcel

Added in[API level 13](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
abstract fun createFromParcel(
    source: Parcel!, 
    loader: ClassLoader!
): T
```

Create a new instance of the Parcelable class, instantiating it from the given Parcel whose data had previously been written by[Parcelable.writeToParcel()](https://developer.android.com/reference/kotlin/android/os/Parcelable#writeToParcel(android.os.Parcel,%20kotlin.Int))and using the given ClassLoader.

|                                                                         Parameters                                                                         ||
|----------|--------------------------------------------------------------------------------------------------------------------------------------------------|
| `source` | [Parcel](https://developer.android.com/reference/kotlin/android/os/Parcel)!:The Parcel to read the object's data from.                           |
| `loader` | [ClassLoader](https://developer.android.com/reference/kotlin/java/lang/ClassLoader.html#)!:The ClassLoader that this object is being created in. |

|                       Return                       ||
|---|-------------------------------------------------|
| T | Returns a new instance of the Parcelable class. |