1 19 20 25 26 27 28 29 30 package soot.baf.internal; 31 32 import soot.*; 33 import soot.baf.*; 34 import soot.util.*; 35 import java.util.*; 36 37 public class BNewMultiArrayInst extends AbstractInst implements NewMultiArrayInst 38 { 39 int dimensionCount; 40 41 ArrayType baseType; 42 43 public BNewMultiArrayInst(ArrayType opType, int dimensionCount) 44 { 45 this.dimensionCount = dimensionCount; 46 baseType = opType; 47 } 48 49 50 51 public int getInCount() 52 { 53 return dimensionCount; 54 } 55 56 public int getOutCount() 57 { 58 return 1; 59 } 60 61 public int getInMachineCount() 62 { 63 return dimensionCount; 64 } 65 66 public int getOutMachineCount() 67 { 68 return 1; 69 } 70 71 72 public Object clone() 73 { 74 return new BNewMultiArrayInst(getBaseType(), getDimensionCount()); 75 } 76 77 final public String getName() { return "newmultiarray"; } 78 final String getParameters() 79 { return " "+dimensionCount; } 80 protected void getParameters(UnitPrinter up) { 81 up.literal(" "); 82 up.literal(new Integer (dimensionCount).toString()); 83 } 84 85 public ArrayType getBaseType() { return baseType; } 86 public void setBaseType(ArrayType type) { baseType = type; } 87 88 public int getDimensionCount() { return dimensionCount; } 89 public void setDimensionCount(int x) { x = dimensionCount; } 90 91 92 public void apply(Switch sw) 93 { 94 ((InstSwitch) sw).caseNewMultiArrayInst(this); 95 } 96 97 public boolean containsNewExpr() { 98 return true; 99 } 100 } 101 102 | Popular Tags |