public void allSubExps(Type type, List result) { if (type == null || type().equals(type)) result.add(this); Exp e; Iterator<Exp> i = exps.iterator(); while (i.hasNext()) { e = i.next(); e.allSubExps(type, result); } }
public void allSubExps(List result) { result.add(this); Exp e; Iterator<Exp> i = exps.iterator(); while (i.hasNext()) { e = i.next(); e.allSubExps(result); } }
public void allSubExps(String type, List result) { Exp e; Iterator<Exp> i = exps.iterator(); while (i.hasNext()) { e = i.next(); if (e.getClass().getName().equals(type)) result.add(e); e.allSubExps(type, result); } }