Class ParametricVisitor

java.lang.Object
de.grogra.graph.VisitorImpl
de.grogra.graph.wrapped.parametric.ParametricVisitor
All Implemented Interfaces:
Visitor

public class ParametricVisitor extends VisitorImpl
  • Constructor Details

    • ParametricVisitor

      public ParametricVisitor()
  • Method Details

    • init

      public void init(GraphState gs, EdgePattern pattern, ObjectList params)
    • visitEnter

      public Object visitEnter(Path path, boolean node)
      Description copied from interface: Visitor
      Informs this visitor about a node or edge in the graph. path contains the path from the root up to and including the node or, in case an edge is visited, the edge and its terminal node. Later on, Visitor.visitLeave(java.lang.Object, de.grogra.graph.Path, boolean) will be invoked with the returned value of this invocation, path and node as arguments. If this method returns Visitor.STOP, the corresponding visitLeave-method will be invoked immediately after this method, i.e., the visitor does not dive more deeply in the hierarchy. Otherwise, if a node is visited and there are instantiations associated with or edges connected with it (regardless of their direction), their corresponding visitor methods will be invoked inbetween. Likewise, if an edge is visited, its indicent terminal node will be visited next.
      Specified by:
      visitEnter in interface Visitor
      Overrides:
      visitEnter in class VisitorImpl
      Parameters:
      path - current path
      node - do we enter a node or an edge?
      Returns:
      value to pass to visitLeave, may be Visitor.STOP
    • visitInstanceEnter

      public Object visitInstanceEnter()
      Description copied from interface: Visitor
      Informs this visitor about the beginning of an instantiation. This method invokation is nested immediately within visitEnter/visitLeave of a node. Later on, Visitor.visitInstanceLeave(Object) will be invoked with the returned value of this invocation as argument. If this method returns Visitor.STOP, the visitInstanceLeave-method will be invoked immediately after this method, i.e., the visitor does not dive into the instantiation. Otherwise, the instantiation is performed, starting with an edge.
      Specified by:
      visitInstanceEnter in interface Visitor
      Overrides:
      visitInstanceEnter in class VisitorImpl
      Returns:
      value to pass to visitInstanceLeave, may be Visitor.STOP
    • getClone

      public Node getClone(Node src)