Remove generic bound for Parceler
This commit is contained in:
+1
-1
@@ -188,7 +188,7 @@ open class ParcelableCodegenExtension : ExpressionCodegenExtension {
|
||||
|
||||
v.getstatic(containerAsmType.internalName, companionFieldName, companionAsmType.descriptor)
|
||||
v.load(1, PARCEL_TYPE)
|
||||
v.invokevirtual(companionAsmType.internalName, "create", "(${PARCEL_TYPE.descriptor})Landroid/os/Parcelable;", false)
|
||||
v.invokevirtual(companionAsmType.internalName, "create", "(${PARCEL_TYPE.descriptor})Ljava/lang/Object;", false)
|
||||
}
|
||||
else {
|
||||
v.anew(containerAsmType)
|
||||
|
||||
Vendored
+5
-5
@@ -5,20 +5,20 @@ final class User$Companion : java/lang/Object, kotlinx/android/parcel/Parceler {
|
||||
|
||||
public User create(android.os.Parcel p0)
|
||||
|
||||
public android.os.Parcelable create(android.os.Parcel p0)
|
||||
public java.lang.Object create(android.os.Parcel p0)
|
||||
|
||||
public User[] newArray(int p0) {
|
||||
LABEL (L0)
|
||||
LINENUMBER (10)
|
||||
ALOAD (0)
|
||||
ILOAD (1)
|
||||
INVOKESTATIC (kotlinx/android/parcel/Parceler$DefaultImpls, newArray, (Lkotlinx/android/parcel/Parceler;I)[Landroid/os/Parcelable;)
|
||||
INVOKESTATIC (kotlinx/android/parcel/Parceler$DefaultImpls, newArray, (Lkotlinx/android/parcel/Parceler;I)[Ljava/lang/Object;)
|
||||
CHECKCAST
|
||||
ARETURN
|
||||
LABEL (L1)
|
||||
}
|
||||
|
||||
public android.os.Parcelable[] newArray(int p0) {
|
||||
public java.lang.Object[] newArray(int p0) {
|
||||
LABEL (L0)
|
||||
LINENUMBER (10)
|
||||
ALOAD (0)
|
||||
@@ -30,7 +30,7 @@ final class User$Companion : java/lang/Object, kotlinx/android/parcel/Parceler {
|
||||
|
||||
public void write(User p0, android.os.Parcel p1, int p2)
|
||||
|
||||
public void write(android.os.Parcelable p0, android.os.Parcel p1, int p2)
|
||||
public void write(java.lang.Object p0, android.os.Parcel p1, int p2)
|
||||
}
|
||||
|
||||
public final class User$Creator : java/lang/Object, android/os/Parcelable$Creator {
|
||||
@@ -43,7 +43,7 @@ public final class User$Creator : java/lang/Object, android/os/Parcelable$Creato
|
||||
INVOKESTATIC (kotlin/jvm/internal/Intrinsics, checkParameterIsNotNull, (Ljava/lang/Object;Ljava/lang/String;)V)
|
||||
GETSTATIC (Companion, LUser$Companion;)
|
||||
ALOAD (1)
|
||||
INVOKEVIRTUAL (User$Companion, create, (Landroid/os/Parcel;)Landroid/os/Parcelable;)
|
||||
INVOKEVIRTUAL (User$Companion, create, (Landroid/os/Parcel;)Ljava/lang/Object;)
|
||||
ARETURN
|
||||
LABEL (L1)
|
||||
}
|
||||
|
||||
+3
-3
@@ -5,7 +5,7 @@ final class User$Companion : java/lang/Object, kotlinx/android/parcel/Parceler {
|
||||
|
||||
public User create(android.os.Parcel p0)
|
||||
|
||||
public android.os.Parcelable create(android.os.Parcel p0)
|
||||
public java.lang.Object create(android.os.Parcel p0)
|
||||
|
||||
public User[] newArray(int p0) {
|
||||
LABEL (L0)
|
||||
@@ -16,7 +16,7 @@ final class User$Companion : java/lang/Object, kotlinx/android/parcel/Parceler {
|
||||
LABEL (L1)
|
||||
}
|
||||
|
||||
public android.os.Parcelable[] newArray(int p0) {
|
||||
public java.lang.Object[] newArray(int p0) {
|
||||
LABEL (L0)
|
||||
LINENUMBER (10)
|
||||
ALOAD (0)
|
||||
@@ -28,7 +28,7 @@ final class User$Companion : java/lang/Object, kotlinx/android/parcel/Parceler {
|
||||
|
||||
public void write(User p0, android.os.Parcel p1, int p2)
|
||||
|
||||
public void write(android.os.Parcelable p0, android.os.Parcel p1, int p2)
|
||||
public void write(java.lang.Object p0, android.os.Parcel p1, int p2)
|
||||
}
|
||||
|
||||
public final class User$Creator : java/lang/Object, android/os/Parcelable$Creator {
|
||||
|
||||
+7
-7
@@ -20,21 +20,21 @@ package kotlinx.android.parcel
|
||||
import android.os.Parcel
|
||||
import android.os.Parcelable
|
||||
|
||||
interface Parceler<P: Parcelable> {
|
||||
interface Parceler<T> {
|
||||
/**
|
||||
* Writes the [P] instance state to the [parcel].
|
||||
* Writes the [T] instance state to the [parcel].
|
||||
*/
|
||||
fun P.write(parcel: Parcel, flags: Int)
|
||||
fun T.write(parcel: Parcel, flags: Int)
|
||||
|
||||
/**
|
||||
* Reads the [P] instance state from the [parcel], constructs the new [P] instance and returns it.
|
||||
* Reads the [T] instance state from the [parcel], constructs the new [T] instance and returns it.
|
||||
*/
|
||||
fun create(parcel: Parcel): P
|
||||
fun create(parcel: Parcel): T
|
||||
|
||||
/**
|
||||
* Returns a new [Array]<P> with the given array [size].
|
||||
* Returns a new [Array]<T> with the given array [size].
|
||||
*/
|
||||
fun newArray(size: Int): Array<P> {
|
||||
fun newArray(size: Int): Array<T> {
|
||||
throw NotImplementedError("Generated by Android Extensions automatically")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user