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.*;
abstract class GlobSpec {
  public GlobSpec() {
    super();
  }
  boolean match(EdgeI e, NameMapI N) { return matchEdge(e, N); }
  boolean matchEdge(EdgeI e, NameMapI N) {
    __V_GlobSpec_matchEdge v0 = new __V_GlobSpec_matchEdge();
    v0.set_e(e);
    v0.set_N(N);
    v0.start();
    __trav_matchEdge(v0);
    v0.finish();
    return v0.get_return_val();
  }
  boolean match(Object v, NameMapI N) {
    __V_GlobSpec_match v0 = new __V_GlobSpec_match();
    v0.set_v(v);
    v0.set_N(N);
    v0.start();
    __trav_match(v0);
    v0.finish();
    return v0.get_return_val();
  }
  ClassGlobSpec collectClassGlobs() {
    __V_GlobSpec_collectClassGlobs v0 = new __V_GlobSpec_collectClassGlobs();
    v0.start();
    __trav_collectClassGlobs(v0);
    v0.finish();
    return v0.get_return_val();
  }
  GlobSet collectEdgeGlobs() {
    __V_GlobSpec_collectEdgeGlobs v0 = new __V_GlobSpec_collectEdgeGlobs();
    v0.start();
    __trav_collectEdgeGlobs(v0);
    v0.finish();
    return v0.get_return_val();
  }
  GlobSpec union(GlobSpec spec) {
    if (spec == null) return this;
    return spec.collectGlobs(collectGlobs(new GlobSet()));
  }
  GlobSet collectGlobs(GlobSet globset) {
    __V_GlobSpec_collectGlobs v0 = new __V_GlobSpec_collectGlobs();
    v0.set_globset(globset);
    v0.start();
    allGlobs(v0);
    v0.finish();
    return v0.get_return_val();
  }
  public boolean equals(Object obj) {
    return toString().equals(obj.toString());
  }
  public int hashCode() {
    return toString().hashCode();
  }
  GlobSpec deepCopy() {
    CopyVisitor c = new CopyVisitor(getClass());
    universal_trv0(c);
    return (GlobSpec) c.get_copy();
  }
  void universal_trv0_bef(UniversalVisitor _v_) {
    ((UniversalVisitor) _v_).before(this);
  }

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

  void universal_trv0(UniversalVisitor _v_) {  }

  void __trav_checkConstraint_Node_SGEdge_trv_bef(__V_SGEdge_checkConstraint_Node __v0) {
    ((__V_SGEdge_checkConstraint_Node) __v0).before(this);
  }

  void __trav_checkConstraint_Node_SGEdge_trv_aft(__V_SGEdge_checkConstraint_Node __v0) {  }

  void __trav_checkConstraint_Node_SGEdge_trv(java.util.BitSet nodes, __V_SGEdge_checkConstraint_Node __v0) {  }

  void __trav_checkConstraint_Edge_SGEdge_trv_bef(__V_SGEdge_checkConstraint_Edge __v0) {
    ((__V_SGEdge_checkConstraint_Edge) __v0).before(this);
  }

  void __trav_checkConstraint_Edge_SGEdge_trv_aft(__V_SGEdge_checkConstraint_Edge __v0) {  }

  void __trav_checkConstraint_Edge_SGEdge_trv(java.util.BitSet nodes, __V_SGEdge_checkConstraint_Edge __v0) {  }

  public void allGlobs(GlobVisitor v) {
    allGlobs_GlobSpec_trv(v);
  }

  void allGlobs_GlobSpec_trv_bef(GlobVisitor v) {
    ((GlobVisitor) v).before(this);
  }

  void allGlobs_GlobSpec_trv_aft(GlobVisitor v) {
    ((UniversalVisitor) v).after(this);
  }

  void allGlobs_GlobSpec_trv(GlobVisitor v) {  }

  public void __trav_matchEdge(__V_GlobSpec_matchEdge __v0) {
    __trav_matchEdge_GlobSpec_trv(__v0);
  }

  void __trav_matchEdge_GlobSpec_trv_bef(__V_GlobSpec_matchEdge __v0) {  }

  void __trav_matchEdge_GlobSpec_trv_aft(__V_GlobSpec_matchEdge __v0) {  }

  void __trav_matchEdge_GlobSpec_trv(__V_GlobSpec_matchEdge __v0) {  }

  public void __trav_match(__V_GlobSpec_match __v0) {
    java.util.BitSet startSet = new java.util.BitSet();
    startSet.set(0);
    __trav_match_GlobSpec_trv(startSet, __v0);
  }

  void __trav_match_GlobSpec_trv_bef(__V_GlobSpec_match __v0) {  }

  void __trav_match_GlobSpec_trv_aft(__V_GlobSpec_match __v0) {  }

  void __trav_match_GlobSpec_trv(java.util.BitSet nodes, __V_GlobSpec_match __v0) {  }

  public void __trav_collectClassGlobs(__V_GlobSpec_collectClassGlobs __v0) {
    __trav_collectClassGlobs_GlobSpec_trv(__v0);
  }

  void __trav_collectClassGlobs_GlobSpec_trv_bef(__V_GlobSpec_collectClassGlobs __v0) {  }

  void __trav_collectClassGlobs_GlobSpec_trv_aft(__V_GlobSpec_collectClassGlobs __v0) {  }

  void __trav_collectClassGlobs_GlobSpec_trv(__V_GlobSpec_collectClassGlobs __v0) {  }

  public void __trav_collectEdgeGlobs(__V_GlobSpec_collectEdgeGlobs __v0) {
    __trav_collectEdgeGlobs_GlobSpec_trv(__v0);
  }

  void __trav_collectEdgeGlobs_GlobSpec_trv_bef(__V_GlobSpec_collectEdgeGlobs __v0) {  }

  void __trav_collectEdgeGlobs_GlobSpec_trv_aft(__V_GlobSpec_collectEdgeGlobs __v0) {  }

  void __trav_collectEdgeGlobs_GlobSpec_trv(__V_GlobSpec_collectEdgeGlobs __v0) {  }

}
