I am extending a class from a library. This class from a library has a constructor and some parameters that are
//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