I am extending a class from a library. This class from a library has a
constructor and some parameters that are *not* injected:
//Constructor
public externalClass(SomeParam A, SomeOtherParam B) {
...
}
The subclass's constructor looks something like this:
//Constructor of class that exteds externalClass
public subClass(SomeParam A, SomeOtherParam B, ParamToBeInjected C) {
super(SomeParam A, SomeOtherParam B);
this.paramToBeInjected = C;
...
}
Now, the problem is that only dependency I want to inject in subClass is
the third parameter, ParamToBeInjected C . The first two are handled by the
externalClass i.e. the parent class of subClass.
If I annote the constructor with @Inject, it wont't work since an attempt
to inject all the constructor arguments will be made. If, on the other
hand, the constructor is not annoted, the error "Could not find a suitable
constructor..." occurs. Any ideas, suggestions?
Thanks.
Regards
--
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.
To view this discussion on the web visit
https://groups.google.com/d/msgid/google-guice/d6e0d047-a605-4a46-9fca-2243cd16b725%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.