Skip to content

Method: accept(GenClassClassVisitorException)

1: package de.fhdw.wtf.generator.java.generatorModel;
2:
3: import java.util.Collection;
4:
5: import de.fhdw.wtf.generator.java.visitor.GenClassClassVisitor;
6: import de.fhdw.wtf.generator.java.visitor.GenClassClassVisitorException;
7: import de.fhdw.wtf.generator.java.visitor.GenClassClassVisitorReturn;
8: import de.fhdw.wtf.generator.java.visitor.GenTypeVisitorException;
9:
10: public class GenException extends GenClassClass {
11:         
12:         /**
13:          * Constructor of {@link GenException}.
14:          *
15:          * @param name
16:          * The name of the class and the java-file to generate.
17:          * @param attributes
18:          * The attribute the class has.
19:          * @param operations
20:          * The operations the class has.
21:          * @param modifiers
22:          * The class-modifiers for this class. For example "public".
23:          * @param constructors
24:          * The constructor-operations for this class.
25:          * @param impl
26:          * The interfaces the class implements.
27:          * @param comment
28:          * The comment that describes this class.
29:          * @param packag
30:          * The package the class will be generated in.
31:          * @param nonGenPart
32:          * Additional lines of code.
33:          */
34:         protected GenException(final String name,
35:                         final Collection<GenJavaOperation> operations,
36:                         final Collection<GenInterfaceClass> impl,
37:                         final Collection<GenJavaAttribute> attributes,
38:                         final Collection<GenClassModifier> modifiers,
39:                         final Collection<GenJavaOperation> constructors,
40:                         final GenPackage packag,
41:                         final GenComment comment,
42:                         final String nonGenPart) {
43:                 super(name, operations, impl, attributes, modifiers, constructors, null, packag, comment, nonGenPart);
44:                 this.setExtend(GenExternalClassClass.getInstance("de.fhdw.wtf.context.model.AbstractExceptionLayer"));
45:         }
46:         
47:         /**
48:          * Creates an object of {@link GenException}.
49:          *
50:          * @param name
51:          * The name of the class and the java-file to generate.
52:          * @param attributes
53:          * The attribute the class has.
54:          * @param operations
55:          * The operations the class has.
56:          * @param modifiers
57:          * The class-modifiers for this class. For example "public".
58:          * @param constructors
59:          * The constructor-operations for this class.
60:          * @param impl
61:          * The interfaces the class implements.
62:          * @param comment
63:          * The comment that describes this class.
64:          * @param packag
65:          * The package the class will be generated in.
66:          * @param nonGenPart
67:          * Additional lines of code.
68:          *
69:          * @return new {@link GenException}-Object.
70:          */
71:         public static GenException create(final String name,
72:                         final Collection<GenJavaOperation> operations,
73:                         final Collection<GenInterfaceClass> impl,
74:                         final Collection<GenJavaAttribute> attributes,
75:                         final Collection<GenClassModifier> modifiers,
76:                         final Collection<GenJavaOperation> constructors,
77:                         final GenPackage packag,
78:                         final GenComment comment,
79:                         final String nonGenPart) {
80:                 return new GenException(name, operations, impl, attributes, modifiers, constructors, packag, comment,
81:                                 nonGenPart);
82:         }
83:         
84:         @Override
85:         public void accept(final GenClassClassVisitor visitor) {
86:                 visitor.handle(this);
87:         }
88:         
89:         @Override
90:         public <X> X accept(final GenClassClassVisitorReturn<X> visitor) {
91:                 return visitor.handle(this);
92:         }
93:         
94:         @Override
95:         public <X extends java.lang.Exception> void accept(final GenTypeVisitorException<X> visitor) throws X {
96:                 visitor.handle(this);
97:         }
98:         
99:         @Override
100:         public <Y extends Exception> void accept(final GenClassClassVisitorException<Y> visitor) throws Y {
101:                 visitor.handle(this);
102:         }
103: }