void (final List<? extends FrameworkSupportNodeBase> list, final List<? super FrameworkSupportNode> result) { for (FrameworkSupportNodeBase node : list) { if (node.isChecked() || node instanceof FrameworkGroupNode) { if (node instanceof FrameworkSupportNode) { result.add((FrameworkSupportNode)node); } //noinspection unchecked addChildFrameworks(node.getChildren(), result); } } }