AdvisesBinder { public static <T> LinkedBindingBuilder<UnaryOperator<T>> bindAdvice(Binder binder, TypeLiteral<T> type, int order) { return newRealAdviceBinder(binder, Key.get(type), order); } private  AdvisesBinder(); static LinkedBindingBuilder<T> bind(Binder binder, TypeLiteral<T> type); static LinkedBindingBuilder<T> bind(Binder binder, Class<T> type); static LinkedBindingBuilder<T> bind(Binder binder, TypeLiteral<T> type, Annotation annotation); static LinkedBindingBuilder<T> bind(Binder binder, Class<T> type, Annotation annotation); static LinkedBindingBuilder<T> bind(Binder binder, TypeLiteral<T> type, Class<? extends Annotation> annotationType); static LinkedBindingBuilder<T> bind(Binder binder, Key<T> key); static LinkedBindingBuilder<T> bind(Binder binder, Class<T> type,  Class<? extends Annotation> annotationType); static LinkedBindingBuilder<UnaryOperator<T>> bindAdvice(Binder binder, TypeLiteral<T> type, int order); static LinkedBindingBuilder<UnaryOperator<T>> bindAdvice(Binder binder, Class<T> type, int order); static LinkedBindingBuilder<UnaryOperator<T>> bindAdvice(Binder binder, TypeLiteral<T> type, Annotation annotation, int order); static LinkedBindingBuilder<UnaryOperator<T>> bindAdvice(Binder binder, Class<T> type, Annotation annotation, int order); static LinkedBindingBuilder<UnaryOperator<T>> bindAdvice(Binder binder, TypeLiteral<T> type, Class<? extends Annotation> annotationType, int order); static LinkedBindingBuilder<UnaryOperator<T>> bindAdvice(Binder binder, Key<T> key, int order); static LinkedBindingBuilder<UnaryOperator<T>> bindAdvice(Binder binder, Class<T> type,  Class<? extends Annotation> annotationType, int order);  }
@Test public void provisionWithoutAdviseDoesntBlowUp() { TypeLiteral<List<String>> LIST_TYPE_LITERAL = new TypeLiteral<List<String>>() {}; Guice.createInjector(new AbstractModule() { @Override protected void configure() { install(AdvisableAnnotatedMethodScanner.asModule()); AdvisesBinder.bindAdvice(binder(), LIST_TYPE_LITERAL, 0).to(AdviseList.class); } }); }