KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > SOFA > SOFAnode > Util > DFSRChecker > DFSR > IDFSRExtension


1 /*
2  * $Id: IDFSRExtension.java,v 1.2 2005/07/08 12:04:11 kofron Exp $
3  *
4  * Copyright 2004
5  * Distributed Systems Research Group
6  * Department of Software Engineering
7  * Faculty of Mathematics and Physics
8  * Charles University, Prague
9  *
10  * Copyright 2005
11  * Formal Methods In Software Engineering Group
12  * Institute of Computer Science
13  * Academy of Sciences of the Czech Republic
14  *
15  * This code was developed by Jan Kofron <kofron@nenya.ms.mff.cuni.cz>
16  */

17
18 package SOFA.SOFAnode.Util.DFSRChecker.DFSR;
19
20 import SOFA.SOFAnode.Util.DFSRChecker.node.InvalidParameterException;
21 import SOFA.SOFAnode.Util.DFSRChecker.state.State;
22
23
24 /**
25  * This interface defines the methods to be implemented by all extensions used by the DFSRtraverser.
26  */

27 public interface IDFSRExtension {
28
29     /**
30      * This method is called as the first each time a node is visited.
31      */

32     public void action(State state) throws InvalidParameterException;
33
34     /**
35      * This method is called if a new state is visited.
36      *
37      * @return true or false depending on the implementation
38      */

39     public boolean actionNew(State state) throws InvalidParameterException, CheckingException;
40
41     /**
42      * This method is called if a cycle is detected while traversing the state graph.
43      * Note that the actionVisited is not called.
44      */

45     public void actionCycle(State state) throws InvalidParameterException;
46
47     /**
48      * This method is called if an already visited node is being visited. Note
49      * that ActionCycle method is not called.
50      */

51     public void actionVisited(State state) throws InvalidParameterException;
52
53     /**
54      * This method is called while returning from the state back to its parent.
55      */

56     public void actionBack(State state) throws InvalidParameterException;
57     
58     /**
59      * resets the state of the extension to the beginning
60      */

61     public void reset();
62     
63 }
Popular Tags