Hi dhanji:
     I have an other question when read your guice-servlet source

     why you binding FilterDefinition in this way?

'''
bind(Key.get(new TypeLiteral<List<FilterDefinition>>() {},
UniqueAnnotations.create()))
        .toInstance(filterDefinitions);
'''
    and get the  filterDefinitions like this

''''
  for (Binding<?> entry : injector.findBindingsByType(FILTER_DEFS)) {

      @SuppressWarnings("unchecked") //guarded by findBindingsByType()
      Key<List<FilterDefinition>> defsKey =
(Key<List<FilterDefinition>>) entry.getKey();
      filterDefinitions.addAll(injector.getInstance(defsKey));
    }
'''

   According to my understanding,  you must hide the
List<FilterDefinition>'s binding
and Guice counld not inject the UniqueAnnotations Key ,so that's the
only way to get the
hidden TypeLiteral instance. Is that right?

--~--~---------~--~----~------------~-------~--~----~
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