@Implements(android.os.Parcel.class) public class ShadowParcel extends Object
Parcel
pretends to be backed by a byte buffer, closely matching Parcel
's position, size, and capacity behavior. However, its internal pure-Java representation
is strongly typed, to detect non-portable code and common testing mistakes. It may throw IllegalArgumentException
or IllegalStateException
for error-prone behavior normal Parcel
tolerates.Constructor | Description |
---|---|
ShadowParcel() |
Modifier and Type | Method | Description |
---|---|---|
static void |
nativeAppendFrom(int thisNativePtr,
int otherNativePtr,
int offset,
int length) |
|
protected static void |
nativeAppendFrom(long thisNativePtr,
long otherNativePtr,
int offset,
int length) |
|
static Number |
nativeCreate() |
|
static byte[] |
nativeCreateByteArray(int nativePtr) |
|
protected static byte[] |
nativeCreateByteArray(long nativePtr) |
|
static int |
nativeDataAvail(int nativePtr) |
|
protected static int |
nativeDataAvail(long nativePtr) |
|
static int |
nativeDataCapacity(int nativePtr) |
|
protected static int |
nativeDataCapacity(long nativePtr) |
|
static int |
nativeDataPosition(int nativePtr) |
|
protected static int |
nativeDataPosition(long nativePtr) |
|
static int |
nativeDataSize(int nativePtr) |
|
protected static int |
nativeDataSize(long nativePtr) |
|
static void |
nativeDestroy(int nativePtr) |
|
protected static void |
nativeDestroy(long nativePtr) |
|
static void |
nativeEnforceInterface(int nativePtr,
String interfaceName) |
|
protected static void |
nativeEnforceInterface(long nativePtr,
String interfaceName) |
|
static void |
nativeFreeBuffer(int nativePtr) |
|
protected static void |
nativeFreeBuffer(long nativePtr) |
|
static byte[] |
nativeMarshall(int nativePtr) |
|
protected static byte[] |
nativeMarshall(long nativePtr) |
|
protected static byte[] |
nativeReadBlob(long nativePtr) |
|
protected static boolean |
nativeReadByteArray(long nativePtr,
byte[] dest,
int destLen) |
|
static double |
nativeReadDouble(int nativePtr) |
|
protected static double |
nativeReadDouble(long nativePtr) |
|
protected static FileDescriptor |
nativeReadFileDescriptor(long nativePtr) |
|
static float |
nativeReadFloat(int nativePtr) |
|
protected static float |
nativeReadFloat(long nativePtr) |
|
static int |
nativeReadInt(int nativePtr) |
|
protected static int |
nativeReadInt(long nativePtr) |
|
static long |
nativeReadLong(int nativePtr) |
|
protected static long |
nativeReadLong(long nativePtr) |
|
static String |
nativeReadString(int nativePtr) |
|
protected static String |
nativeReadString(long nativePtr) |
|
protected static IBinder |
nativeReadStrongBinder(int nativePtr) |
|
protected static IBinder |
nativeReadStrongBinder(long nativePtr) |
|
static void |
nativeSetDataCapacity(int nativePtr,
int size) |
|
protected static void |
nativeSetDataCapacity(long nativePtr,
int size) |
|
static void |
nativeSetDataPosition(int nativePtr,
int pos) |
|
protected static void |
nativeSetDataPosition(long nativePtr,
int pos) |
|
static void |
nativeSetDataSize(int nativePtr,
int size) |
|
protected static void |
nativeSetDataSize(long nativePtr,
int size) |
|
static void |
nativeUnmarshall(int nativePtr,
byte[] data,
int offset,
int length) |
|
protected static void |
nativeUnmarshall(long nativePtr,
byte[] data,
int offset,
int length) |
|
protected static void |
nativeWriteBlob(long nativePtr,
byte[] b,
int offset,
int len) |
|
static void |
nativeWriteByteArray(int nativePtr,
byte[] b,
int offset,
int len) |
|
protected static void |
nativeWriteByteArray(long nativePtr,
byte[] b,
int offset,
int len) |
|
static void |
nativeWriteDouble(int nativePtr,
double val) |
|
protected static void |
nativeWriteDouble(long nativePtr,
double val) |
|
protected static long |
nativeWriteFileDescriptor(long nativePtr,
FileDescriptor val) |
|
static void |
nativeWriteFloat(int nativePtr,
float val) |
|
protected static void |
nativeWriteFloat(long nativePtr,
float val) |
|
static void |
nativeWriteInt(int nativePtr,
int val) |
|
protected static void |
nativeWriteInt(long nativePtr,
int val) |
|
static void |
nativeWriteInterfaceToken(int nativePtr,
String interfaceName) |
|
protected static void |
nativeWriteInterfaceToken(long nativePtr,
String interfaceName) |
|
static void |
nativeWriteLong(int nativePtr,
long val) |
|
protected static void |
nativeWriteLong(long nativePtr,
long val) |
|
static void |
nativeWriteString(int nativePtr,
String val) |
|
protected static void |
nativeWriteString(long nativePtr,
String val) |
|
protected static void |
nativeWriteStrongBinder(int nativePtr,
IBinder val) |
|
protected static void |
nativeWriteStrongBinder(long nativePtr,
IBinder val) |
|
protected static FileDescriptor |
openFileDescriptor(String file,
int mode) |
|
protected <T extends Parcelable> |
readParcelable(ClassLoader loader) |
|
Parcelable.Creator<?> |
readParcelableCreator(ClassLoader loader) |
|
protected void |
writeBlob(byte[] b,
int offset,
int len) |
|
protected void |
writeByteArray(byte[] b,
int offset,
int len) |
@Implementation(maxSdk=17) protected <T extends Parcelable> T readParcelable(ClassLoader loader)
@HiddenApi @Implementation(minSdk=18) public Parcelable.Creator<?> readParcelableCreator(ClassLoader loader)
@Implementation protected void writeByteArray(byte[] b, int offset, int len)
@HiddenApi @Implementation(maxSdk=20) public static int nativeDataSize(int nativePtr)
@Implementation(minSdk=21) protected static int nativeDataSize(long nativePtr)
@HiddenApi @Implementation(maxSdk=20) public static int nativeDataAvail(int nativePtr)
@Implementation(minSdk=21) protected static int nativeDataAvail(long nativePtr)
@HiddenApi @Implementation(maxSdk=20) public static int nativeDataPosition(int nativePtr)
@Implementation(minSdk=21) protected static int nativeDataPosition(long nativePtr)
@HiddenApi @Implementation(maxSdk=20) public static int nativeDataCapacity(int nativePtr)
@Implementation(minSdk=21) protected static int nativeDataCapacity(long nativePtr)
@HiddenApi @Implementation(maxSdk=20) public static void nativeSetDataSize(int nativePtr, int size)
@Implementation(minSdk=21) protected static void nativeSetDataSize(long nativePtr, int size)
@HiddenApi @Implementation(maxSdk=20) public static void nativeSetDataPosition(int nativePtr, int pos)
@Implementation(minSdk=21) protected static void nativeSetDataPosition(long nativePtr, int pos)
@HiddenApi @Implementation(maxSdk=20) public static void nativeSetDataCapacity(int nativePtr, int size)
@Implementation(minSdk=21) protected static void nativeSetDataCapacity(long nativePtr, int size)
@HiddenApi @Implementation(maxSdk=20) public static void nativeWriteByteArray(int nativePtr, byte[] b, int offset, int len)
@Implementation(minSdk=21) protected static void nativeWriteByteArray(long nativePtr, byte[] b, int offset, int len)
@Implementation(minSdk=23) protected void writeBlob(byte[] b, int offset, int len)
@Implementation(minSdk=21) protected static void nativeWriteBlob(long nativePtr, byte[] b, int offset, int len)
@HiddenApi @Implementation(maxSdk=20) public static void nativeWriteInt(int nativePtr, int val)
@Implementation(minSdk=21) protected static void nativeWriteInt(long nativePtr, int val)
@HiddenApi @Implementation(maxSdk=20) public static void nativeWriteLong(int nativePtr, long val)
@Implementation(minSdk=21) protected static void nativeWriteLong(long nativePtr, long val)
@HiddenApi @Implementation(maxSdk=20) public static void nativeWriteFloat(int nativePtr, float val)
@Implementation(minSdk=21) protected static void nativeWriteFloat(long nativePtr, float val)
@HiddenApi @Implementation(maxSdk=20) public static void nativeWriteDouble(int nativePtr, double val)
@Implementation(minSdk=21) protected static void nativeWriteDouble(long nativePtr, double val)
@HiddenApi @Implementation(maxSdk=20) public static void nativeWriteString(int nativePtr, String val)
@Implementation(minSdk=21) protected static void nativeWriteString(long nativePtr, String val)
@HiddenApi @Implementation(maxSdk=20) protected static void nativeWriteStrongBinder(int nativePtr, IBinder val)
@Implementation(minSdk=21) protected static void nativeWriteStrongBinder(long nativePtr, IBinder val)
@HiddenApi @Implementation(maxSdk=20) public static byte[] nativeCreateByteArray(int nativePtr)
@Implementation(minSdk=21) protected static byte[] nativeCreateByteArray(long nativePtr)
@Implementation(minSdk=21) protected static byte[] nativeReadBlob(long nativePtr)
@Implementation(minSdk=27) protected static boolean nativeReadByteArray(long nativePtr, byte[] dest, int destLen)
@HiddenApi @Implementation(maxSdk=20) public static int nativeReadInt(int nativePtr)
@Implementation(minSdk=21) protected static int nativeReadInt(long nativePtr)
@HiddenApi @Implementation(maxSdk=20) public static long nativeReadLong(int nativePtr)
@Implementation(minSdk=21) protected static long nativeReadLong(long nativePtr)
@HiddenApi @Implementation(maxSdk=20) public static float nativeReadFloat(int nativePtr)
@Implementation(minSdk=21) protected static float nativeReadFloat(long nativePtr)
@HiddenApi @Implementation(maxSdk=20) public static double nativeReadDouble(int nativePtr)
@Implementation(minSdk=21) protected static double nativeReadDouble(long nativePtr)
@HiddenApi @Implementation(maxSdk=20) public static String nativeReadString(int nativePtr)
@Implementation(minSdk=21) protected static String nativeReadString(long nativePtr)
@HiddenApi @Implementation(maxSdk=20) protected static IBinder nativeReadStrongBinder(int nativePtr)
@Implementation(minSdk=21) protected static IBinder nativeReadStrongBinder(long nativePtr)
@Implementation @HiddenApi public static Number nativeCreate()
@HiddenApi @Implementation(maxSdk=20) public static void nativeFreeBuffer(int nativePtr)
@Implementation(minSdk=21) protected static void nativeFreeBuffer(long nativePtr)
@HiddenApi @Implementation(maxSdk=20) public static void nativeDestroy(int nativePtr)
@Implementation(minSdk=21) protected static void nativeDestroy(long nativePtr)
@HiddenApi @Implementation(maxSdk=20) public static byte[] nativeMarshall(int nativePtr)
@Implementation(minSdk=21) protected static byte[] nativeMarshall(long nativePtr)
@HiddenApi @Implementation(maxSdk=20) public static void nativeUnmarshall(int nativePtr, byte[] data, int offset, int length)
@Implementation(minSdk=21) protected static void nativeUnmarshall(long nativePtr, byte[] data, int offset, int length)
@HiddenApi @Implementation(maxSdk=20) public static void nativeAppendFrom(int thisNativePtr, int otherNativePtr, int offset, int length)
@Implementation(minSdk=21) protected static void nativeAppendFrom(long thisNativePtr, long otherNativePtr, int offset, int length)
@HiddenApi @Implementation(maxSdk=20) public static void nativeWriteInterfaceToken(int nativePtr, String interfaceName)
@Implementation(minSdk=21) protected static void nativeWriteInterfaceToken(long nativePtr, String interfaceName)
@HiddenApi @Implementation(maxSdk=20) public static void nativeEnforceInterface(int nativePtr, String interfaceName)
@Implementation(minSdk=21) protected static void nativeEnforceInterface(long nativePtr, String interfaceName)
@Implementation(maxSdk=28) protected static FileDescriptor openFileDescriptor(String file, int mode) throws IOException
IOException
@Implementation(minSdk=23) protected static long nativeWriteFileDescriptor(long nativePtr, FileDescriptor val)
@Implementation(minSdk=23) protected static FileDescriptor nativeReadFileDescriptor(long nativePtr)