groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alberto <alberto....@gmail.com>
Subject Calling original method from extension class
Date Fri, 17 Jul 2020 14:18:22 GMT
Hi all,

I'm trying to extend a class so that it has a different toString, but only
in specific cases.

I don't know for sure if this is possible, but what I'd like to do is:

    static String toString(UnicastRemoteObject self) {
        try {
            return self.getName();
        } catch (MissingMethodException e) {
            return // return the to string from Unicast.
        }
    }

Is it possible at all to call the original toString?

Regards,
-- 
Alberto Ingenito

Mime
View raw message