groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From roro codeath <rorocode...@gmail.com>
Subject Fwd: Add Trait.staticMeth in groovy
Date Sun, 05 Apr 2015 15:05:51 GMT
---------- Forwarded message ----------
From: roro codeath <rorocodeath@gmail.com>
Date: Sun, Apr 5, 2015 at 10:58 PM
Subject: Add Trait.staticMeth in groovy
To: users@groovy.incubator.apache.org


for instance:

trait T {
    static m(Closure c) {

    }
}

class Ex3 {
    static void main(args) {
        T.m()
    }
}

to make meth in trait is callable directly like Class.staticMeth

Mime
View raw message