I have an interface
public interface Foo {
> public void process()
> }
i have many implementations of it
> public class Bar1 implements Foo {
> public Bar1 (Type1 arg1, type2 arg2) {...]
> public void process() {...}
> }
> public class Bar2 implements Foo {
> public Bar2 (Type1 arg1, type2 arg2) {...]
> public void process() {...}
> }
let us generically denote Bar1, Bar2 as BarX,
the constructors for BarX all have similar structure (the types and their
order are the same)
i have an annotation @AppliesTo for each of the BarX classes
@AppliesToType (type = TypeX)
> public class BarX ...
Now, the question I have is -
without having to write explicit bind statements, can i use the fact that
the classes are Annotated to create the bindings dynamically?
I know i can use reflection to do this, but i'd rather use the scanning
that is already done by Guice (for performance reasons) - are there any
choices?
for the actual injection, i will have an additional Annotation
> @InjectBars (type = <argument>) Foo x;
I am also planning to have a TypeListener that will listen to these
bindings and connect them
--
You received this message because you are subscribed to the Google Groups
"google-guice" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-guice?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.