1 20 21 package soot.dava.internal.javaRep; 22 23 import java.util.*; 24 import soot.jimple.internal.*; 25 import soot.dava.internal.SET.*; 26 import soot.*; 27 28 public class DAbruptStmt extends AbstractStmt 29 { 30 private String command; 31 private SETNodeLabel label; 32 33 34 public boolean surpressDestinationLabel; 35 36 public DAbruptStmt( String command, SETNodeLabel label) 37 { 38 this.command = command; 39 this.label = label; 40 41 label.set_Name(); 42 surpressDestinationLabel = false; 43 } 44 45 public boolean fallsThrough() 46 { 47 return false; 48 } 49 50 public boolean branches() 51 { 52 return false; 53 } 54 55 public Object clone() 56 { 57 return new DAbruptStmt( command, label); 58 } 59 60 public String toString() 61 { 62 StringBuffer b = new StringBuffer (); 63 64 b.append( command); 65 66 if ((surpressDestinationLabel == false) && (label.toString() != null)) { 67 b.append( " "); 68 b.append( label.toString()); 69 } 70 71 return b.toString(); 72 } 73 74 public void toString(UnitPrinter up) { 75 up.literal(command); 76 if ((surpressDestinationLabel == false) && (label.toString() != null)) { 77 up.literal( " "); 78 up.literal( label.toString()); 79 } 80 } 81 82 public boolean is_Continue() 83 { 84 return command.equals( "continue"); 85 } 86 87 88 public boolean is_Break(){ 89 return command.equals("break"); 90 } 91 92 96 public void setLabel(SETNodeLabel label){ 97 this.label=label; 98 } 99 100 public SETNodeLabel getLabel(){ 101 return label; 102 } 103 } 104 | Popular Tags |