1 19 20 package jode.expr; 21 import jode.GlobalOptions; 22 import jode.type.Type; 23 import jode.decompiler.MethodAnalyzer; 24 import jode.decompiler.ClassAnalyzer; 25 import jode.decompiler.LocalInfo; 26 import jode.decompiler.TabbedPrintWriter; 27 28 public class OuterLocalOperator extends Operator { 29 LocalInfo local; 30 31 public OuterLocalOperator(LocalInfo local) { 32 super(local.getType()); 33 this.local = local; 34 initOperands(0); 35 } 36 37 public boolean isConstant() { 38 return true; 39 } 40 41 public int getPriority() { 42 return 1000; 43 } 44 45 public LocalInfo getLocalInfo() { 46 return local.getLocalInfo(); 47 } 48 49 public void updateSubTypes() { 50 if ((GlobalOptions.debuggingFlags & GlobalOptions.DEBUG_TYPES) != 0) 51 GlobalOptions.err.println("setType of "+local.getName()+": " 52 +local.getType()); 53 local.setType(type); 54 } 55 56 public void updateType() { 57 } 58 59 public boolean opEquals(Operator o) { 60 return (o instanceof OuterLocalOperator && 61 ((OuterLocalOperator) o).local.getSlot() == local.getSlot()); 62 } 63 64 public Expression simplify() { 65 return super.simplify(); 66 } 67 68 public void dumpExpression(TabbedPrintWriter writer) 69 throws java.io.IOException { 70 writer.print(local.getName()); 71 } 72 } 73 | Popular Tags |