GDSL: how to dynamically provide return type for a method invocation

Let's say we have this class:

class Factory {
    Object create(String fullyQualifiedClassName) { /* return an instance of fullyQualifiedClassName */ }

Is it possible to write a GDSL that provides the correct return type for an invocation of Factory#create? I think this might be similar to, which is marked as fixed, but without a mention how it works.

评论操作 固定链接

Anyone? Is this feasible to achieve with GDSL?

评论操作 固定链接

Peter, sorry for the delay. Somehow I've missed this thread.

Currently GDSL does not allow to provide more accurate type for existing methods. So I've created an issue