SimpleNode[] () { List<PackagingElementNode<?>> children = new ArrayList<>(); for (CompositePackagingElement<?> element : getPackagingElements()) { PackagingTreeNodeFactory.addNodes(element.getChildren(), this, element, myContext, mySubstitutionParameters, getNodeSource(element), children, myArtifactType, new HashSet<>()); } return children.isEmpty() ? NO_CHILDREN : children.toArray(new SimpleNode[0]); }