@@ -143,6 +143,11 @@ public String getDescription() {
143143 "%n\t jumps to: %s%n\t exceptions to: %s" ,
144144 getBlockString (successor ), getBlocksString (exceptions ));
145145 }
146+
147+ @ Override
148+ public String getBlockType () {
149+ return "UnknownException" ;
150+ }
146151 }
147152
148153 static class CasesImpl extends BlockImpl implements Cases {
@@ -194,6 +199,11 @@ public String getDescription() {
194199 "%n\t cases to: %s%n\t fallthrough to: %s" ,
195200 getBlocksString (cases ), getBlockString (fallthrough ));
196201 }
202+
203+ @ Override
204+ public String getBlockType () {
205+ return "Cases" ;
206+ }
197207 }
198208
199209 static class UnconditionalJumpImpl extends BlockImpl implements UnconditionalJump {
@@ -243,6 +253,11 @@ public String getDescription() {
243253 "%n\t jumps to: %s%n\t without jump to: %s" ,
244254 getBlockString (target ), getBlockString (withoutJump ));
245255 }
256+
257+ @ Override
258+ public String getBlockType () {
259+ return "UnconditionalJump" ;
260+ }
246261 }
247262
248263 static class LinearImpl extends BlockImpl implements Linear {
@@ -270,6 +285,11 @@ public void replaceInactiveSuccessor(Block inactiveBlock, Block target) {
270285 public String getDescription () {
271286 return String .format ("%n\t jumps to: %s" , getBlockString (successor ));
272287 }
288+
289+ @ Override
290+ public String getBlockType () {
291+ return "Linear" ;
292+ }
273293 }
274294
275295 static class FinallyImpl extends BlockImpl implements Finally {
@@ -307,6 +327,11 @@ public String getDescription() {
307327 "%n\t jumps to: %s%n\t exits to: %s" ,
308328 getBlockString (successor ), getBlockString (exceptionSuccessor ));
309329 }
330+
331+ @ Override
332+ public String getBlockType () {
333+ return "Finally" ;
334+ }
310335 }
311336
312337 static class HaltImpl extends BlockImpl implements Halt {
@@ -339,6 +364,11 @@ public void replaceInactiveSuccessor(Block inactiveBlock, Block target) {
339364 public String getDescription () {
340365 return String .format ("%n\t no successors" );
341366 }
367+
368+ @ Override
369+ public String getBlockType () {
370+ return "Halt" ;
371+ }
342372 }
343373
344374 private static class TerminusImpl extends BlockImpl implements Terminus {
@@ -356,6 +386,11 @@ public void replaceInactiveSuccessor(Block inactiveBlock, Block target) {
356386 public String getDescription () {
357387 return String .format ("%n\t (Exit)" );
358388 }
389+
390+ @ Override
391+ public String getBlockType () {
392+ return "Terminus" ;
393+ }
359394 }
360395
361396 static class BranchImpl extends BlockImpl implements Branch {
@@ -405,5 +440,10 @@ public String getDescription() {
405440 "%n\t jumps to: %s(true) %s(false)" ,
406441 getBlockString (trueBlock ), getBlockString (falseBlock ));
407442 }
443+
444+ @ Override
445+ public String getBlockType () {
446+ return "Branch" ;
447+ }
408448 }
409449}
0 commit comments