Hi.

Take a look at TypeListener and MembersInjector. There is an example on how
to do custom logging injection.

2012/2/3 Derrick <[email protected]>

> I would like to inject values dependent on the class they are being
> injected into:
>
> package x.y.z
>
> public class Foo {
>      @Inject
>        Foo ( @Settings("param1") String x ) {
>        }
> }
>
> where @Settings("param1")  is automatically (effectively) rewritten as
> @Named("x.y.z.Foo.param1") in this context and rewritten as 
> @Named("a.b.c.Bar.param1")
> in the following content:
>
> package a.b.c
>
> public class Bar {
>      @Inject
>        Bar ( @Settings("param1") String x ) {
>        }
> }
>
> Can I accomplish this with Guice 3.0?  with Guice 4.0 trunk?  as an
> extension to Guice 4.0?
>
> Thanks!
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "google-guice" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/google-guice/-/5lY8_VvUONoJ.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/google-guice?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"google-guice" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-guice?hl=en.

Reply via email to