@Test(expected = UnsupportedOperationException.class) public void testNoHolderFactoryAttached() { final RuntimeException exception = AdapterExceptions.noHolderFactoryAttached(new TestAdapter()); final String adapterName = TestAdapter.class.getSimpleName(); assertThat(exception.getMessage(), is("Cannot create view holder without holder factory attached! " + "A desired factory may be specified via " + adapterName + ".setHolderFactory(...), " + "otherwise implementation of " + adapterName + ".onCreateViewHolder(...) method is required.")); assertThat(exception.getCause(), is(nullValue())); throw exception; }
@NonNull static RuntimeException noHolderFactoryAttached(@NonNull final Object adapter) { final String adapterName = adapter.getClass().getSimpleName(); return new UnsupportedOperationException( "Cannot create view holder without holder factory attached! " + "A desired factory may be specified via " + adapterName + ".setHolderFactory(...), " + "otherwise implementation of " + adapterName + ".onCreateViewHolder(...) method is required." ); }
AdapterExceptions { @NonNull static RuntimeException noHolderFactoryAttached(@NonNull final Object adapter) { final String adapterName = adapter.getClass().getSimpleName(); return new UnsupportedOperationException( "Cannot create view holder without holder factory attached! " + "A desired factory may be specified via " + adapterName + ".setHolderFactory(...), " + "otherwise implementation of " + adapterName + ".onCreateViewHolder(...) method is required." ); } }
AdapterExceptions { @NonNull static RuntimeException noHolderFactoryAttached(@NonNull final Object adapter) { final String adapterName = adapter.getClass().getSimpleName(); return new UnsupportedOperationException( "Cannot create view holder without holder factory attached! " + "A desired factory may be specified via " + adapterName + ".setHolderFactory(...), " + "otherwise implementation of " + adapterName + ".onCreateViewHolder(...) method is required." ); } private  AdapterExceptions(); }
AdapterExceptions { @NonNull static RuntimeException noHolderFactoryAttached(@NonNull final Object adapter) { final String adapterName = adapter.getClass().getSimpleName(); return new UnsupportedOperationException( "Cannot create view holder without holder factory attached! " + "A desired factory may be specified via " + adapterName + ".setHolderFactory(...), " + "otherwise implementation of " + adapterName + ".onCreateViewHolder(...) method is required." ); } private  AdapterExceptions();  }
AdapterExceptions { @NonNull static RuntimeException noHolderFactoryAttached(@NonNull final Object adapter) { final String adapterName = adapter.getClass().getSimpleName(); return new UnsupportedOperationException( "Cannot create view holder without holder factory attached! " + "A desired factory may be specified via " + adapterName + ".setHolderFactory(...), " + "otherwise implementation of " + adapterName + ".onCreateViewHolder(...) method is required." ); } private  AdapterExceptions();   }