package aspectEditor.aspectEditorUtils;
import java.util.jar.JarFile;
import java.util.*;
import java.io.*;
import edu.neu.ccs.demeter.aplib.*;
import edu.neu.ccs.demeter.*;
class __V_PathDirective_toGraph {
  protected StrategyGraph return_val;
  public StrategyGraph get_return_val() { return return_val; }
  public void set_return_val(StrategyGraph new_return_val) { return_val = new_return_val; }
  public __V_PathDirective_toGraph() { super(); }
  public __V_PathDirective_toGraph(StrategyGraph return_val) {
    super();
    set_return_val(return_val);
  }
 SGEdge edge; 
 NameMap map = new NameMap(); 
  public void before(PathDirective host) {
      return_val = new StrategyGraph();
      return_val.nameMap = map;
    }
  public void before(From host) {
      ClassGlobSpec sourcespec = host.get_sources();
      edge = new SGEdge();
      edge.set_source(sourcespec.toGlobSpec());
      edge.set_sourcemarker(new SourceMarker());
    }
  public void before(NegativeConstraint host) {
      edge.set_constraint(host);
    }
  public void before(PositiveConstraint host) {
      GlobSpec glob = host.get_glob();
      edge.set_target(glob);
      return_val.addEdge(edge);
      edge = new SGEdge();
      edge.set_source(glob);
    }
  public void before(ToStop host) {
      // Bypass the target(s).
      Bypassing constraint =
	Bypassing.parse("bypassing " + host.get_targets());
      edge.set_constraint(constraint.intersectWith(edge.get_constraint()));
    }
  public void after(TargetDirective host) {
      ClassGlobSpec targets = host.get_targets();
      edge.set_target(targets.toGlobSpec());
      edge.set_targetmarker(new TargetMarker());
      return_val.addEdge(edge);
    }
  public void before(NameMap host) {
      return_val.nameMap = NameMap.compose(host, map);
    }
  public void start() {}
  public void finish() {}
  void universal_trv0_bef(UniversalVisitor _v_) {  }

  void universal_trv0_aft(UniversalVisitor _v_) {  }

  void universal_trv0(UniversalVisitor _v_) {
    universal_trv0_bef(_v_);
    return_val.universal_trv0(_v_);
    universal_trv0_aft(_v_);
  }

}
