public Collection<String> getAllVariables(ValueMapPath path) { Vector<String> vars = new Vector<String>(); vars.add(getName()); Collection<String> moreVars = JavaParser.getAllVariables(path.substitute(variable.getInitialValue())); for (String var : moreVars) if (!vars.contains(var)) vars.add(var); Collection<String> ifVars = getCodeBundleContainingMe().getIfClauseVariables(path); vars.addAll(ifVars); return (vars); }
public void addChild(Keyword keyword) { if (!children.contains(keyword)) children.add(keyword); }