protected static List<SpecNode> getAllSpecNodes(final Level level) {
        final List<SpecNode> specNodes = new ArrayList<SpecNode>();

        for (final Node childNode : level.getChildNodes()) {
            if (childNode instanceof SpecNode) {
                specNodes.add((SpecNode) childNode);
            }

            if (childNode instanceof Level) {
                specNodes.addAll(getAllSpecNodes((Level) childNode));
            }
        }

        return specNodes;
    }
protected static List < SpecNode > getAllSpecNodes ( final Level level ) { final List < SpecNode > specNodes = new ArrayList < SpecNode > ( ) ; for ( final Node childNode : level . getChildNodes ( ) ) { if ( childNode instanceof SpecNode ) { specNodes . add ( ( SpecNode ) childNode ) ; } if ( childNode instanceof Level ) { specNodes . addAll ( getAllSpecNodes ( ( Level ) childNode ) ) ; } } return specNodes ; }
Collect all of the {@link SpecNode}s in a {@link Level}.

@param level The level to get the spec nodes from.
@return A list of all spec nodes in the level.