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 LongType extends IntegralType implements Cloneable { public void flushCache() { super.flushCache(); boxed_computed = false; boxed_value = null; jvmName_computed = false; jvmName_value = null; getSootType_computed = false; getSootType_value = null; } public void flushCollectionCache() { super.flushCollectionCache(); } @SuppressWarnings({"unchecked", "cast"}) public LongType clone() throws CloneNotSupportedException { LongType node = (LongType)super.clone(); node.boxed_computed = false; node.boxed_value = null; node.jvmName_computed = false; node.jvmName_value = null; node.getSootType_computed = false; node.getSootType_value = null; node.in$Circle(false); node.is$Final(false); return node; } @SuppressWarnings({"unchecked", "cast"}) public LongType copy() { try { LongType node = (LongType)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 LongType fullCopy() { LongType res = (LongType)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 PrettyPrint.jadd at line 842 public void toString(StringBuffer s) { s.append("long"); } // Declared in java.ast at line 3 // Declared in java.ast line 56 public LongType() { super(); setChild(new Opt(), 1); setChild(new List(), 2); } // Declared in java.ast at line 12 // Declared in java.ast line 56 public LongType(Modifiers p0, String p1, Opt<Access> p2, List<BodyDecl> p3) { setChild(p0, 0); setID(p1); setChild(p2, 1); setChild(p3, 2); } // Declared in java.ast at line 20 // Declared in java.ast line 56 public LongType(Modifiers p0, beaver.Symbol p1, Opt<Access> p2, List<BodyDecl> p3) { setChild(p0, 0); setID(p1); setChild(p2, 1); setChild(p3, 2); } // Declared in java.ast at line 27 protected int numChildren() { return 3; } // Declared in java.ast at line 30 public boolean mayHaveRewrite() { return false; } // Declared in java.ast at line 2 // Declared in java.ast line 42 public void setModifiers(Modifiers node) { setChild(node, 0); } // Declared in java.ast at line 5 public Modifiers getModifiers() { return (Modifiers)getChild(0); } // Declared in java.ast at line 9 public Modifiers getModifiersNoTransform() { return (Modifiers)getChildNoTransform(0); } // Declared in java.ast at line 2 // Declared in java.ast line 42 public void setID(String value) { tokenString_ID = value; } // Declared in java.ast at line 5 public void setID(beaver.Symbol symbol) { if(symbol.value != null && !(symbol.value instanceof String)) throw new UnsupportedOperationException("setID is only valid for String lexemes"); tokenString_ID = (String)symbol.value; IDstart = symbol.getStart(); IDend = symbol.getEnd(); } // Declared in java.ast at line 12 public String getID() { return tokenString_ID != null ? tokenString_ID : ""; } // Declared in java.ast at line 2 // Declared in java.ast line 42 public void setSuperClassAccessOpt(Opt<Access> opt) { setChild(opt, 1); } // Declared in java.ast at line 6 public boolean hasSuperClassAccess() { return getSuperClassAccessOpt().getNumChild() != 0; } // Declared in java.ast at line 10 @SuppressWarnings({"unchecked", "cast"}) public Access getSuperClassAccess() { return (Access)getSuperClassAccessOpt().getChild(0); } // Declared in java.ast at line 14 public void setSuperClassAccess(Access node) { getSuperClassAccessOpt().setChild(node, 0); } // Declared in java.ast at line 17 @SuppressWarnings({"unchecked", "cast"}) public Opt<Access> getSuperClassAccessOpt() { return (Opt<Access>)getChild(1); } // Declared in java.ast at line 21 @SuppressWarnings({"unchecked", "cast"}) public Opt<Access> getSuperClassAccessOptNoTransform() { return (Opt<Access>)getChildNoTransform(1); } // Declared in java.ast at line 2 // Declared in java.ast line 42 public void setBodyDeclList(List<BodyDecl> list) { setChild(list, 2); } // Declared in java.ast at line 6 public int getNumBodyDecl() { return getBodyDeclList().getNumChild(); } // Declared in java.ast at line 10 @SuppressWarnings({"unchecked", "cast"}) public BodyDecl getBodyDecl(int i) { return (BodyDecl)getBodyDeclList().getChild(i); } // Declared in java.ast at line 14 public void addBodyDecl(BodyDecl node) { List<BodyDecl> list = (parent == null || state == null) ? getBodyDeclListNoTransform() : getBodyDeclList(); list.addChild(node); } // Declared in java.ast at line 19 public void addBodyDeclNoTransform(BodyDecl node) { List<BodyDecl> list = getBodyDeclListNoTransform(); list.addChild(node); } // Declared in java.ast at line 24 public void setBodyDecl(BodyDecl node, int i) { List<BodyDecl> list = getBodyDeclList(); list.setChild(node, i); } // Declared in java.ast at line 28 public List<BodyDecl> getBodyDecls() { return getBodyDeclList(); } // Declared in java.ast at line 31 public List<BodyDecl> getBodyDeclsNoTransform() { return getBodyDeclListNoTransform(); } // Declared in java.ast at line 35 @SuppressWarnings({"unchecked", "cast"}) public List<BodyDecl> getBodyDeclList() { List<BodyDecl> list = (List<BodyDecl>)getChild(2); list.getNumChild(); return list; } // Declared in java.ast at line 41 @SuppressWarnings({"unchecked", "cast"}) public List<BodyDecl> getBodyDeclListNoTransform() { return (List<BodyDecl>)getChildNoTransform(2); } // Declared in ConstantExpression.jrag at line 314 @SuppressWarnings({"unchecked", "cast"}) public Constant cast(Constant c) { ASTNode$State state = state(); Constant cast_Constant_value = cast_compute(c); return cast_Constant_value; } private Constant cast_compute(Constant c) { return Constant.create(c.longValue()); } // Declared in ConstantExpression.jrag at line 325 @SuppressWarnings({"unchecked", "cast"}) public Constant plus(Constant c) { ASTNode$State state = state(); Constant plus_Constant_value = plus_compute(c); return plus_Constant_value; } private Constant plus_compute(Constant c) { return c; } // Declared in ConstantExpression.jrag at line 334 @SuppressWarnings({"unchecked", "cast"}) public Constant minus(Constant c) { ASTNode$State state = state(); Constant minus_Constant_value = minus_compute(c); return minus_Constant_value; } private Constant minus_compute(Constant c) { return Constant.create(-c.longValue()); } // Declared in ConstantExpression.jrag at line 343 @SuppressWarnings({"unchecked", "cast"}) public Constant bitNot(Constant c) { ASTNode$State state = state(); Constant bitNot_Constant_value = bitNot_compute(c); return bitNot_Constant_value; } private Constant bitNot_compute(Constant c) { return Constant.create(~c.longValue()); } // Declared in ConstantExpression.jrag at line 350 @SuppressWarnings({"unchecked", "cast"}) public Constant mul(Constant c1, Constant c2) { ASTNode$State state = state(); Constant mul_Constant_Constant_value = mul_compute(c1, c2); return mul_Constant_Constant_value; } private Constant mul_compute(Constant c1, Constant c2) { return Constant.create(c1.longValue() * c2.longValue()); } // Declared in ConstantExpression.jrag at line 359 @SuppressWarnings({"unchecked", "cast"}) public Constant div(Constant c1, Constant c2) { ASTNode$State state = state(); Constant div_Constant_Constant_value = div_compute(c1, c2); return div_Constant_Constant_value; } private Constant div_compute(Constant c1, Constant c2) { return Constant.create(c1.longValue() / c2.longValue()); } // Declared in ConstantExpression.jrag at line 368 @SuppressWarnings({"unchecked", "cast"}) public Constant mod(Constant c1, Constant c2) { ASTNode$State state = state(); Constant mod_Constant_Constant_value = mod_compute(c1, c2); return mod_Constant_Constant_value; } private Constant mod_compute(Constant c1, Constant c2) { return Constant.create(c1.longValue() % c2.longValue()); } // Declared in ConstantExpression.jrag at line 377 @SuppressWarnings({"unchecked", "cast"}) public Constant add(Constant c1, Constant c2) { ASTNode$State state = state(); Constant add_Constant_Constant_value = add_compute(c1, c2); return add_Constant_Constant_value; } private Constant add_compute(Constant c1, Constant c2) { return Constant.create(c1.longValue() + c2.longValue()); } // Declared in ConstantExpression.jrag at line 387 @SuppressWarnings({"unchecked", "cast"}) public Constant sub(Constant c1, Constant c2) { ASTNode$State state = state(); Constant sub_Constant_Constant_value = sub_compute(c1, c2); return sub_Constant_Constant_value; } private Constant sub_compute(Constant c1, Constant c2) { return Constant.create(c1.longValue() - c2.longValue()); } // Declared in ConstantExpression.jrag at line 396 @SuppressWarnings({"unchecked", "cast"}) public Constant lshift(Constant c1, Constant c2) { ASTNode$State state = state(); Constant lshift_Constant_Constant_value = lshift_compute(c1, c2); return lshift_Constant_Constant_value; } private Constant lshift_compute(Constant c1, Constant c2) { return Constant.create(c1.longValue() << c2.longValue()); } // Declared in ConstantExpression.jrag at line 403 @SuppressWarnings({"unchecked", "cast"}) public Constant rshift(Constant c1, Constant c2) { ASTNode$State state = state(); Constant rshift_Constant_Constant_value = rshift_compute(c1, c2); return rshift_Constant_Constant_value; } private Constant rshift_compute(Constant c1, Constant c2) { return Constant.create(c1.longValue() >> c2.longValue()); } // Declared in ConstantExpression.jrag at line 410 @SuppressWarnings({"unchecked", "cast"}) public Constant urshift(Constant c1, Constant c2) { ASTNode$State state = state(); Constant urshift_Constant_Constant_value = urshift_compute(c1, c2); return urshift_Constant_Constant_value; } private Constant urshift_compute(Constant c1, Constant c2) { return Constant.create(c1.longValue() >>> c2.longValue()); } // Declared in ConstantExpression.jrag at line 417 @SuppressWarnings({"unchecked", "cast"}) public Constant andBitwise(Constant c1, Constant c2) { ASTNode$State state = state(); Constant andBitwise_Constant_Constant_value = andBitwise_compute(c1, c2); return andBitwise_Constant_Constant_value; } private Constant andBitwise_compute(Constant c1, Constant c2) { return Constant.create(c1.longValue() & c2.longValue()); } // Declared in ConstantExpression.jrag at line 425 @SuppressWarnings({"unchecked", "cast"}) public Constant xorBitwise(Constant c1, Constant c2) { ASTNode$State state = state(); Constant xorBitwise_Constant_Constant_value = xorBitwise_compute(c1, c2); return xorBitwise_Constant_Constant_value; } private Constant xorBitwise_compute(Constant c1, Constant c2) { return Constant.create(c1.longValue() ^ c2.longValue()); } // Declared in ConstantExpression.jrag at line 433 @SuppressWarnings({"unchecked", "cast"}) public Constant orBitwise(Constant c1, Constant c2) { ASTNode$State state = state(); Constant orBitwise_Constant_Constant_value = orBitwise_compute(c1, c2); return orBitwise_Constant_Constant_value; } private Constant orBitwise_compute(Constant c1, Constant c2) { return Constant.create(c1.longValue() | c2.longValue()); } // Declared in ConstantExpression.jrag at line 441 @SuppressWarnings({"unchecked", "cast"}) public Constant questionColon(Constant cond, Constant c1, Constant c2) { ASTNode$State state = state(); Constant questionColon_Constant_Constant_Constant_value = questionColon_compute(cond, c1, c2); return questionColon_Constant_Constant_Constant_value; } private Constant questionColon_compute(Constant cond, Constant c1, Constant c2) { return Constant.create(cond.booleanValue() ? c1.longValue() : c2.longValue()); } // Declared in ConstantExpression.jrag at line 545 @SuppressWarnings({"unchecked", "cast"}) public boolean eqIsTrue(Expr left, Expr right) { ASTNode$State state = state(); boolean eqIsTrue_Expr_Expr_value = eqIsTrue_compute(left, right); return eqIsTrue_Expr_Expr_value; } private boolean eqIsTrue_compute(Expr left, Expr right) { return left.constant().longValue() == right.constant().longValue(); } // Declared in ConstantExpression.jrag at line 553 @SuppressWarnings({"unchecked", "cast"}) public boolean ltIsTrue(Expr left, Expr right) { ASTNode$State state = state(); boolean ltIsTrue_Expr_Expr_value = ltIsTrue_compute(left, right); return ltIsTrue_Expr_Expr_value; } private boolean ltIsTrue_compute(Expr left, Expr right) { return left.constant().longValue() < right.constant().longValue(); } // Declared in ConstantExpression.jrag at line 559 @SuppressWarnings({"unchecked", "cast"}) public boolean leIsTrue(Expr left, Expr right) { ASTNode$State state = state(); boolean leIsTrue_Expr_Expr_value = leIsTrue_compute(left, right); return leIsTrue_Expr_Expr_value; } private boolean leIsTrue_compute(Expr left, Expr right) { return left.constant().longValue() <= right.constant().longValue(); } // Declared in NameCheck.jrag at line 424 @SuppressWarnings({"unchecked", "cast"}) public boolean assignableToInt() { ASTNode$State state = state(); boolean assignableToInt_value = assignableToInt_compute(); return assignableToInt_value; } private boolean assignableToInt_compute() { return false; } // Declared in TypeAnalysis.jrag at line 198 @SuppressWarnings({"unchecked", "cast"}) public boolean isLong() { ASTNode$State state = state(); boolean isLong_value = isLong_compute(); return isLong_value; } private boolean isLong_compute() { return true; } // Declared in AutoBoxing.jrag at line 41 @SuppressWarnings({"unchecked", "cast"}) public TypeDecl boxed() { if(boxed_computed) { return boxed_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); boxed_value = boxed_compute(); if(isFinal && num == state().boundariesCrossed) boxed_computed = true; return boxed_value; } private TypeDecl boxed_compute() { return lookupType("java.lang", "Long"); } // Declared in Java2Rewrites.jrag at line 39 @SuppressWarnings({"unchecked", "cast"}) public String jvmName() { if(jvmName_computed) { return jvmName_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); jvmName_value = jvmName_compute(); if(isFinal && num == state().boundariesCrossed) jvmName_computed = true; return jvmName_value; } private String jvmName_compute() { return "J"; } // Declared in Java2Rewrites.jrag at line 51 @SuppressWarnings({"unchecked", "cast"}) public String primitiveClassName() { ASTNode$State state = state(); String primitiveClassName_value = primitiveClassName_compute(); return primitiveClassName_value; } private String primitiveClassName_compute() { return "Long"; } // Declared in EmitJimple.jrag at line 51 @SuppressWarnings({"unchecked", "cast"}) public Type getSootType() { if(getSootType_computed) { return getSootType_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); getSootType_value = getSootType_compute(); if(isFinal && num == state().boundariesCrossed) getSootType_computed = true; return getSootType_value; } private Type getSootType_compute() { return soot.LongType.v(); } public ASTNode rewriteTo() { return super.rewriteTo(); } }