@Test public void testMaterializeBundleWorks2() throws Exception { TestBundleable t = new TestBundleable("sally", 23); Bundle b = t.toBundle(); Parcel p = Parcel.obtain(); b.writeToParcel(p, 0); p.setDataPosition(0); Bundle b1 = p.readBundle(); TestBundleable f2 = BundleableUtil.materializeBundle(TestBundleable.class, b1); assertThat(t).isEqualTo(f2); }
@NonNull public static <T extends Bundleable> T materializeBundle(Bundle b) throws BadBundleableException { return materializeBundle(b.getString(Bundleable.CLZ), b); }
BundleableUtil { @NonNull public static <T extends Bundleable> T materializeBundle(Bundle b) throws BadBundleableException { return materializeBundle(b.getString(Bundleable.CLZ), b); } }
BundleableUtil { @NonNull public static <T extends Bundleable> T materializeBundle(Bundle b) throws BadBundleableException { return materializeBundle(b.getString(Bundleable.CLZ), b); }  }
BundleableUtil { @NonNull public static <T extends Bundleable> T materializeBundle(Bundle b) throws BadBundleableException { return materializeBundle(b.getString(Bundleable.CLZ), b); }  @NonNull static T materializeBundle(Bundle b); @NonNull @SuppressWarnings("unchecked") static T materializeBundle(Class<T> cls, Bundle b); @NonNull @SuppressWarnings("unchecked") static T materializeBundle(String name, Bundle b); }
BundleableUtil { @NonNull public static <T extends Bundleable> T materializeBundle(Bundle b) throws BadBundleableException { return materializeBundle(b.getString(Bundleable.CLZ), b); }  @NonNull static T materializeBundle(Bundle b); @NonNull @SuppressWarnings("unchecked") static T materializeBundle(Class<T> cls, Bundle b); @NonNull @SuppressWarnings("unchecked") static T materializeBundle(String name, Bundle b);  }