@Test public void testMaterializeBundleWorks() throws Exception { TestBundleable t = new TestBundleable("fred", 26); Bundle b = t.toBundle(); Parcel p = Parcel.obtain(); b.writeToParcel(p, 0); p.setDataPosition(0); Bundle b1 = p.readBundle(); Bundleable b2 = BundleableUtil.materializeBundle(b1); assertThat((b2 instanceof TestBundleable)).isTrue(); assertThat((TestBundleable) b2).isEqualTo(t); }
@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);  }