Search code examples
xtend

Xtend tip: how do I access a static method within a Java interface inner class?


// java
interface MyInterface { 
    class MyInnerClass {            
        public static final String myInnerStaticMethod() {
            return "myInnerStaticMethod";
        }       
    }
}

How can I call this from an Xtend method?


Solution

  • // xtend
    def test() {
        MyInterface$MyInnerClass::myInnerStaticMethod
    }