/** * looks at children, but skips over non-statement nodes to get the closest descendant nodes that * represent statements. */ private static List<IASNode> getDescendantStatements(IASNode parent) { ArrayList<IASNode> ret = new ArrayList<IASNode>(); int childrenSize = parent.getChildCount(); for (int i = 0; i < childrenSize; i++) { IASNode child = parent.getChild(i); if (child instanceof ConfigConditionBlockNode) { ret.addAll( getDescendantStatements(child)); } else { ret.add(child); } } return ret; }
/** * looks at children, but skips over non-statement nodes to get the closest descendant nodes that * represent statements. */ private static List<IASNode> getDescendantStatements(IASNode parent) { ArrayList<IASNode> ret = new ArrayList<IASNode>(); int childrenSize = parent.getChildCount(); for (int i = 0; i < childrenSize; i++) { IASNode child = parent.getChild(i); if (child instanceof ConfigConditionBlockNode) { ret.addAll( getDescendantStatements(child)); } else { ret.add(child); } } return ret; }
List <IASNode> children = getDescendantStatements(this); for (IASNode child : children)
List <IASNode> children = getDescendantStatements(this); for (IASNode child : children)