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 StringLiteral extends Literal implements Cloneable { public void flushCache() { super.flushCache(); constant_computed = false; constant_value = null; type_computed = false; type_value = null; } public void flushCollectionCache() { super.flushCollectionCache(); } @SuppressWarnings({"unchecked", "cast"}) public StringLiteral clone() throws CloneNotSupportedException { StringLiteral node = (StringLiteral)super.clone(); node.constant_computed = false; node.constant_value = null; node.type_computed = false; node.type_value = null; node.in$Circle(false); node.is$Final(false); return node; } @SuppressWarnings({"unchecked", "cast"}) public StringLiteral copy() { try { StringLiteral node = (StringLiteral)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 StringLiteral fullCopy() { StringLiteral res = (StringLiteral)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 266 public void toString(StringBuffer s) { s.append("\"" + escape(getLITERAL()) + "\""); } // Declared in Expressions.jrag at line 32 public soot.Value eval(Body b) { return soot.jimple.StringConstant.v(getLITERAL()); } // Declared in java.ast at line 3 // Declared in java.ast line 131 public StringLiteral() { super(); } // Declared in java.ast at line 10 // Declared in java.ast line 131 public StringLiteral(String p0) { setLITERAL(p0); } // Declared in java.ast at line 15 // Declared in java.ast line 131 public StringLiteral(beaver.Symbol p0) { setLITERAL(p0); } // Declared in java.ast at line 19 protected int numChildren() { return 0; } // Declared in java.ast at line 22 public boolean mayHaveRewrite() { return false; } // Declared in java.ast at line 2 // Declared in java.ast line 124 public void setLITERAL(String value) { tokenString_LITERAL = value; } // Declared in java.ast at line 5 public void setLITERAL(beaver.Symbol symbol) { if(symbol.value != null && !(symbol.value instanceof String)) throw new UnsupportedOperationException("setLITERAL is only valid for String lexemes"); tokenString_LITERAL = (String)symbol.value; LITERALstart = symbol.getStart(); LITERALend = symbol.getEnd(); } // Declared in java.ast at line 12 public String getLITERAL() { return tokenString_LITERAL != null ? tokenString_LITERAL : ""; } // Declared in ConstantExpression.jrag at line 304 @SuppressWarnings({"unchecked", "cast"}) public Constant constant() { if(constant_computed) { return constant_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); constant_value = constant_compute(); if(isFinal && num == state().boundariesCrossed) constant_computed = true; return constant_value; } private Constant constant_compute() { return Constant.create(getLITERAL()); } protected boolean type_computed = false; protected TypeDecl type_value; // Declared in TypeAnalysis.jrag at line 306 @SuppressWarnings({"unchecked", "cast"}) public TypeDecl type() { if(type_computed) { return type_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); type_value = type_compute(); if(isFinal && num == state().boundariesCrossed) type_computed = true; return type_value; } private TypeDecl type_compute() { return typeString(); } public ASTNode rewriteTo() { return super.rewriteTo(); } }