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 TypeMethodDescriptiondefault T
createFromParcel
(Parcel source) Create a new instance of theParcelable
class, instantiating it from the givenParcel
whose data had previously been written byParcelable.writeToParcel(Parcel, int)
.createFromParcel
(Parcel source, ClassLoader loader) Create a new instance of theParcelable
class, instantiating it from the givenParcel
whose data had previously been written byParcelable.writeToParcel(Parcel, int)
and using the givenClassLoader
.
-
Method Details
-
createFromParcel
Description copied from interface:Parcelable.Creator
Create a new instance of theParcelable
class, instantiating it from the givenParcel
whose data had previously been written byParcelable.writeToParcel(Parcel, int)
.- Specified by:
createFromParcel
in interfaceParcelable.Creator<T>
- Parameters:
source
- the stream to read the object's data from- Returns:
- a new instance of the
Parcelable
class
-
createFromParcel
Create a new instance of theParcelable
class, instantiating it from the givenParcel
whose data had previously been written byParcelable.writeToParcel(Parcel, int)
and using the givenClassLoader
.- Parameters:
source
- the stream to read the object's data fromloader
- the class loader that this object is being created in- Returns:
- a new instance of the
Parcelable
class
-