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 AnnotationMethodDecl extends MethodDecl implements Cloneable { public void flushCache() { super.flushCache(); } public void flushCollectionCache() { super.flushCollectionCache(); } @SuppressWarnings({"unchecked", "cast"}) public AnnotationMethodDecl clone() throws CloneNotSupportedException { AnnotationMethodDecl node = (AnnotationMethodDecl)super.clone(); node.in$Circle(false); node.is$Final(false); return node; } @SuppressWarnings({"unchecked", "cast"}) public AnnotationMethodDecl copy() { try { AnnotationMethodDecl node = (AnnotationMethodDecl)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 AnnotationMethodDecl fullCopy() { AnnotationMethodDecl res = (AnnotationMethodDecl)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 Annotations.jrag at line 160 /* An ElementValue is used to specify a default value. It is a compile-time error if the type of the element is not commensurate (\ufffd9.7) with the default value specified. An ElementValue is always FP-strict (\ufffd15.4).*/ public void typeCheck() { super.typeCheck(); if(hasDefaultValue() && !type().commensurateWith(getDefaultValue())) error(type().typeName() + " is not commensurate with " + getDefaultValue().type().typeName()); } // Declared in Annotations.jrag at line 567 public void toString(StringBuffer s) { s.append(indent()); getModifiers().toString(s); getTypeAccess().toString(s); s.append(" " + name() + "()"); if(hasDefaultValue()) { s.append(" default "); getDefaultValue().toString(s); } s.append(";\n"); } // Declared in AnnotationsCodegen.jrag at line 293 public void addAttributes() { super.addAttributes(); // 4.8.19 if(hasDefaultValue()) { ArrayList elements = new ArrayList(1); getDefaultValue().appendAsAttributeTo(elements, "default"); soot.tagkit.AnnotationDefaultTag tag = new soot.tagkit.AnnotationDefaultTag((soot.tagkit.AnnotationElem)elements.get(0)); sootMethod.addTag(tag); } } // Declared in Annotations.ast at line 3 // Declared in Annotations.ast line 3 public AnnotationMethodDecl() { super(); setChild(new List(), 2); setChild(new List(), 3); setChild(new Opt(), 4); setChild(new Opt(), 5); } // Declared in Annotations.ast at line 14 // Declared in Annotations.ast line 3 public AnnotationMethodDecl(Modifiers p0, Access p1, String p2, List<ParameterDeclaration> p3, List<Access> p4, Opt<Block> p5, Opt<ElementValue> p6) { setChild(p0, 0); setChild(p1, 1); setID(p2); setChild(p3, 2); setChild(p4, 3); setChild(p5, 4); setChild(p6, 5); } // Declared in Annotations.ast at line 25 // Declared in Annotations.ast line 3 public AnnotationMethodDecl(Modifiers p0, Access p1, beaver.Symbol p2, List<ParameterDeclaration> p3, List<Access> p4, Opt<Block> p5, Opt<ElementValue> p6) { setChild(p0, 0); setChild(p1, 1); setID(p2); setChild(p3, 2); setChild(p4, 3); setChild(p5, 4); setChild(p6, 5); } // Declared in Annotations.ast at line 35 protected int numChildren() { return 6; } // Declared in Annotations.ast at line 38 public boolean mayHaveRewrite() { return false; } // Declared in java.ast at line 2 // Declared in java.ast line 88 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 88 public void setTypeAccess(Access node) { setChild(node, 1); } // Declared in java.ast at line 5 public Access getTypeAccess() { return (Access)getChild(1); } // Declared in java.ast at line 9 public Access getTypeAccessNoTransform() { return (Access)getChildNoTransform(1); } // Declared in java.ast at line 2 // Declared in java.ast line 88 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 88 public void setParameterList(List<ParameterDeclaration> list) { setChild(list, 2); } // Declared in java.ast at line 6 public int getNumParameter() { return getParameterList().getNumChild(); } // Declared in java.ast at line 10 @SuppressWarnings({"unchecked", "cast"}) public ParameterDeclaration getParameter(int i) { return (ParameterDeclaration)getParameterList().getChild(i); } // Declared in java.ast at line 14 public void addParameter(ParameterDeclaration node) { List<ParameterDeclaration> list = (parent == null || state == null) ? getParameterListNoTransform() : getParameterList(); list.addChild(node); } // Declared in java.ast at line 19 public void addParameterNoTransform(ParameterDeclaration node) { List<ParameterDeclaration> list = getParameterListNoTransform(); list.addChild(node); } // Declared in java.ast at line 24 public void setParameter(ParameterDeclaration node, int i) { List<ParameterDeclaration> list = getParameterList(); list.setChild(node, i); } // Declared in java.ast at line 28 public List<ParameterDeclaration> getParameters() { return getParameterList(); } // Declared in java.ast at line 31 public List<ParameterDeclaration> getParametersNoTransform() { return getParameterListNoTransform(); } // Declared in java.ast at line 35 @SuppressWarnings({"unchecked", "cast"}) public List<ParameterDeclaration> getParameterList() { List<ParameterDeclaration> list = (List<ParameterDeclaration>)getChild(2); list.getNumChild(); return list; } // Declared in java.ast at line 41 @SuppressWarnings({"unchecked", "cast"}) public List<ParameterDeclaration> getParameterListNoTransform() { return (List<ParameterDeclaration>)getChildNoTransform(2); } // Declared in java.ast at line 2 // Declared in java.ast line 88 public void setExceptionList(List<Access> list) { setChild(list, 3); } // Declared in java.ast at line 6 public int getNumException() { return getExceptionList().getNumChild(); } // Declared in java.ast at line 10 @SuppressWarnings({"unchecked", "cast"}) public Access getException(int i) { return (Access)getExceptionList().getChild(i); } // Declared in java.ast at line 14 public void addException(Access node) { List<Access> list = (parent == null || state == null) ? getExceptionListNoTransform() : getExceptionList(); list.addChild(node); } // Declared in java.ast at line 19 public void addExceptionNoTransform(Access node) { List<Access> list = getExceptionListNoTransform(); list.addChild(node); } // Declared in java.ast at line 24 public void setException(Access node, int i) { List<Access> list = getExceptionList(); list.setChild(node, i); } // Declared in java.ast at line 28 public List<Access> getExceptions() { return getExceptionList(); } // Declared in java.ast at line 31 public List<Access> getExceptionsNoTransform() { return getExceptionListNoTransform(); } // Declared in java.ast at line 35 @SuppressWarnings({"unchecked", "cast"}) public List<Access> getExceptionList() { List<Access> list = (List<Access>)getChild(3); list.getNumChild(); return list; } // Declared in java.ast at line 41 @SuppressWarnings({"unchecked", "cast"}) public List<Access> getExceptionListNoTransform() { return (List<Access>)getChildNoTransform(3); } // Declared in java.ast at line 2 // Declared in java.ast line 88 public void setBlockOpt(Opt<Block> opt) { setChild(opt, 4); } // Declared in java.ast at line 6 public boolean hasBlock() { return getBlockOpt().getNumChild() != 0; } // Declared in java.ast at line 10 @SuppressWarnings({"unchecked", "cast"}) public Block getBlock() { return (Block)getBlockOpt().getChild(0); } // Declared in java.ast at line 14 public void setBlock(Block node) { getBlockOpt().setChild(node, 0); } // Declared in java.ast at line 17 @SuppressWarnings({"unchecked", "cast"}) public Opt<Block> getBlockOpt() { return (Opt<Block>)getChild(4); } // Declared in java.ast at line 21 @SuppressWarnings({"unchecked", "cast"}) public Opt<Block> getBlockOptNoTransform() { return (Opt<Block>)getChildNoTransform(4); } // Declared in Annotations.ast at line 2 // Declared in Annotations.ast line 3 public void setDefaultValueOpt(Opt<ElementValue> opt) { setChild(opt, 5); } // Declared in Annotations.ast at line 6 public boolean hasDefaultValue() { return getDefaultValueOpt().getNumChild() != 0; } // Declared in Annotations.ast at line 10 @SuppressWarnings({"unchecked", "cast"}) public ElementValue getDefaultValue() { return (ElementValue)getDefaultValueOpt().getChild(0); } // Declared in Annotations.ast at line 14 public void setDefaultValue(ElementValue node) { getDefaultValueOpt().setChild(node, 0); } // Declared in Annotations.ast at line 17 @SuppressWarnings({"unchecked", "cast"}) public Opt<ElementValue> getDefaultValueOpt() { return (Opt<ElementValue>)getChild(5); } // Declared in Annotations.ast at line 21 @SuppressWarnings({"unchecked", "cast"}) public Opt<ElementValue> getDefaultValueOptNoTransform() { return (Opt<ElementValue>)getChildNoTransform(5); } public ASTNode rewriteTo() { return super.rewriteTo(); } }