Not necessarily endorsing this, but here goes... 1. convert things bound to something you can inject
https://github.com/jclouds/jclouds/blob/master/core/src/main/java/org/jclouds/internal/FilterStringsBoundToInjectorByName.java 2. convert that into the form desired: https://github.com/jclouds/jclouds/blob/master/core/src/main/java/org/jclouds/config/BindPropertiesToExpandedValues.java Or.. do something even more hacky :P -A On Tue, Jul 24, 2012 at 12:18 PM, Tim Peierls <[email protected]> wrote: > On Tue, Jul 24, 2012 at 2:44 PM, MarvinToll.com <[email protected]> > wrote: >> >> The Rocoto example enables access to a property value via @Inject as >> follows: >> >> public final class JdbcConfiguration >> { >> @Inject >> @Named( "JDBC.url" ) >> private String jdbcUrl; // jdbc:derby://localhost:3306/test >> ... >> } >> >> I'm wondering if there is any way to get to a bound property value... >> such as the jdbcUrl in this example... programmaticly. That is, not >> using @Inject? > > > > Sorry, I still don't understand what you're asking. You can examine the > bindings of an injector programmatically (Injector.getBindings); is that > what you mean? > > I looked through both of your examples, but I just don't get what you're > trying to do. All I see is a lot of ceremony to do something conceptually > simple. And I don't see what it has to do with dependency injection. > > At any rate, Rocoto is probably a red herring. Forget I mentioned it. > > --tim > > -- > 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. -- 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.
