1 19 20 25 26 27 package soot; 28 29 import soot.tagkit.*; 30 31 33 public abstract class AbstractValueBox extends AbstractHost implements ValueBox 34 { 35 Value value; 36 37 public void setValue(Value value) 38 { 39 if(canContainValue(value)) 40 this.value = value; 41 else 42 throw new RuntimeException ("Box " + this + " cannot contain value: " + value + "(" + value.getClass() + ")" ); 43 } 44 45 public Value getValue() 46 { 47 return value; 48 } 49 50 public void toString( UnitPrinter up ) { 51 up.startValueBox(this); 52 value.toString(up); 53 up.endValueBox(this); 54 } 55 public String toString() { return "VB("+value+")"; } 56 } 57 58 59 60 61 62 | Popular Tags |