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 TcreateFromParcel(Parcel source) Create a new instance of theParcelableclass, instantiating it from the givenParcelwhose data had previously been written byParcelable.writeToParcel(Parcel, int).createFromParcel(Parcel source, ClassLoader loader) Create a new instance of theParcelableclass, instantiating it from the givenParcelwhose data had previously been written byParcelable.writeToParcel(Parcel, int)and using the givenClassLoader.
-
Method Details
-
createFromParcel
Description copied from interface:Parcelable.CreatorCreate a new instance of theParcelableclass, instantiating it from the givenParcelwhose data had previously been written byParcelable.writeToParcel(Parcel, int).- Specified by:
createFromParcelin interfaceParcelable.Creator<T>- Parameters:
source- the stream to read the object's data from- Returns:
- a new instance of the
Parcelableclass
-
createFromParcel
Create a new instance of theParcelableclass, instantiating it from the givenParcelwhose 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
Parcelableclass
-