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 http://youtrack.jetbrains.com/issue/IDEA-81225, which is marked as fixed, but without a mention how it works.

3 comments

Anyone? Is this feasible to achieve with GDSL?

0

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 http://youtrack.jetbrains.com/issue/IDEA-125758.

Cheers,
Max

0

Please sign in to leave a comment.