I'm trying out Xtend. Is it possible to make constructors? It seems so simple, but I'm getting an error when I try something like this:
class Scope extends Rect {
public Scope(){
super()
}
}
Constructors are defined by overloading a new() method:
class MyClass extends AnotherClass {
new(String s) {
super(s)
}
new() {
this("default")
}
}
look here
The next release of Xtend is planned for mid December. It'll have support for declaring constructors.
See http://www.eclipse.org/Xtext/xtend/#whatsnext
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With