Skip to content

Package: GenUserClass

GenUserClass

nameinstructionbranchcomplexitylinemethod
GenUserClass(String, Collection, Collection, Collection, Collection, Collection, GenClassClass, GenPackage, GenComment, String)
M: 0 C: 13
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 2
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%
create(String, Collection, Collection, Collection, Collection, Collection, GenClassClass, GenPackage, GenComment, String)
M: 0 C: 14
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:
9: /**
10: * A {@link de.fhdw.wtf.generator.java.generatorModel.GenUserClass GenUserClass} is a user defined {@link GenClassClass}
11: * . It represents a non-base-class of the WTF-model.
12: */
13: public final class GenUserClass extends GenClassClass {
14:         
15:         /**
16:          * Instantiates a new GenUserClass.
17:          *
18:          * @param name
19:          * The name of the class and the java-file to generate.
20:          * @param attributes
21:          * The attribute the class has.
22:          * @param operations
23:          * The operations the class has.
24:          * @param modifiers
25:          * The class-modifiers for this class. For example "public".
26:          * @param constructors
27:          * The constructor-operations for this class.
28:          * @param implement
29:          * The interfaces the class implements.
30:          * @param extend
31:          * The class the class extends.
32:          * @param comment
33:          * The comment that describes this class.
34:          * @param packag
35:          * The package the class will be generated in.
36:          * @param nonGeneratedPart
37:          * Additional lines of code.
38:          */
39:         private GenUserClass(final String name,
40:                         final Collection<GenJavaOperation> operations,
41:                         final Collection<GenInterfaceClass> implement,
42:                         final Collection<GenJavaAttribute> attributes,
43:                         final Collection<GenClassModifier> modifiers,
44:                         final Collection<GenJavaOperation> constructors,
45:                         final GenClassClass extend,
46:                         final GenPackage packag,
47:                         final GenComment comment,
48:                         final String nonGeneratedPart) {
49:                 super(name, operations, implement, attributes, modifiers, constructors, extend, packag, comment,
50:                                 nonGeneratedPart);
51:         }
52:         
53:         /**
54:          * Creates a GenClassClass with for a Type with the given parameters.
55:          *
56:          * @param name
57:          * The name of the class and the java-file to generate.
58:          * @param attributes
59:          * The attribute the class has.
60:          * @param operations
61:          * The operations the class has.
62:          * @param modifiers
63:          * The class-modifiers for this class. For example "public".
64:          * @param constructors
65:          * The constructor-operations for this class.
66:          * @param implement
67:          * The interfaces the class implements.
68:          * @param extend
69:          * The class the class extends.
70:          * @param comment
71:          * The comment that describes this class.
72:          * @param packag
73:          * The package the class will be generated in.
74:          * @param nonGeneratedPart
75:          * Additional lines of code.
76:          * @return Returns a new GenUserClass with the given parameters.
77:          */
78:         public static GenUserClass create(final String name,
79:                         final Collection<GenJavaOperation> operations,
80:                         final Collection<GenInterfaceClass> implement,
81:                         final Collection<GenJavaAttribute> attributes,
82:                         final Collection<GenClassModifier> modifiers,
83:                         final Collection<GenJavaOperation> constructors,
84:                         final GenClassClass extend,
85:                         final GenPackage packag,
86:                         final GenComment comment,
87:                         final String nonGeneratedPart) {
88:                 return new GenUserClass(name, operations, implement, attributes, modifiers, constructors, extend, packag,
89:                                 comment, nonGeneratedPart);
90:         }
91:         
92:         @Override
93:         public void accept(final GenClassClassVisitor visitor) {
94:                 visitor.handle(this);
95:         }
96:         
97:         @Override
98:         public <X> X accept(final GenClassClassVisitorReturn<X> visitor) {
99:                 return visitor.handle(this);
100:         }
101:         
102:         @Override
103:         public <Y extends Exception> void accept(final GenClassClassVisitorException<Y> visitor) throws Y {
104:                 visitor.handle(this);
105:         }
106: }