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; /** * 7.5.4 A static-import-on-demand declaration allows all accessible (\u00ac\u00df6.6) static * members declared in the type named by a canonical name to be imported as * needed. * @ast node * @declaredat StaticImports.ast:19 */ public class StaticImportOnDemandDecl extends StaticImportDecl implements Cloneable { /** * @apilevel low-level */ public void flushCache() { super.flushCache(); } /** * @apilevel internal */ public void flushCollectionCache() { super.flushCollectionCache(); } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public StaticImportOnDemandDecl clone() throws CloneNotSupportedException { StaticImportOnDemandDecl node = (StaticImportOnDemandDecl)super.clone(); node.in$Circle(false); node.is$Final(false); return node; } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public StaticImportOnDemandDecl copy() { try { StaticImportOnDemandDecl node = (StaticImportOnDemandDecl)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; } /** * @apilevel low-level */ @SuppressWarnings({"unchecked", "cast"}) public StaticImportOnDemandDecl fullCopy() { StaticImportOnDemandDecl res = (StaticImportOnDemandDecl)copy(); for(int i = 0; i < getNumChildNoTransform(); i++) { ASTNode node = getChildNoTransform(i); if(node != null) node = node.fullCopy(); res.setChild(node, i); } return res; } /** * @ast method * @aspect StaticImports * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/StaticImports.jrag:213 */ public void toString(StringBuffer s) { s.append("import static "); getAccess().toString(s); s.append(".*;\n"); } /** * @ast method * @declaredat StaticImports.ast:1 */ public StaticImportOnDemandDecl() { super(); } /** * @ast method * @declaredat StaticImports.ast:7 */ public StaticImportOnDemandDecl(Access p0) { setChild(p0, 0); } /** * @apilevel low-level * @ast method * @declaredat StaticImports.ast:13 */ protected int numChildren() { return 1; } /** * @apilevel internal * @ast method * @declaredat StaticImports.ast:19 */ public boolean mayHaveRewrite() { return false; } /** * Setter for Access * @apilevel high-level * @ast method * @declaredat java.ast:5 */ public void setAccess(Access node) { setChild(node, 0); } /** * Getter for Access * @apilevel high-level * @ast method * @declaredat java.ast:12 */ public Access getAccess() { return (Access)getChild(0); } /** * @apilevel low-level * @ast method * @declaredat java.ast:18 */ public Access getAccessNoTransform() { return (Access)getChildNoTransform(0); } /** * @attribute syn * @aspect StaticImports * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/StaticImports.jrag:55 */ @SuppressWarnings({"unchecked", "cast"}) public TypeDecl type() { ASTNode$State state = state(); TypeDecl type_value = type_compute(); return type_value; } /** * @apilevel internal */ private TypeDecl type_compute() { return getAccess().type(); } /** * @attribute syn * @aspect StaticImports * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/StaticImports.jrag:58 */ @SuppressWarnings({"unchecked", "cast"}) public boolean isOnDemand() { ASTNode$State state = state(); boolean isOnDemand_value = isOnDemand_compute(); return isOnDemand_value; } /** * @apilevel internal */ private boolean isOnDemand_compute() { return true; } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/StaticImports.jrag:204 * @apilevel internal */ public NameType Define_NameType_nameType(ASTNode caller, ASTNode child) { if(caller == getAccessNoTransform()) { return NameType.TYPE_NAME; } return getParent().Define_NameType_nameType(this, caller); } /** * @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); } }