Skip to content

Package: DuplicateConstructorException

DuplicateConstructorException

nameinstructionbranchcomplexitylinemethod
DuplicateConstructorException(Constructor)
M: 12 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 3 C: 0
0%
M: 1 C: 0
0%
create(Constructor)
M: 5 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%

Coverage

1: package de.fhdw.wtf.common.exception.walker;
2:
3: import de.fhdw.wtf.common.ast.Constructor;
4:
5: /**
6: * Represents the exception expressed through the existence of a duplicate constructor.
7: */
8: public final class DuplicateConstructorException extends EditorMarkableConstructorException {
9:         
10:         /**
11:          * Instantiates a {@link DuplicateConstructorException}.
12:          *
13:          * @param constructor
14:          * duplicate constructor.
15:          */
16:         private DuplicateConstructorException(final Constructor constructor) {
17:                 super(constructor, de.fhdw.wtf.common.constants.walker.ExceptionConstants.DUPLICATE_CONSTRUCTOR_MESSAGE
18:                                 + constructor.toStringWithoutSuperconstructors());
19:         }
20:         
21:         /**
22:          * Instantiates a {@link DuplicateConstructorException}.
23:          *
24:          * @param constructor
25:          * duplicate constructor.
26:          * @return an instance of {@link DuplicateConstructorException}.
27:          */
28:         public static DuplicateConstructorException create(final Constructor constructor) {
29:                 return new DuplicateConstructorException(constructor);
30:         }
31: }