I have a class where each instance is tied a unique enum value.  This
enum value needs to be passed in as a parameter.  So

enum MyEnum {A, B, C}

@Inject
public MyClass(SomeService service, MyEnum param)

Clients are something like this:

@Inject
public MyClient(MyClass class1, MyClass class2, MyClass class3)  //
class1 with enum A, class2 with enumB, class3 with enumC

I would like to be able to annotate those dependencies on MyClass so
that Guice knows which enum to create each of them with.  Is this
possible?  If not, I can always create simple named subclass
MyClassForA, MyClassForB, MyClassForC, but I'm getting used to Guice
saving me from such things :o)


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