Skip to content

Package: GenException

GenException

nameinstructionbranchcomplexitylinemethod
GenException(String, Collection, Collection, Collection, Collection, Collection, GenPackage, GenComment, String)
M: 0 C: 17
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
accept(GenClassClassVisitor)
M: 0 C: 4
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 2
100%
M: 0 C: 1
100%
accept(GenClassClassVisitorException)
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
accept(GenClassClassVisitorReturn)
M: 0 C: 4
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
accept(GenTypeVisitorException)
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
create(String, Collection, Collection, Collection, Collection, Collection, GenPackage, GenComment, String)
M: 0 C: 13
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%

Coverage

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.getOperations().addAll(GenIAnyType.getOwnOperations()); // TODO BugZilla
45:                 this.setExtend(GenExternalClassClass.getInstance("de.fhdw.wtf.context.model.AbstractExceptionLayer"));
46:         }
47:         
48:         /**
49:          * Creates an object of {@link GenException}.
50:          *
51:          * @param name
52:          * The name of the class and the java-file to generate.
53:          * @param attributes
54:          * The attribute the class has.
55:          * @param operations
56:          * The operations the class has.
57:          * @param modifiers
58:          * The class-modifiers for this class. For example "public".
59:          * @param constructors
60:          * The constructor-operations for this class.
61:          * @param impl
62:          * The interfaces the class implements.
63:          * @param comment
64:          * The comment that describes this class.
65:          * @param packag
66:          * The package the class will be generated in.
67:          * @param nonGenPart
68:          * Additional lines of code.
69:          *
70:          * @return new {@link GenException}-Object.
71:          */
72:         public static GenException create(final String name,
73:                         final Collection<GenJavaOperation> operations,
74:                         final Collection<GenInterfaceClass> impl,
75:                         final Collection<GenJavaAttribute> attributes,
76:                         final Collection<GenClassModifier> modifiers,
77:                         final Collection<GenJavaOperation> constructors,
78:                         final GenPackage packag,
79:                         final GenComment comment,
80:                         final String nonGenPart) {
81:                 return new GenException(name, operations, impl, attributes, modifiers, constructors, packag, comment,
82:                                 nonGenPart);
83:         }
84:         
85:         @Override
86:         public void accept(final GenClassClassVisitor visitor) {
87:                 visitor.handle(this);
88:         }
89:         
90:         @Override
91:         public <X> X accept(final GenClassClassVisitorReturn<X> visitor) {
92:                 return visitor.handle(this);
93:         }
94:         
95:         @Override
96:         public <X extends java.lang.Exception> void accept(final GenTypeVisitorException<X> visitor) throws X {
97:                 visitor.handle(this);
98:         }
99:         
100:         @Override
101:         public <Y extends Exception> void accept(final GenClassClassVisitorException<Y> visitor) throws Y {
102:                 visitor.handle(this);
103:         }
104: }