Skip to content

Method: accept(GenInterfaceClassVisitor)

1: package de.fhdw.wtf.generator.java.generatorModel;
2:
3: import java.util.Collection;
4:
5: import de.fhdw.wtf.generator.java.visitor.GenInterfaceClassVisitor;
6: import de.fhdw.wtf.generator.java.visitor.GenInterfaceClassVisitorException;
7: import de.fhdw.wtf.generator.java.visitor.GenInterfaceClassVisitorReturn;
8:
9: /**
10: * A GenSimpleInterfaceClass represents an java interface that shall be generated.
11: */
12: public final class GenSimpleInterfaceClass extends GenInterfaceClass {
13:         
14:         /**
15:          * Instantiates a new {@link GenSimpleInterfaceClass}.
16:          *
17:          * @param name
18:          * The name of the interface.
19:          * @param operations
20:          * The operations the interface has.
21:          * @param implement
22:          * The interfaces this interface implements.
23:          * @param packag
24:          * The package the interface is in.
25:          * @param comment
26:          * The comment describing this interface.
27:          * @param nonGeneratedPart
28:          * The additional part of the interface that is not generated.
29:          */
30:         private GenSimpleInterfaceClass(final String name,
31:                         final Collection<GenJavaOperation> operations,
32:                         final Collection<GenInterfaceClass> implement,
33:                         final GenPackage packag,
34:                         final GenComment comment,
35:                         final String nonGeneratedPart) {
36:                 super(name, operations, implement, packag, comment, nonGeneratedPart);
37:         }
38:         
39:         /**
40:          * Creates a new {@link GenSimpleInterfaceClass}.
41:          *
42:          * @param name
43:          * The name of the interface.
44:          * @param operations
45:          * The operations the interface has.
46:          * @param implement
47:          * The interfaces this interface implements.
48:          * @param packag
49:          * The package the interface is in.
50:          * @param comment
51:          * The comment describing this interface.
52:          * @param nonGeneratedPart
53:          * The additional part of the interface that is not generated.
54:          * @return {@link GenSimpleInterfaceClass}
55:          */
56:         public static GenSimpleInterfaceClass create(final String name,
57:                         final Collection<GenJavaOperation> operations,
58:                         final Collection<GenInterfaceClass> implement,
59:                         final GenPackage packag,
60:                         final GenComment comment,
61:                         final String nonGeneratedPart) {
62:                 return new GenSimpleInterfaceClass(name, operations, implement, packag, comment, nonGeneratedPart);
63:         }
64:         
65:         @Override
66:         public void accept(final GenInterfaceClassVisitor visitor) {
67:                 visitor.handle(this);
68:         }
69:         
70:         @Override
71:         public <X> X accept(final GenInterfaceClassVisitorReturn<X> visitor) {
72:                 return visitor.handle(this);
73:         }
74:         
75:         @Override
76:         public <Y extends Exception> void accept(final GenInterfaceClassVisitorException<Y> visitor) throws Y {
77:                 visitor.handle(this);
78:         }
79:         
80: }