コード例 #1
0
 public Collection<VariableDependency> getVariableDependencies(ValueMapPath path) {
   Vector<VariableDependency> deps = new Vector<VariableDependency>();
   String leftVar = path.substituteJavaName(getName());
   Collection<String> rightVars =
       JavaParser.getAllVariables(path.substitute(variable.getInitialValue()));
   for (String var : rightVars)
     deps.add(new VariableDependency(leftVar, var, VariableDependency.ASSIGN));
   Collection<String> ifVars = getCodeBundleContainingMe().getIfClauseVariables(path);
   for (String var : ifVars)
     deps.add(new VariableDependency(leftVar, var, VariableDependency.LITERAL_if));
   return (deps);
 }
コード例 #2
0
 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);
 }
コード例 #3
0
 public Collection<String> getSetVariables(ValueMapPath path) {
   Vector<String> vars = new Vector();
   vars.add(path.substituteJavaName(getName()));
   return (vars);
 }