public void addCreator(JDefinedClass jclass) { JClass creatorType = jclass.owner().ref(Creator.class).narrow(jclass); JDefinedClass creatorClass = jclass.owner().anonymousClass(creatorType); addCreateFromParcel(jclass, creatorClass); addNewArray(jclass, creatorClass); JFieldVar creatorField = jclass.field(JMod.PUBLIC | JMod.STATIC | JMod.FINAL, creatorType, "CREATOR"); creatorField.init(JExpr._new(creatorClass)); }
public static <T extends Parcelable> T zza(Parcel paramParcel, int paramInt, Parcelable.Creator<T> paramCreator) { int i = zza(paramParcel, paramInt); int j = paramParcel.dataPosition(); if (i == 0) { return null; } Parcelable localParcelable = (Parcelable)paramCreator.createFromParcel(paramParcel); paramParcel.setDataPosition(i + j); return localParcelable; }
public static <T> T[] zzb(Parcel paramParcel, int paramInt, Parcelable.Creator<T> paramCreator) { int i = zza(paramParcel, paramInt); int j = paramParcel.dataPosition(); if (i == 0) { return null; } Object[] arrayOfObject = paramParcel.createTypedArray(paramCreator); paramParcel.setDataPosition(i + j); return arrayOfObject; }
public static <T> ArrayList<T> zzc(Parcel paramParcel, int paramInt, Parcelable.Creator<T> paramCreator) { int i = zza(paramParcel, paramInt); int j = paramParcel.dataPosition(); if (i == 0) { return null; } ArrayList localArrayList = paramParcel.createTypedArrayList(paramCreator); paramParcel.setDataPosition(i + j); return localArrayList; }
public static <T> Parcelable.Creator<T> newCreator(ParcelableCompatCreatorCallbacks<T> paramParcelableCompatCreatorCallbacks) { if (Build.VERSION.SDK_INT >= 13) { return new ParcelableCompatCreatorHoneycombMR2(paramParcelableCompatCreatorCallbacks); } return new CompatCreator(paramParcelableCompatCreatorCallbacks); }
public static <T extends Parcelable> T a(Parcel paramParcel, int paramInt, Parcelable.Creator<T> paramCreator) { int i1 = a(paramParcel, paramInt); int i2 = paramParcel.dataPosition(); if (i1 == 0) { return null; } Parcelable localParcelable = (Parcelable)paramCreator.createFromParcel(paramParcel); paramParcel.setDataPosition(i1 + i2); return localParcelable; }
public static <T extends SafeParcelable> T a(Intent paramIntent, String paramString, Parcelable.Creator<T> paramCreator) { byte[] arrayOfByte = paramIntent.getByteArrayExtra(paramString); if (arrayOfByte == null) { return null; } a(paramCreator); Parcel localParcel = Parcel.obtain(); localParcel.unmarshall(arrayOfByte, 0, arrayOfByte.length); localParcel.setDataPosition(0); SafeParcelable localSafeParcelable = (SafeParcelable)paramCreator.createFromParcel(localParcel); localParcel.recycle(); return localSafeParcelable; }
public static <T> T[] b(Parcel paramParcel, int paramInt, Parcelable.Creator<T> paramCreator) { int i1 = a(paramParcel, paramInt); int i2 = paramParcel.dataPosition(); if (i1 == 0) { return null; } Object[] arrayOfObject = paramParcel.createTypedArray(paramCreator); paramParcel.setDataPosition(i1 + i2); return arrayOfObject; }
public static <T> ArrayList<T> c(Parcel paramParcel, int paramInt, Parcelable.Creator<T> paramCreator) { int i1 = a(paramParcel, paramInt); int i2 = paramParcel.dataPosition(); if (i1 == 0) { return null; } ArrayList localArrayList = paramParcel.createTypedArrayList(paramCreator); paramParcel.setDataPosition(i1 + i2); return localArrayList; }
private static <T> Parcelable.Creator<T> newCreator(final Class<T> clazz) { return new Parcelable.Creator<T>() { @Override public T createFromParcel(Parcel source) { return readFromParcel(clazz, source); } @Override public T[] newArray(int size) { return Postman.newArray(clazz, size); } }; }
public static <T extends Parcelable> T a(Parcel paramParcel, int paramInt, Parcelable.Creator<T> paramCreator) { int i = a(paramParcel, paramInt); int j = paramParcel.dataPosition(); if (i == 0) return null; Parcelable localParcelable = (Parcelable)paramCreator.createFromParcel(paramParcel); paramParcel.setDataPosition(j + i); return localParcelable; }
public static <T> T[] b(Parcel paramParcel, int paramInt, Parcelable.Creator<T> paramCreator) { int i = a(paramParcel, paramInt); int j = paramParcel.dataPosition(); if (i == 0) return null; Object[] arrayOfObject = paramParcel.createTypedArray(paramCreator); paramParcel.setDataPosition(j + i); return arrayOfObject; }
public static <T> ArrayList<T> c(Parcel paramParcel, int paramInt, Parcelable.Creator<T> paramCreator) { int i = a(paramParcel, paramInt); int j = paramParcel.dataPosition(); if (i == 0) return null; ArrayList localArrayList = paramParcel.createTypedArrayList(paramCreator); paramParcel.setDataPosition(j + i); return localArrayList; }
public static <T extends Parcelable> T a(Parcel paramParcel, int paramInt, Parcelable.Creator<T> paramCreator) { int i = a(paramParcel, paramInt); int j = paramParcel.dataPosition(); if (i == 0) return null; Parcelable localParcelable = (Parcelable)paramCreator.createFromParcel(paramParcel); paramParcel.setDataPosition(i + j); return localParcelable; }
public static <T> ArrayList<T> b(Parcel paramParcel, int paramInt, Parcelable.Creator<T> paramCreator) { int i = a(paramParcel, paramInt); int j = paramParcel.dataPosition(); if (i == 0) return null; ArrayList localArrayList = paramParcel.createTypedArrayList(paramCreator); paramParcel.setDataPosition(i + j); return localArrayList; }
public static <T> Creator<T> newCreator(ParcelableCompatCreatorCallbacks<T> callbacks) { if (VERSION.SDK_INT >= 13) { return ParcelableCompatCreatorHoneycombMR2Stub.instantiate(callbacks); } return new CompatCreator(callbacks); }
static <T> Creator<T> instantiate(ParcelableCompatCreatorCallbacks<T> callbacks) { return new ParcelableCompatCreatorHoneycombMR2(callbacks); }
static Creator m201a(C0030c c0030c) { return new C0031d(c0030c); }
public static Creator m198a(C0030c c0030c) { if (VERSION.SDK_INT >= 13) { C0032e.m201a(c0030c); } return new C0029b(c0030c); }
public c(DataHolder paramDataHolder, Parcelable.Creator<T> paramCreator) { super(paramDataHolder); this.nJ = paramCreator; }
static <T> Parcelable.Creator<T> ˊ(cOn<T> paramcOn) { return new ˌ(paramcOn); }
public static <T> Parcelable.Creator<T> ˊ(cOn<T> paramcOn) { if (Build.VERSION.SDK_INT >= 13) COn.ˊ(paramcOn); return new ˉ.if(paramcOn); }
public static <T> Parcelable.Creator<T> a(c<T> paramc) { if (Build.VERSION.SDK_INT >= 13) new d(paramc); return new b(paramc); }
/** * Get a {@link Creator} that can be used for the {@code CREATOR} field of a {@link * Parcelable}. * * @param clazz The class associated with the type the the Creator will create. * @param <T> The type the Creator will create. * * @return A fully implemented Creator for the specified type. * * @throws PostmanException if there is no {@link Parceler} associated with the given type. */ public static <T> Parcelable.Creator<T> getCreator(Class<T> clazz) throws PostmanException { @SuppressWarnings("unchecked") Parcelable.Creator<T> creator = (Parcelable.Creator<T>) creatorMap.get(clazz); if (creator == null) { creator = newCreator(clazz); creatorMap.put(clazz, creator); } return creator; }