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 DoubleType extends FloatingPointType 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 DoubleType clone() throws CloneNotSupportedException {
DoubleType node = (DoubleType)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 DoubleType copy() {
try {
DoubleType node = (DoubleType)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 DoubleType fullCopy() {
DoubleType res = (DoubleType)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 851
public void toString(StringBuffer s) {
s.append("double");
}
// Declared in java.ast at line 3
// Declared in java.ast line 60
public DoubleType() {
super();
setChild(new Opt(), 1);
setChild(new List(), 2);
}
// Declared in java.ast at line 12
// Declared in java.ast line 60
public DoubleType(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 60
public DoubleType(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 316
@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.doubleValue()); }
// Declared in ConstantExpression.jrag at line 327
@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 336
@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.doubleValue()); }
// Declared in ConstantExpression.jrag at line 352
@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.doubleValue() * c2.doubleValue()); }
// Declared in ConstantExpression.jrag at line 361
@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.doubleValue() / c2.doubleValue()); }
// Declared in ConstantExpression.jrag at line 370
@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.doubleValue() % c2.doubleValue()); }
// Declared in ConstantExpression.jrag at line 379
@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.doubleValue() + c2.doubleValue()); }
// Declared in ConstantExpression.jrag at line 389
@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.doubleValue() - c2.doubleValue()); }
// Declared in ConstantExpression.jrag at line 443
@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.doubleValue() : c2.doubleValue()); }
// Declared in ConstantExpression.jrag at line 547
@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().doubleValue() == right.constant().doubleValue(); }
// Declared in ConstantExpression.jrag at line 555
@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().doubleValue() < right.constant().doubleValue(); }
// Declared in ConstantExpression.jrag at line 561
@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().doubleValue() <= right.constant().doubleValue(); }
// Declared in TypeAnalysis.jrag at line 200
@SuppressWarnings({"unchecked", "cast"}) public boolean isDouble() {
ASTNode$State state = state();
boolean isDouble_value = isDouble_compute();
return isDouble_value;
}
private boolean isDouble_compute() { return true; }
// Declared in AutoBoxing.jrag at line 43
@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", "Double"); }
// Declared in Java2Rewrites.jrag at line 41
@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 "D"; }
// Declared in Java2Rewrites.jrag at line 53
@SuppressWarnings({"unchecked", "cast"}) public String primitiveClassName() {
ASTNode$State state = state();
String primitiveClassName_value = primitiveClassName_compute();
return primitiveClassName_value;
}
private String primitiveClassName_compute() { return "Double"; }
// Declared in EmitJimple.jrag at line 54
@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.DoubleType.v(); }
public ASTNode rewriteTo() {
return super.rewriteTo();
}
}