The namedNodes() method is not useful on ArrayNode and ValueNode so investigate its removal from the TreeNode interface.