> > Using this design you could have the adaptor:getStub(...) return
> > my_behaviour_implementation and later use that to make the calls.
> I wan't to wrap objects from other language, so the problem
> is how to
> dinamicly impersonate an object with an arbitrary interface
> in Erlang. I
> can solve this using the simple call:
> adaptor:callMethod(Obj, "method1", Args).
> but I was looking for some "Sugar Syntax". The ideal was
> something like:
> Obj:method1(arg1, arg2).
> But I known, Erlang is not an OO language :)
The easiest fit is probably what you suggest yourself: