package soot.JastAddJ; import java.util.HashSet;import java.util.LinkedHashSet;import java.io.File;import java.util.*;import beaver.*;import java.util.ArrayList;import java.util.zip.*;import java.io.*;import java.io.FileNotFoundException;import java.util.Collection;import soot.*;import soot.util.*;import soot.jimple.*;import soot.coffi.ClassFile;import soot.coffi.method_info;import soot.coffi.CONSTANT_Utf8_info;import soot.tagkit.SourceFileTag;import soot.coffi.CoffiMethodSource; public class PreIncExpr extends Unary implements Cloneable { public void flushCache() { super.flushCache(); } public void flushCollectionCache() { super.flushCollectionCache(); } @SuppressWarnings({"unchecked", "cast"}) public PreIncExpr clone() throws CloneNotSupportedException { PreIncExpr node = (PreIncExpr)super.clone(); node.in$Circle(false); node.is$Final(false); return node; } @SuppressWarnings({"unchecked", "cast"}) public PreIncExpr copy() { try { PreIncExpr node = (PreIncExpr)clone(); if(children != null) node.children = (ASTNode[])children.clone(); return node; } catch (CloneNotSupportedException e) { } System.err.println("Error: Could not clone node of type " + getClass().getName() + "!"); return null; } @SuppressWarnings({"unchecked", "cast"}) public PreIncExpr fullCopy() { PreIncExpr res = (PreIncExpr)copy(); for(int i = 0; i < getNumChildNoTransform(); i++) { ASTNode node = getChildNoTransform(i); if(node != null) node = node.fullCopy(); res.setChild(node, i); } return res; } // Declared in DefiniteAssignment.jrag at line 72 public void definiteAssignment() { if(getOperand().isVariable()) { Variable v = getOperand().varDecl(); if(v != null && v.isFinal()) { error("++ and -- can not be applied to final variable " + v); } } } // Declared in DefiniteAssignment.jrag at line 478 protected boolean checkDUeverywhere(Variable v) { if(getOperand().isVariable() && getOperand().varDecl() == v) if(!isDAbefore(v)) return false; return super.checkDUeverywhere(v); } // Declared in TypeCheck.jrag at line 301 // 15.15.1 public void typeCheck() { if(!getOperand().isVariable()) error("prefix increment expression only work on variables"); else if(!getOperand().type().isNumericType()) error("unary increment only operates on numeric types"); } // Declared in Expressions.jrag at line 769 public soot.Value eval(Body b) { return emitPrefix(b, 1); } // Declared in java.ast at line 3 // Declared in java.ast line 140 public PreIncExpr() { super(); } // Declared in java.ast at line 10 // Declared in java.ast line 140 public PreIncExpr(Expr p0) { setChild(p0, 0); } // Declared in java.ast at line 14 protected int numChildren() { return 1; } // Declared in java.ast at line 17 public boolean mayHaveRewrite() { return false; } // Declared in java.ast at line 2 // Declared in java.ast line 139 public void setOperand(Expr node) { setChild(node, 0); } // Declared in java.ast at line 5 public Expr getOperand() { return (Expr)getChild(0); } // Declared in java.ast at line 9 public Expr getOperandNoTransform() { return (Expr)getChildNoTransform(0); } // Declared in PrettyPrint.jadd at line 376 @SuppressWarnings({"unchecked", "cast"}) public String printPreOp() { ASTNode$State state = state(); String printPreOp_value = printPreOp_compute(); return printPreOp_value; } private String printPreOp_compute() { return "++"; } // Declared in DefiniteAssignment.jrag at line 46 public boolean Define_boolean_isDest(ASTNode caller, ASTNode child) { if(caller == getOperandNoTransform()) { return true; } return getParent().Define_boolean_isDest(this, caller); } // Declared in DefiniteAssignment.jrag at line 54 public boolean Define_boolean_isIncOrDec(ASTNode caller, ASTNode child) { if(caller == getOperandNoTransform()) { return true; } return getParent().Define_boolean_isIncOrDec(this, caller); } public ASTNode rewriteTo() { return super.rewriteTo(); } }