1class Node { 2 abstract java.util.List<Node> getChildrenNodes(); 3} 4 5class Foo { 6 7 public Object bar() { 8 Node node; 9 java.util.List<Node> children = new java.util.LinkedList<Node>(); 10 return children.addAll(node.getChildrenNodes()); 11 } 12} 13