1 2 3 package soot.jimple.parser.node; 4 5 import soot.jimple.parser.analysis.*; 6 7 public final class X2PStatement extends XPStatement 8 { 9 private PStatement _pStatement_; 10 11 public X2PStatement() 12 { 13 } 14 15 public X2PStatement( 16 PStatement _pStatement_) 17 { 18 setPStatement(_pStatement_); 19 } 20 21 public Object clone() 22 { 23 throw new RuntimeException ("Unsupported Operation"); 24 } 25 26 public void apply(Switch sw) 27 { 28 throw new RuntimeException ("Switch not supported."); 29 } 30 31 public PStatement getPStatement() 32 { 33 return _pStatement_; 34 } 35 36 public void setPStatement(PStatement node) 37 { 38 if(_pStatement_ != null) 39 { 40 _pStatement_.parent(null); 41 } 42 43 if(node != null) 44 { 45 if(node.parent() != null) 46 { 47 node.parent().removeChild(node); 48 } 49 50 node.parent(this); 51 } 52 53 _pStatement_ = node; 54 } 55 56 void removeChild(Node child) 57 { 58 if(_pStatement_ == child) 59 { 60 _pStatement_ = null; 61 } 62 } 63 64 void replaceChild(Node oldChild, Node newChild) 65 { 66 } 67 68 public String toString() 69 { 70 return "" + 71 toString(_pStatement_); 72 } 73 } 74 | Popular Tags |