@Test public void testToString() { Guice.createInjector(new AbstractModule() { @Override protected void configure() { ListBinder<String> listBinder = ListBinder.build(binder(), String.class) .annotatedWith(Names.named("name")) .withDefaultPriority(); assertThat(listBinder.toString(), equalTo("ListBinder<java.lang.String> annotated with @com.google.inject.name.Named(value=name) with default priority")); ListBinder<Object> objectListBinder = ListBinder.build(binder(), Object.class) .withPriority(1, 2); assertThat(objectListBinder.toString(), equalTo("ListBinder<java.lang.Object> with priority [1, 2]")); } }); }
@Override public String toString() { return PrettyTypes.format("ListBinder<%s>%s with %s", entryType, (potentialAnnotation.hasAnnotation() ? " annotated with " + potentialAnnotation : ""), initialPriority); }
ListBinder { @Override public String toString() { return PrettyTypes.format("ListBinder<%s>%s with %s", entryType, (potentialAnnotation.hasAnnotation() ? " annotated with " + potentialAnnotation : ""), initialPriority); } }
ListBinder { @Override public String toString() { return PrettyTypes.format("ListBinder<%s>%s with %s", entryType, (potentialAnnotation.hasAnnotation() ? " annotated with " + potentialAnnotation : ""), initialPriority); } private  ListBinder(
            Binder binder,
            TypeLiteral<T> entryType,
            PotentialAnnotation potentialAnnotation,
            Priority initialPriority); }
ListBinder { @Override public String toString() { return PrettyTypes.format("ListBinder<%s>%s with %s", entryType, (potentialAnnotation.hasAnnotation() ? " annotated with " + potentialAnnotation : ""), initialPriority); } private  ListBinder(
            Binder binder,
            TypeLiteral<T> entryType,
            PotentialAnnotation potentialAnnotation,
            Priority initialPriority); static AnnotatedListBinderBuilder<T> build(Binder binder, Class<T> type); static AnnotatedListBinderBuilder<T> build(Binder binder, TypeLiteral<T> type); LinkedBindingBuilder<T> addBinding(); @Override String toString(); }
ListBinder { @Override public String toString() { return PrettyTypes.format("ListBinder<%s>%s with %s", entryType, (potentialAnnotation.hasAnnotation() ? " annotated with " + potentialAnnotation : ""), initialPriority); } private  ListBinder(
            Binder binder,
            TypeLiteral<T> entryType,
            PotentialAnnotation potentialAnnotation,
            Priority initialPriority); static AnnotatedListBinderBuilder<T> build(Binder binder, Class<T> type); static AnnotatedListBinderBuilder<T> build(Binder binder, TypeLiteral<T> type); LinkedBindingBuilder<T> addBinding(); @Override String toString();  }