package CSU670_Plugin.gen;
import edu.neu.ccs.demeter.dj.*;
import edu.neu.ccs.demeter.aplib.cd.ClassDefVisitor;
import edu.neu.ccs.demeter.aplib.cd.ClassDef;
import java.io.*;
import java.util.*;
import edu.neu.ccs.demeter.*;
public class PathDirective extends SimpleStrategy {
  protected SourceDirective source;
  public SourceDirective get_source() { return source; }
  public void set_source(SourceDirective new_source) { source = new_source; }
  protected NegativeConstraint constraint;
  public NegativeConstraint get_constraint() { return constraint; }
  public void set_constraint(NegativeConstraint new_constraint) { constraint = new_constraint; }
  protected PathSegment_List segments;
  public PathSegment_List get_segments() { return segments; }
  public void set_segments(PathSegment_List new_segments) { segments = new_segments; }
  protected TargetDirective target;
  public TargetDirective get_target() { return target; }
  public void set_target(TargetDirective new_target) { target = new_target; }
  public PathDirective() { super(); }
  public PathDirective(NameMap parsedNameMap, SourceDirective source, NegativeConstraint constraint, PathSegment_List segments, TargetDirective target) {
    super(parsedNameMap);
    set_source(source);
    set_constraint(constraint);
    set_segments(segments);
    set_target(target);
  }
  public static PathDirective parse(java.io.Reader in) throws ParseException { return new Parser(in)._PathDirective(); }
  public static PathDirective parse(java.io.InputStream in) throws ParseException { return new Parser(in)._PathDirective(); }
  public static PathDirective parse(String s) {
    try { return parse(new java.io.StringReader(s)); }
    catch (ParseException e) {
      throw new RuntimeException(e.toString());
    }
  }
  void universal_trv0_bef(UniversalVisitor _v_) {
    super.universal_trv0_bef(_v_);
    ((UniversalVisitor) _v_).before(this);
  }

  void universal_trv0_aft(UniversalVisitor _v_) {
    ((UniversalVisitor) _v_).after(this);
    super.universal_trv0_aft(_v_);
  }

  void universal_trv0(UniversalVisitor _v_) {
    universal_trv0_bef(_v_);
    ((UniversalVisitor) _v_).before_source(this, source);
    source.universal_trv0(_v_);
    ((UniversalVisitor) _v_).after_source(this, source);
    if (constraint != null) {
      ((UniversalVisitor) _v_).before_constraint(this, constraint);
      constraint.universal_trv0(_v_);
      ((UniversalVisitor) _v_).after_constraint(this, constraint);
    }
    ((UniversalVisitor) _v_).before_segments(this, segments);
    segments.universal_trv0(_v_);
    ((UniversalVisitor) _v_).after_segments(this, segments);
    ((UniversalVisitor) _v_).before_target(this, target);
    target.universal_trv0(_v_);
    ((UniversalVisitor) _v_).after_target(this, target);
    super.universal_trv0(_v_);
    universal_trv0_aft(_v_);
  }

}
