I have an abstract packaging class Foo that gets the functionality defined by the provision of its Reader interface. Everything works well when I implement a separate Reader and provide it. This happens incorrectly when I try to do this through an inner class. Implementing Reader in the inner class is a must for me.
public abstract class Foo { private Reader reader; public Foo(Reader reader) { this.reader = reader; } public void read() { this.reader.doit(); } }
"There is no instance of an instance of MapLink type available due to some invocation of the intermediate constructor"
public class ReaderFoo extends Foo { public class FooReader implements Reader { @Override public void doit() {
What am I doing wrong?
source share