Maybe I'm doing something stupid, but what's wrong with this picture:
// In my module RealServicesModule
bind( String.class ).annotatedWith(
FuncNetVersionDependent.class ).toInstance(
"http://cathdb.info/FuncNet_0_1/" );
// A static member in my test class
@Inject @FuncNetVersionDependent
private static String __namespace;
// Shortly afterwards, in a static method (a JUnit @BeforeClass method)
__namespace = Guice.createInjector( new RealServicesModule()
).getInstance( String.class );
assertNotNull( __namespace );
System.err.println( "'" + __namespace + "'" );
When I run this, I get '' -- i.e. __namespace is an empty string! Huh?
__namespace isn't referenced anywhere else in my test class, and
that's currently the only bind command in my module...
Any suggestions?
Andrew.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---