Public Member Functions | |
BaseParcel (Parcel in, int parcelVersion) | |
void | setParcelVersion (int targetParcelVersion) |
final int | getParcelVersion () |
String | getClassName () |
void | writeToParcel (Parcel dest, int flags) |
int | describeContents () |
Static Public Attributes | |
static final Parcelable.Creator< BaseParcel > | CREATOR |
Static Protected Member Functions | |
static void | safelySetParcelVersion (final int targetParcelVersion, @Nullable BaseParcel item) |
static void | safelySetParcelVersion (final int targetParcelVersion, @Nullable List<? extends BaseParcel > items) |
static< T extends BaseParcel > void | safelySetParcelVersion (final int targetParcelVersion, @Nullable T[] items) |
A utility that provides some basic reflection-based parcel building. Subclasses are expected to implement a constructor that receives a parcelable, and must call super when writing to the parcel. The ParcelCreator class should be used for the CREATOR object, this allows the object to be built properly from the parcel. This solves those problems associated with reconstructing objects that are sub-classes of the object defined in the AIDL.
Definition at line 22 of file BaseParcel.java.
BaseParcel | ( | Parcel | in, |
int | parcelVersion | ||
) |
Should be overridden by child classes to handle versioned parcel loading.
Definition at line 32 of file BaseParcel.java.
String getClassName | ( | ) |
Used to parcel/unparcel the proper class dynamically using reflection, without any problems when extending the various parcelable classes. Can be overridden to allow repackaging classes between parcel versions.
Definition at line 46 of file BaseParcel.java.
void setParcelVersion | ( | int | targetParcelVersion | ) |
Meant to be overridden to allow a deep copy of the target version.
Definition at line 37 of file BaseParcel.java.
|
static |
Parcelable creator, returning a concrete implementation.
Definition at line 68 of file BaseParcel.java.
This document is the confidential property of Verifone, Inc. Any reproduction or distribution of this document, in whole or in part, or the disclosure of any of the information contained herein, without the prior written consent of Verifone, Inc. is prohibited. This document and any supplemental material supplied as part of any review must be returned to Verifone, Inc. upon request. Notice: This document may go through material revisions over time. While the Company will make every effort to keep readers updated as changes occur, care must be taken by the reader to make sure they are reading the latest version. Version numbers appear in the title page and revision history page of this document. All rights reserved. Verifone, the Verifone logo are either trademarks or registered trademarks of Verifone in the United States and/or other countries. All other trademarks or brand names are properties of their respective holders.