Skip to content

Package: GenOperationState

GenOperationState

Coverage

1: package de.fhdw.wtf.generator.java.generatorModel;
2:
3: import de.fhdw.wtf.generator.java.visitor.GenOperationStateVisitor;
4: import de.fhdw.wtf.generator.java.visitor.GenOperationStateVisitorException;
5: import de.fhdw.wtf.generator.java.visitor.GenOperationStateVisitorReturn;
6: import de.fhdw.wtf.generator.java.visitor.GenOperationStateVisitorReturnException;
7:
8: /**
9: * The state of an operation indicates the level of information that the model has about the operation. E.g. whether it
10: * just knows the full implementation or has a parsed operation header.
11: */
12: public interface GenOperationState {
13:         
14:         /**
15:          * Calls the handle method in the given visitor.
16:          *
17:          * @param visitor
18:          * The visitor to handle this type.
19:          */
20:         void accept(GenOperationStateVisitor visitor);
21:         
22:         /**
23:          * Calls the handle method in the given visitor.
24:          *
25:          * @param visitor
26:          * The visitor to handle this type.
27:          * @param <X>
28:          * The returntype of the handle and the accept method.
29:          * @return Returns the result of type <X> that is returned by the handle method.
30:          */
31:         <X> X accept(GenOperationStateVisitorReturn<X> visitor);
32:         
33:         /**
34:          * Calls the handle method in the given visitor.
35:          *
36:          * @param visitor
37:          * The visitor to handle this type.
38:          * @param <Y>
39:          * The exception that can be thrown by the handle method.
40:          * @throws Y
41:          * Throws an exception of type <X> when the handle method throws it.
42:          */
43:         <Y extends java.lang.Exception> void accept(GenOperationStateVisitorException<Y> visitor) throws Y;
44:         
45:         /**
46:          * Calls the handle method in the given visitor.
47:          *
48:          * @param visitor
49:          * The visitor to handle this type.
50:          * @param <X>
51:          * The returntype of the handle and the accept method.
52:          * @param <Y>
53:          * The exception that can be thrown by the handle method.
54:          * @throws Y
55:          * Throws an exception of type <X> when the handle method throws it.
56:          * @return Returns the result of type <X> that is returned by the handle method.
57:          */
58:         <X, Y extends java.lang.Exception> X accept(GenOperationStateVisitorReturnException<X, Y> visitor) throws Y;
59:         
60: }