Skip to content

Package: InvalidConstructorReferenceException

InvalidConstructorReferenceException

nameinstructionbranchcomplexitylinemethod
InvalidConstructorReferenceException(ConstructorReference, String)
M: 13 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
create(ConstructorReference, String)
M: 6 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.ConstructorReference;
4: import de.fhdw.wtf.common.constants.walker.ExceptionConstants;
5:
6: /**
7: * Represents existence of an invalid {@link ConstructorReference} instance.
8: */
9: public final class InvalidConstructorReferenceException extends EditorMarkableConstructorException {
10:         
11:         /**
12:          * Instantiates a {@link InvalidConstructorReferenceException}.
13:          *
14:          * @param constructorReference
15:          * the constructor reference which is invalid.
16:          * @param message
17:          * a matching exception message preferable from the {@link ExceptionConstants}.
18:          *
19:          */
20:         private InvalidConstructorReferenceException(final ConstructorReference constructorReference, final String message) {
21:                 super(constructorReference, message + constructorReference.toString());
22:         }
23:         
24:         /**
25:          * Instantiates a {@link InvalidConstructorReferenceException}.
26:          *
27:          * @param constructorReference
28:          * the constructor reference which is invalid.
29:          * @param message
30:          * a matching exception message preferable from the {@link ExceptionConstants}.
31:          * @return an instance of {@link InvalidConstructorReferenceException}.
32:          *
33:          */
34:         public static InvalidConstructorReferenceException create(final ConstructorReference constructorReference,
35:                         final String message) {
36:                 return new InvalidConstructorReferenceException(constructorReference, message);
37:         }
38: }