Я использую Eclipse IDE.Первый конструктор может вызываться, но не второй.Мне интересно, поддерживает ли xtend несколько конструкторов?
@Data abstract class MatchingBase implements TidilySerializable {
val List<Integer> connections
new (int componentSize) {
connections = (0 ..< componentSize).toList
}
new (List<Integer> conn) {
connections = new ArrayList<Integer>()
for (int i : 0 ..< componentSize)
connections.add(conn.get(i))
}
}
@Data class Permutation extends MatchingBase {
}
Тогда, если я вызову new Permutation(new ArrayList<Integer>())
в Eclipse, это подчеркивает ошибку времени компиляции.