@Override protected void configure() { MBinder.wrap(binder()).handleMethodAfterInjection(Expand.class, ExpandHandler.class); } }
public static MBinder wrap(Binder binder) { return new MBinder(binder); }
@Override public void bindInterceptor(Matcher<? super Class<?>> classMatcher, Matcher<? super Method> methodMatcher, MethodInterceptor... interceptors) { for (MethodInterceptor interceptor : interceptors) { requestInjection(interceptor); } binder.bindInterceptor(classMatcher, methodMatcher, interceptors); }
@Override public void configure() { requireBinding(CloseableInjector.class); MyJsr250Destroyer destroyer = new MyJsr250Destroyer(); requestInjection(destroyer); bind(MyJsr250Destroyer.class).toInstance(destroyer); bind(Jsr250KeyProvider.class).in(Singleton.class); bind(Jsr250PostConstructHandler.class).in(Singleton.class); bind(new TypeLiteral<MethodHandler<PreDestroy>>() { }).to(Jsr250PreDestroyHandler.class).in(Singleton.class); MBinder.wrap(binder()) .bindAnnotationInjector(Resource.class, Jsr250KeyProvider.class) .handleMethodAfterInjection(PostConstruct.class, Jsr250PostConstructHandler.class); }
public <A extends Annotation> MBinder bindAnnotationInjector(Class<A> annotationType, Class<? extends KeyProvider<A>> providerClass) { binder.bindListener(Matchers.any(), willInject(new MemberInjectorTypeListener<A>(annotationType, providerClass))); return this; }
@Override public void configure() { requireBinding(CloseableInjector.class); MyJsr250Destroyer destroyer = new MyJsr250Destroyer(); requestInjection(destroyer); bind(MyJsr250Destroyer.class).toInstance(destroyer); bind(Jsr250KeyProvider.class).in(Singleton.class); bind(Jsr250PostConstructHandler.class).in(Singleton.class); bind(new TypeLiteral<MethodHandler<PreDestroy>>() { }).to(Jsr250PreDestroyHandler.class).in(Singleton.class); MBinder.wrap(binder()) .bindAnnotationInjector(Resource.class, Jsr250KeyProvider.class) .handleMethodAfterInjection(PostConstruct.class, Jsr250PostConstructHandler.class); }
public <A extends Annotation> MBinder handleMethodAfterInjection(Class<A> annotationType, Class<? extends MethodHandler<A>> providerClass) { binder.bindListener(Matchers.any(), willInject(new MethodHandlerTypeListener<A>(annotationType, providerClass))); return this; }
@Override protected void configure() { MBinder.wrap(binder()).handleMethodAfterInjection(Expand.class, ExpandHandler.class); } }
public <A extends Annotation> MBinder bindAnnotationInjector(Class<A> annotationType, Class<? extends KeyProvider<A>> providerClass) { binder.bindListener(Matchers.any(), willInject(new MemberInjectorTypeListener<A>(annotationType, providerClass))); return this; }
@Override public void bindInterceptor(Matcher<? super Class<?>> classMatcher, Matcher<? super Method> methodMatcher, MethodInterceptor... interceptors) { for (MethodInterceptor interceptor : interceptors) { requestInjection(interceptor); } binder.bindInterceptor(classMatcher, methodMatcher, interceptors); }
public static MBinder wrap(Binder binder) { return new MBinder(binder); }
public <A extends Annotation> MBinder bindAnnotationInjector(Class<A> annotationType, Class<? extends KeyProvider<A>> providerClass) { binder.bindListener(Matchers.any(), willInject(new MemberInjectorTypeListener<A>(annotationType, providerClass))); return this; }
@Override public void bindInterceptor(Matcher<? super Class<?>> classMatcher, Matcher<? super Method> methodMatcher, MethodInterceptor... interceptors) { for (MethodInterceptor interceptor : interceptors) { requestInjection(interceptor); } binder.bindInterceptor(classMatcher, methodMatcher, interceptors); }
public static MBinder wrap(Binder binder) { return new MBinder(binder); }
public <A extends Annotation> MBinder handleFieldAfterInjection(Class<A> annotationType, Class<? extends FieldHandler<A>> providerClass) { binder.bindListener(Matchers.any(), willInject(new FieldHandlerTypeListener<A>(annotationType, providerClass))); return this; }
public <A extends Annotation> MBinder handleMethodAfterInjection(Class<A> annotationType, Class<? extends MethodHandler<A>> providerClass) { binder.bindListener(Matchers.any(), willInject(new MethodHandlerTypeListener<A>(annotationType, providerClass))); return this; }
public <A extends Annotation> MBinder handleMethodAfterInjection(Class<A> annotationType, Class<? extends MethodHandler<A>> providerClass) { binder.bindListener(Matchers.any(), willInject(new MethodHandlerTypeListener<A>(annotationType, providerClass))); return this; }
public <A extends Annotation> MBinder handleFieldAfterInjection(Class<A> annotationType, Class<? extends FieldHandler<A>> providerClass) { binder.bindListener(Matchers.any(), willInject(new FieldHandlerTypeListener<A>(annotationType, providerClass))); return this; }
public <A extends Annotation> MBinder handleFieldAfterInjection(Class<A> annotationType, Class<? extends FieldHandler<A>> providerClass) { binder.bindListener(Matchers.any(), willInject(new FieldHandlerTypeListener<A>(annotationType, providerClass))); return this; }