@Test public void customAdapter() throws Exception { Jsouper jsouper = new Jsouper.Builder() .add(Movie.class, new MovieAdapter()) .build(); ElementAdapter<Movie> elementAdapter = jsouper.adapter(Movie.class); Movie movie = elementAdapter.fromElement(document); assertThat(movie).isEqualTo(new Movie("Deadpool", "Sample description", 4)); }
public <T> ElementAdapter<T> adapter(Type type) { return adapter(type, Util.NO_ANNOTATIONS); }
Jsouper { public <T> ElementAdapter<T> adapter(Type type) { return adapter(type, Util.NO_ANNOTATIONS); } }
Jsouper { public <T> ElementAdapter<T> adapter(Type type) { return adapter(type, Util.NO_ANNOTATIONS); } Jsouper(Builder builder); }
Jsouper { public <T> ElementAdapter<T> adapter(Type type) { return adapter(type, Util.NO_ANNOTATIONS); } Jsouper(Builder builder); ElementAdapter<T> adapter(Type type); ElementAdapter<T> adapter(Type type, Set<? extends Annotation> annotations); }
Jsouper { public <T> ElementAdapter<T> adapter(Type type) { return adapter(type, Util.NO_ANNOTATIONS); } Jsouper(Builder builder); ElementAdapter<T> adapter(Type type); ElementAdapter<T> adapter(Type type, Set<? extends Annotation> annotations);  }