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

How can I call this from an Xtend method?

Ghiro
  • 500
  • 1
  • 4
  • 11

2 Answers2

2
// xtend
def test() {
    MyInterface$MyInnerClass::myInnerStaticMethod
}
Ghiro
  • 500
  • 1
  • 4
  • 11
2

Actually, the latest version of Xtend (>2.4.1) uses much nicer syntax.

// xtend
def test() {
  MyInterface.MyInnerClass.myInnerStaticMethod
}
Viliam Simko
  • 1,711
  • 17
  • 31