Skip to content

Package: MarkableCheckException

MarkableCheckException

nameinstructionbranchcomplexitylinemethod
MarkableCheckException(Position, Position, Exception, EditorMarker)
M: 0 C: 17
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 6
100%
M: 0 C: 1
100%
accept(CheckExceptionVisitor)
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%
getDescription()
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
getEndPos()
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
getMarker()
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
getMessage()
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
getStartPosition()
M: 3 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.editor;
2:
3: import de.fhdw.wtf.common.token.Position;
4:
5: /**
6: * Markable check exception.
7: */
8: public class MarkableCheckException extends CheckException implements EditorMarkable {
9:         
10:         /**
11:          * generated.
12:          */
13:         private static final long serialVersionUID = -1240762509579304749L;
14:         
15:         /**
16:          * Description.
17:          */
18:         private final String description;
19:         
20:         /**
21:          * Start-Position.
22:          */
23:         private final Position startPos;
24:         
25:         /**
26:          * End-Position.
27:          */
28:         private final Position endPos;
29:         
30:         /**
31:          * Marker.
32:          */
33:         private final EditorMarker marker;
34:         
35:         /**
36:          * Constructor of {@link MarkableCheckException}.
37:          *
38:          * @param startPos
39:          * Start-Position
40:          * @param endPos
41:          * End-Position
42:          * @param inner
43:          * origin exception
44:          */
45:         public MarkableCheckException(final Position startPos,
46:                         final Position endPos,
47:                         final Exception inner,
48:                         final EditorMarker marker) {
49:                 super(inner);
50:                 this.startPos = startPos;
51:                 this.endPos = endPos;
52:                 this.description = inner.getMessage();
53:                 this.marker = marker;
54:         }
55:         
56:         @Override
57:         public Position getStartPosition() {
58:                 return this.startPos;
59:         }
60:         
61:         @Override
62:         public String getDescription() {
63:                 return this.description;
64:         }
65:         
66:         @Override
67:         public void accept(final CheckExceptionVisitor v) {
68:                 v.handle(this);
69:         }
70:         
71:         @Override
72:         public Position getEndPos() {
73:                 return this.endPos;
74:         }
75:         
76:         @Override
77:         public String getMessage() {
78:                 return this.description;
79:         }
80:         
81:         @Override
82:         public EditorMarker getMarker() {
83:                 return this.marker;
84:         }
85: }