01: // This file is part of KeY - Integrated Deductive Software Design
02: // Copyright (C) 2001-2007 Universitaet Karlsruhe, Germany
03: // Universitaet Koblenz-Landau, Germany
04: // Chalmers University of Technology, Sweden
05: //
06: // The KeY system is protected by the GNU General Public License.
07: // See LICENSE.TXT for details.
08: //
09: //
10:
11: package de.uka.ilkd.key.logic;
12:
13: /**
14: * This abstract Vistor class declares the interface for a common term visitor.
15: */
16: public abstract class Visitor {
17:
18: /**
19: * the entry method for the visitor pattern
20: * @param visited the Term to be visited
21: */
22: public abstract void visit(Term visited);
23:
24: /**
25: * this method is called in execPreOrder and execPostOrder in class Term
26: * when entering the subtree rooted in the term subtreeRoot.
27: * Default implementation is to do nothing. Subclasses can
28: * override this method
29: * when the visitor behaviour depends on informations bound to subtrees.
30: * @param subtreeRoot root of the subtree which the visitor enters.
31: */
32:
33: public void subtreeEntered(Term subtreeRoot) {
34: }
35:
36: /**
37: * this method is called in execPreOrder and execPostOrder in class Term
38: * when leaving the subtree rooted in the term subtreeRoot.
39: * Default implementation is to do nothing. Subclasses can
40: * override this method
41: * when the visitor behaviour depends on informations bound to subtrees.
42: * @param subtreeRoot root of the subtree which the visitor leaves.
43: */
44:
45: public void subtreeLeft(Term subtreeRoot) {
46: }
47:
48: }
|