I have only recently gotten back into Java programming and am currently stuck with a certain problem.
I have an object of a certain type:
StandardClass stdClass = (StandardClass)request.getAttribute(ATTR);
But now I need to make the Object stdClass an Observer of some Observable.
Since StandardClass doesn't implement the Observer interface I can't add it as an observer directly.
So I tried:
ExtendedClass extends StandardClass implements Observer { ... }
But I haven't been able to find a way to cast the original object into the new class.
Possibly this whole approach is totally wrong and I currently can't see the forest for the trees, so I'd appreciate any input on how to solve this kind of problem.
Thank you very much in advance for your time and help, I really appreciate it!!
Cheers,
Thomas