1 20 21 package soot.dava.internal.AST; 22 23 import soot.*; 24 import soot.dava.internal.SET.*; 25 import soot.dava.toolkits.base.AST.*; 26 27 public abstract class ASTLabeledNode extends ASTNode 28 { 29 private SETNodeLabel label; 30 31 public ASTLabeledNode( SETNodeLabel label) 32 { 33 super(); 34 35 set_Label( label); 36 } 37 38 public SETNodeLabel get_Label() 39 { 40 return label; 41 } 42 43 public void set_Label( SETNodeLabel label) 44 { 45 this.label = label; 46 } 47 48 public void perform_Analysis( ASTAnalysis a) 49 { 50 perform_AnalysisOnSubBodies( a); 51 } 52 53 public void label_toString( UnitPrinter up ) 54 { 55 if (label.toString() != null) { 56 up.literal( label.toString() ); 57 up.literal( ":" ); 58 up.newline(); 59 } 60 } 61 62 public String label_toString() 63 { 64 if (label.toString() == null) 65 return new String (); 66 67 else { 68 StringBuffer b = new StringBuffer (); 69 70 b.append( label.toString()); 71 b.append( ":"); 72 b.append( ASTNode.NEWLINE); 73 74 return b.toString(); 75 } 76 } 77 } 78 | Popular Tags |