Logo
Developer SDK
Version 1.9.632.913d652c-152450467.
BaseParcel Class Referenceabstract
Inheritance diagram for BaseParcel:
CommerceResponse AmountTotals Device Receipt TransactionQuery Status CPBaseParcel CommerceEvent AmountAdjustment Basket BasketAdjustment BasketItem CardInformation LoyaltyAdjustment LoyaltyIdentifier Payment Transaction

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< BaseParcelCREATOR
 

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)
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ BaseParcel()

BaseParcel ( Parcel  in,
int  parcelVersion 
)

Should be overridden by child classes to handle versioned parcel loading.

Definition at line 32 of file BaseParcel.java.

Member Function Documentation

◆ getClassName()

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.

◆ setParcelVersion()

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.

Member Data Documentation

◆ CREATOR

final Parcelable.Creator<BaseParcel> CREATOR
static
Initial value:
=
(Parcelable.Creator<BaseParcel>) new ParcelCreator<>()

Parcelable creator, returning a concrete implementation.

Definition at line 68 of file BaseParcel.java.


The documentation for this class was generated from the following file:

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.