@Test public void stringAdapter() throws Exception { Jsouper jsouper = new Jsouper.Builder().build(); ElementAdapter<String> stringAdapter = jsouper.adapter(String.class); String text = "Lorem ipsum dolor sit amet."; Document document = Jsoup.parse(String.format("<div class=\"lorem\">%s</div>", text)); assertThat(stringAdapter.fromElement(document)).isEqualTo(text); assertThat(stringAdapter.fromElement(document, ".lorem")).isEqualTo(text); }
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);  }