posted 10 years ago
Hi All,
I've a open-source code, in which they defined an interface in class. They dint use that interface through implementing/extending it. I mean, in any of the class or interface they dint do extends or implement of that interface. They are using google juice. Let me show you the code of that class,
In this class CandidateElementExtractorFactory AND FormHandlerFactory are the two interfaces, they dint use anywhere in whole project. Still they are easily getting an instance of the class CandidateElementExtractor in another class. Let me show the code of another class, how they are getting instance
In constructor they are doing this.candidateExtractor = elementExtractor.newExtractor(browser);. Suppose If I extends the CandidateElementExtractor.class, I'm not getting the instance of child. It is showing an exception like,
My child class is like this,
in another class, I'm getting instance like this,
but it is giving an exception like above I mentioned.
Is there any idea, why this exception is coming.
Thanks:
Ramakrishna K.C