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 LocalLoadOperator extends LocalVarOperator { 29 30 MethodAnalyzer methodAnalyzer; 31 32 public LocalLoadOperator(Type type, MethodAnalyzer methodAnalyzer, 33 LocalInfo local) { 34 super(type, local); 35 this.methodAnalyzer = methodAnalyzer; 36 } 37 38 public boolean isRead() { 39 return true; 40 } 41 42 public boolean isWrite() { 43 return false; 44 } 45 46 public boolean isConstant() { 47 return false; 48 } 49 50 public void setMethodAnalyzer(MethodAnalyzer ma) { 51 methodAnalyzer = ma; 52 } 53 54 public boolean opEquals(Operator o) { 55 return (o instanceof LocalLoadOperator && 56 ((LocalLoadOperator) o).local.getSlot() == local.getSlot()); 57 } 58 59 public Expression simplify() { 60 if (local.getExpression() != null) 61 return local.getExpression().simplify(); 62 return super.simplify(); 63 } 64 } 65 | Popular Tags |