repo
stringlengths
1
191
file
stringlengths
23
351
code
stringlengths
0
5.32M
file_length
int64
0
5.32M
avg_line_length
float64
0
2.9k
max_line_length
int64
0
288k
extension_type
stringclasses
1 value
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/IntegerLiteral.java
/* This file was generated with JastAdd2 (http://jastadd.org) version R20130212 (r1031) */ package soot.JastAddJ; import java.util.HashSet; 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; /** * Default Java integer literal. Should only be used for numbers * that can be stored in 32 bits binary. * @production IntegerLiteral : {@link NumericLiteral}; * @ast node * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/Literals.ast:48 */ public class IntegerLiteral extends NumericLiteral implements Cloneable { /** * @apilevel low-level */ public void flushCache() { super.flushCache(); type_computed = false; type_value = null; constant_computed = false; constant_value = null; } /** * @apilevel internal */ public void flushCollectionCache() { super.flushCollectionCache(); } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public IntegerLiteral clone() throws CloneNotSupportedException { IntegerLiteral node = (IntegerLiteral)super.clone(); node.type_computed = false; node.type_value = null; node.constant_computed = false; node.constant_value = null; node.in$Circle(false); node.is$Final(false); return node; } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public IntegerLiteral copy() { try { IntegerLiteral node = (IntegerLiteral) clone(); node.parent = null; if(children != null) node.children = (ASTNode[]) children.clone(); return node; } catch (CloneNotSupportedException e) { throw new Error("Error: clone not supported for " + getClass().getName()); } } /** * Create a deep copy of the AST subtree at this node. * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level */ @SuppressWarnings({"unchecked", "cast"}) public IntegerLiteral fullCopy() { IntegerLiteral tree = (IntegerLiteral) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) children[i]; if(child != null) { child = child.fullCopy(); tree.setChild(child, i); } } } return tree; } /** * @ast method * @aspect NodeConstructors * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/NodeConstructors.jrag:48 */ public IntegerLiteral(int i) { this(Integer.toString(i)); } /** * @ast method * @aspect Expressions * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/Expressions.jrag:17 */ public soot.Value eval(Body b) { return IntType.emitConstant(constant().intValue()); } /** * @ast method * */ public IntegerLiteral() { super(); } /** * Initializes the child array to the correct size. * Initializes List and Opt nta children. * @apilevel internal * @ast method * @ast method * */ public void init$Children() { } /** * @ast method * */ public IntegerLiteral(String p0) { setLITERAL(p0); } /** * @ast method * */ public IntegerLiteral(beaver.Symbol p0) { setLITERAL(p0); } /** * @apilevel low-level * @ast method * */ protected int numChildren() { return 0; } /** * @apilevel internal * @ast method * */ public boolean mayHaveRewrite() { return true; } /** * Replaces the lexeme LITERAL. * @param value The new value for the lexeme LITERAL. * @apilevel high-level * @ast method * */ public void setLITERAL(String value) { tokenString_LITERAL = value; } /** * JastAdd-internal setter for lexeme LITERAL using the Beaver parser. * @apilevel internal * @ast method * */ 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(); } /** * Retrieves the value for the lexeme LITERAL. * @return The value for the lexeme LITERAL. * @apilevel high-level * @ast method * */ public String getLITERAL() { return tokenString_LITERAL != null ? tokenString_LITERAL : ""; } /** * Check for and report literal-out-of-bounds error. * If the constant is error-marked, there exists a literal out of bounds error. * @ast method * @aspect Literals * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/Literals.jrag:120 */ public void typeCheck() { if (constant().error) error("The integer literal \""+getLITERAL()+"\" is too large for type int."); } /*syn lazy boolean FloatingPointLiteral.isZero() { String s = getLITERAL(); for(int i = 0; i < s.length(); i++) { char c = s.charAt(i); if(c == 'E' || c == 'e') break; if(Character.isDigit(c) && c != '0') { return false; } } return true; } syn lazy boolean DoubleLiteral.isZero() { String s = getLITERAL(); for(int i = 0; i < s.length(); i++) { char c = s.charAt(i); if(c == 'E' || c == 'e') break; if(Character.isDigit(c) && c != '0') { return false; } } return true; }* @attribute syn * @aspect ConstantExpression * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/ConstantExpression.jrag:152 */ public boolean isPositive() { ASTNode$State state = state(); try { return !getLITERAL().startsWith("-"); } finally { } } /** * @apilevel internal */ protected boolean type_computed = false; /** * @apilevel internal */ protected TypeDecl type_value; /** * @attribute syn * @aspect TypeAnalysis * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeAnalysis.jrag:300 */ @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; } /** * @apilevel internal */ private TypeDecl type_compute() { return typeInt(); } /** * @apilevel internal */ protected boolean constant_computed = false; /** * @apilevel internal */ protected Constant constant_value; /** * Parse this literal and return a fresh Constant. * @return a fresh Constant representing this IntegerLiteral * @attribute syn * @aspect Literals * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/Literals.jrag:139 */ @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; } /** * @apilevel internal */ private Constant constant_compute() { long l = 0; try { l = parseLong(); } catch (NumberFormatException e) { Constant c = Constant.create(0L); c.error = true; return c; } Constant c = Constant.create((int)l); if (l != (0xFFFFFFFFL & ((int) l)) && l != ((long) ((int) l)) ) { c.error = true; //System.err.println("Can not cast to integer: "+l+" ("+((int)l)+")"); } return c; } /** * Utility attribute for literal rewriting. * Any of the NumericLiteral subclasses have already * been rewritten and/or parsed, and should not be * rewritten again. * * @return true if this literal is a "raw", not-yet-parsed NumericLiteral * @attribute syn * @aspect Literals * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/Literals.jrag:334 */ public boolean needsRewrite() { ASTNode$State state = state(); try { return false; } finally { } } /** * @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); } }
8,874
25.257396
112
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/IntegralType.java
/* This file was generated with JastAdd2 (http://jastadd.org) version R20130212 (r1031) */ package soot.JastAddJ; import java.util.HashSet; 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; /** * @production IntegralType : {@link NumericType}; * @ast node * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/java.ast:55 */ public abstract class IntegralType extends NumericType implements Cloneable { /** * @apilevel low-level */ public void flushCache() { super.flushCache(); } /** * @apilevel internal */ public void flushCollectionCache() { super.flushCollectionCache(); } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public IntegralType clone() throws CloneNotSupportedException { IntegralType node = (IntegralType)super.clone(); node.in$Circle(false); node.is$Final(false); return node; } /** * @ast method * */ public IntegralType() { super(); } /** * Initializes the child array to the correct size. * Initializes List and Opt nta children. * @apilevel internal * @ast method * @ast method * */ public void init$Children() { children = new ASTNode[3]; setChild(new Opt(), 1); setChild(new List(), 2); } /** * @ast method * */ public IntegralType(Modifiers p0, String p1, Opt<Access> p2, List<BodyDecl> p3) { setChild(p0, 0); setID(p1); setChild(p2, 1); setChild(p3, 2); } /** * @ast method * */ public IntegralType(Modifiers p0, beaver.Symbol p1, Opt<Access> p2, List<BodyDecl> p3) { setChild(p0, 0); setID(p1); setChild(p2, 1); setChild(p3, 2); } /** * @apilevel low-level * @ast method * */ protected int numChildren() { return 3; } /** * @apilevel internal * @ast method * */ public boolean mayHaveRewrite() { return false; } /** * Replaces the Modifiers child. * @param node The new node to replace the Modifiers child. * @apilevel high-level * @ast method * */ public void setModifiers(Modifiers node) { setChild(node, 0); } /** * Retrieves the Modifiers child. * @return The current node used as the Modifiers child. * @apilevel high-level * @ast method * */ public Modifiers getModifiers() { return (Modifiers)getChild(0); } /** * Retrieves the Modifiers child. * <p><em>This method does not invoke AST transformations.</em></p> * @return The current node used as the Modifiers child. * @apilevel low-level * @ast method * */ public Modifiers getModifiersNoTransform() { return (Modifiers)getChildNoTransform(0); } /** * Replaces the lexeme ID. * @param value The new value for the lexeme ID. * @apilevel high-level * @ast method * */ public void setID(String value) { tokenString_ID = value; } /** * JastAdd-internal setter for lexeme ID using the Beaver parser. * @apilevel internal * @ast method * */ 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(); } /** * Retrieves the value for the lexeme ID. * @return The value for the lexeme ID. * @apilevel high-level * @ast method * */ public String getID() { return tokenString_ID != null ? tokenString_ID : ""; } /** * Replaces the optional node for the SuperClassAccess child. This is the {@code Opt} node containing the child SuperClassAccess, not the actual child! * @param opt The new node to be used as the optional node for the SuperClassAccess child. * @apilevel low-level * @ast method * */ public void setSuperClassAccessOpt(Opt<Access> opt) { setChild(opt, 1); } /** * Check whether the optional SuperClassAccess child exists. * @return {@code true} if the optional SuperClassAccess child exists, {@code false} if it does not. * @apilevel high-level * @ast method * */ public boolean hasSuperClassAccess() { return getSuperClassAccessOpt().getNumChild() != 0; } /** * Retrieves the (optional) SuperClassAccess child. * @return The SuperClassAccess child, if it exists. Returns {@code null} otherwise. * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public Access getSuperClassAccess() { return (Access)getSuperClassAccessOpt().getChild(0); } /** * Replaces the (optional) SuperClassAccess child. * @param node The new node to be used as the SuperClassAccess child. * @apilevel high-level * @ast method * */ public void setSuperClassAccess(Access node) { getSuperClassAccessOpt().setChild(node, 0); } /** * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public Opt<Access> getSuperClassAccessOpt() { return (Opt<Access>)getChild(1); } /** * Retrieves the optional node for child SuperClassAccess. This is the {@code Opt} node containing the child SuperClassAccess, not the actual child! * <p><em>This method does not invoke AST transformations.</em></p> * @return The optional node for child SuperClassAccess. * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public Opt<Access> getSuperClassAccessOptNoTransform() { return (Opt<Access>)getChildNoTransform(1); } /** * Replaces the BodyDecl list. * @param list The new list node to be used as the BodyDecl list. * @apilevel high-level * @ast method * */ public void setBodyDeclList(List<BodyDecl> list) { setChild(list, 2); } /** * Retrieves the number of children in the BodyDecl list. * @return Number of children in the BodyDecl list. * @apilevel high-level * @ast method * */ public int getNumBodyDecl() { return getBodyDeclList().getNumChild(); } /** * Retrieves the number of children in the BodyDecl list. * Calling this method will not trigger rewrites.. * @return Number of children in the BodyDecl list. * @apilevel low-level * @ast method * */ public int getNumBodyDeclNoTransform() { return getBodyDeclListNoTransform().getNumChildNoTransform(); } /** * Retrieves the element at index {@code i} in the BodyDecl list.. * @param i Index of the element to return. * @return The element at position {@code i} in the BodyDecl list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public BodyDecl getBodyDecl(int i) { return (BodyDecl)getBodyDeclList().getChild(i); } /** * Append an element to the BodyDecl list. * @param node The element to append to the BodyDecl list. * @apilevel high-level * @ast method * */ public void addBodyDecl(BodyDecl node) { List<BodyDecl> list = (parent == null || state == null) ? getBodyDeclListNoTransform() : getBodyDeclList(); list.addChild(node); } /** * @apilevel low-level * @ast method * */ public void addBodyDeclNoTransform(BodyDecl node) { List<BodyDecl> list = getBodyDeclListNoTransform(); list.addChild(node); } /** * Replaces the BodyDecl list element at index {@code i} with the new node {@code node}. * @param node The new node to replace the old list element. * @param i The list index of the node to be replaced. * @apilevel high-level * @ast method * */ public void setBodyDecl(BodyDecl node, int i) { List<BodyDecl> list = getBodyDeclList(); list.setChild(node, i); } /** * Retrieves the BodyDecl list. * @return The node representing the BodyDecl list. * @apilevel high-level * @ast method * */ public List<BodyDecl> getBodyDecls() { return getBodyDeclList(); } /** * Retrieves the BodyDecl list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the BodyDecl list. * @apilevel low-level * @ast method * */ public List<BodyDecl> getBodyDeclsNoTransform() { return getBodyDeclListNoTransform(); } /** * Retrieves the BodyDecl list. * @return The node representing the BodyDecl list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<BodyDecl> getBodyDeclList() { List<BodyDecl> list = (List<BodyDecl>)getChild(2); list.getNumChild(); return list; } /** * Retrieves the BodyDecl list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the BodyDecl list. * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<BodyDecl> getBodyDeclListNoTransform() { return (List<BodyDecl>)getChildNoTransform(2); } /** * @attribute syn * @aspect ConstantExpression * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/ConstantExpression.jrag:160 */ public Constant cast(Constant c) { ASTNode$State state = state(); try { return Constant.create(c.intValue()); } finally { } } /** * @attribute syn * @aspect ConstantExpression * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/ConstantExpression.jrag:174 */ public Constant plus(Constant c) { ASTNode$State state = state(); try { return c; } finally { } } /** * @attribute syn * @aspect ConstantExpression * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/ConstantExpression.jrag:183 */ public Constant minus(Constant c) { ASTNode$State state = state(); try { return Constant.create(-c.intValue()); } finally { } } /** * @attribute syn * @aspect ConstantExpression * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/ConstantExpression.jrag:192 */ public Constant bitNot(Constant c) { ASTNode$State state = state(); try { return Constant.create(~c.intValue()); } finally { } } /** * @attribute syn * @aspect ConstantExpression * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/ConstantExpression.jrag:199 */ public Constant mul(Constant c1, Constant c2) { ASTNode$State state = state(); try { return Constant.create(c1.intValue() * c2.intValue()); } finally { } } /** * @attribute syn * @aspect ConstantExpression * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/ConstantExpression.jrag:208 */ public Constant div(Constant c1, Constant c2) { ASTNode$State state = state(); try { return Constant.create(c1.intValue() / c2.intValue()); } finally { } } /** * @attribute syn * @aspect ConstantExpression * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/ConstantExpression.jrag:217 */ public Constant mod(Constant c1, Constant c2) { ASTNode$State state = state(); try { return Constant.create(c1.intValue() % c2.intValue()); } finally { } } /** * @attribute syn * @aspect ConstantExpression * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/ConstantExpression.jrag:226 */ public Constant add(Constant c1, Constant c2) { ASTNode$State state = state(); try { return Constant.create(c1.intValue() + c2.intValue()); } finally { } } /** * @attribute syn * @aspect ConstantExpression * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/ConstantExpression.jrag:236 */ public Constant sub(Constant c1, Constant c2) { ASTNode$State state = state(); try { return Constant.create(c1.intValue() - c2.intValue()); } finally { } } /** * @attribute syn * @aspect ConstantExpression * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/ConstantExpression.jrag:245 */ public Constant lshift(Constant c1, Constant c2) { ASTNode$State state = state(); try { return Constant.create(c1.intValue() << c2.intValue()); } finally { } } /** * @attribute syn * @aspect ConstantExpression * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/ConstantExpression.jrag:252 */ public Constant rshift(Constant c1, Constant c2) { ASTNode$State state = state(); try { return Constant.create(c1.intValue() >> c2.intValue()); } finally { } } /** * @attribute syn * @aspect ConstantExpression * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/ConstantExpression.jrag:259 */ public Constant urshift(Constant c1, Constant c2) { ASTNode$State state = state(); try { return Constant.create(c1.intValue() >>> c2.intValue()); } finally { } } /** * @attribute syn * @aspect ConstantExpression * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/ConstantExpression.jrag:266 */ public Constant andBitwise(Constant c1, Constant c2) { ASTNode$State state = state(); try { return Constant.create(c1.intValue() & c2.intValue()); } finally { } } /** * @attribute syn * @aspect ConstantExpression * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/ConstantExpression.jrag:274 */ public Constant xorBitwise(Constant c1, Constant c2) { ASTNode$State state = state(); try { return Constant.create(c1.intValue() ^ c2.intValue()); } finally { } } /** * @attribute syn * @aspect ConstantExpression * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/ConstantExpression.jrag:282 */ public Constant orBitwise(Constant c1, Constant c2) { ASTNode$State state = state(); try { return Constant.create(c1.intValue() | c2.intValue()); } finally { } } /** * @attribute syn * @aspect ConstantExpression * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/ConstantExpression.jrag:290 */ public Constant questionColon(Constant cond, Constant c1, Constant c2) { ASTNode$State state = state(); try { return Constant.create(cond.booleanValue() ? c1.intValue() : c2.intValue()); } finally { } } /** * @attribute syn * @aspect ConstantExpression * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/ConstantExpression.jrag:394 */ public boolean eqIsTrue(Expr left, Expr right) { ASTNode$State state = state(); try { return left.constant().intValue() == right.constant().intValue(); } finally { } } /** * @attribute syn * @aspect ConstantExpression * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/ConstantExpression.jrag:405 */ public boolean ltIsTrue(Expr left, Expr right) { ASTNode$State state = state(); try { return left.constant().intValue() < right.constant().intValue(); } finally { } } /** * @attribute syn * @aspect ConstantExpression * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/ConstantExpression.jrag:411 */ public boolean leIsTrue(Expr left, Expr right) { ASTNode$State state = state(); try { return left.constant().intValue() <= right.constant().intValue(); } finally { } } /** * @attribute syn * @aspect NameCheck * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/NameCheck.jrag:427 */ public boolean assignableToInt() { ASTNode$State state = state(); try { return true; } finally { } } /** * @attribute syn * @aspect TypeAnalysis * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeAnalysis.jrag:177 */ public boolean isIntegralType() { ASTNode$State state = state(); try { return true; } finally { } } /** * @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); } }
16,814
27.403716
153
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/InterfaceDecl.java
/* This file was generated with JastAdd2 (http://jastadd.org) version R20130212 (r1031) */ package soot.JastAddJ; import java.util.HashSet; 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; /** * @production InterfaceDecl : {@link ReferenceType} ::= <span class="component">{@link Modifiers}</span> <span class="component">&lt;ID:String&gt;</span> <span class="component">SuperInterfaceId:{@link Access}*</span> <span class="component">{@link BodyDecl}*</span>; * @ast node * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/java.ast:67 */ public class InterfaceDecl extends ReferenceType implements Cloneable { /** * @apilevel low-level */ public void flushCache() { super.flushCache(); methodsSignatureMap_computed = false; methodsSignatureMap_value = null; ancestorMethods_String_values = null; memberTypes_String_values = null; memberFieldsMap_computed = false; memberFieldsMap_value = null; memberFields_String_values = null; isStatic_computed = false; castingConversionTo_TypeDecl_values = null; instanceOf_TypeDecl_values = null; isCircular_visited = -1; isCircular_computed = false; isCircular_initialized = false; implementedInterfaces_computed = false; implementedInterfaces_value = null; subtype_TypeDecl_values = null; sootClass_computed = false; sootClass_value = null; } /** * @apilevel internal */ public void flushCollectionCache() { super.flushCollectionCache(); } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public InterfaceDecl clone() throws CloneNotSupportedException { InterfaceDecl node = (InterfaceDecl)super.clone(); node.methodsSignatureMap_computed = false; node.methodsSignatureMap_value = null; node.ancestorMethods_String_values = null; node.memberTypes_String_values = null; node.memberFieldsMap_computed = false; node.memberFieldsMap_value = null; node.memberFields_String_values = null; node.isStatic_computed = false; node.castingConversionTo_TypeDecl_values = null; node.instanceOf_TypeDecl_values = null; node.isCircular_visited = -1; node.isCircular_computed = false; node.isCircular_initialized = false; node.implementedInterfaces_computed = false; node.implementedInterfaces_value = null; node.subtype_TypeDecl_values = null; node.sootClass_computed = false; node.sootClass_value = null; node.in$Circle(false); node.is$Final(false); return node; } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public InterfaceDecl copy() { try { InterfaceDecl node = (InterfaceDecl) clone(); node.parent = null; if(children != null) node.children = (ASTNode[]) children.clone(); return node; } catch (CloneNotSupportedException e) { throw new Error("Error: clone not supported for " + getClass().getName()); } } /** * Create a deep copy of the AST subtree at this node. * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level */ @SuppressWarnings({"unchecked", "cast"}) public InterfaceDecl fullCopy() { InterfaceDecl tree = (InterfaceDecl) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) children[i]; if(child != null) { child = child.fullCopy(); tree.setChild(child, i); } } } return tree; } /** * @ast method * @aspect AccessControl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/AccessControl.jrag:167 */ public void accessControl() { super.accessControl(); if(!isCircular()) { // 9.1.2 HashSet set = new HashSet(); for(int i = 0; i < getNumSuperInterfaceId(); i++) { TypeDecl decl = getSuperInterfaceId(i).type(); if(!decl.isInterfaceDecl() && !decl.isUnknown()) error("interface " + fullName() + " tries to extend non interface type " + decl.fullName()); if(!decl.isCircular() && !decl.accessibleFrom(this)) error("interface " + fullName() + " can not extend non accessible type " + decl.fullName()); if(set.contains(decl)) error("extended interface " + decl.fullName() + " mentionened multiple times in extends clause"); set.add(decl); } } } /** * @ast method * @aspect Modifiers * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/Modifiers.jrag:106 */ public void checkModifiers() { super.checkModifiers(); } /** * @ast method * @aspect PrettyPrint * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/PrettyPrint.jadd:89 */ public void toString(StringBuffer s) { s.append(indent()); getModifiers().toString(s); s.append("interface " + name()); if(getNumSuperInterfaceId() > 0) { s.append(" extends "); getSuperInterfaceId(0).toString(s); for(int i = 1; i < getNumSuperInterfaceId(); i++) { s.append(", "); getSuperInterfaceId(i).toString(s); } } ppBodyDecls(s); } /** * @ast method * @aspect SuperClasses * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeAnalysis.jrag:644 */ public Iterator superinterfacesIterator() { return new Iterator() { public boolean hasNext() { computeNextCurrent(); return current != null; } public Object next() { return current; } public void remove() { throw new UnsupportedOperationException(); } private int index = 0; private TypeDecl current = null; private void computeNextCurrent() { current = null; if(isCircular()) return; while(index < getNumSuperInterfaceId()) { TypeDecl typeDecl = getSuperInterfaceId(index++).type(); if(!typeDecl.isCircular() && typeDecl.isInterfaceDecl()) { current = typeDecl; return; } } } }; } /** * @ast method * @aspect TypeHierarchyCheck * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeHierarchyCheck.jrag:312 */ public void nameCheck() { super.nameCheck(); if(isCircular()) error("circular inheritance dependency in " + typeName()); else { for(int i = 0; i < getNumSuperInterfaceId(); i++) { TypeDecl typeDecl = getSuperInterfaceId(i).type(); if(typeDecl.isCircular()) error("circular inheritance dependency in " + typeName()); } } for(Iterator iter = methodsSignatureMap().values().iterator(); iter.hasNext(); ) { SimpleSet set = (SimpleSet)iter.next(); if(set.size() > 1) { Iterator i2 = set.iterator(); MethodDecl m = (MethodDecl)i2.next(); while(i2.hasNext()) { MethodDecl n = (MethodDecl)i2.next(); if(!n.mayOverrideReturn(m) && !m.mayOverrideReturn(n)) error("multiply inherited methods with the same signature must have the same return type"); } } } } /** * @ast method * @aspect Generics * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:213 */ public TypeDecl makeGeneric(Signatures.ClassSignature s) { if(s.hasFormalTypeParameters()) { ASTNode node = getParent(); int index = node.getIndexOfChild(this); node.setChild( new GenericInterfaceDecl( getModifiersNoTransform(), getID(), s.hasSuperinterfaceSignature() ? s.superinterfaceSignature() : getSuperInterfaceIdListNoTransform(), getBodyDeclListNoTransform(), s.typeParameters() ), index ); return (TypeDecl)node.getChildNoTransform(index); } else { if(s.hasSuperinterfaceSignature()) setSuperInterfaceIdList(s.superinterfaceSignature()); return this; } } /** * @ast method * @aspect LookupParTypeDecl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:1336 */ public InterfaceDecl substitutedInterfaceDecl(Parameterization parTypeDecl) { InterfaceDecl c = new InterfaceDeclSubstituted( (Modifiers)getModifiers().fullCopy(), getID(), getSuperInterfaceIdList().substitute(parTypeDecl), // ES: new List(), this ); return c; } /** * @ast method * @aspect Java2Rewrites * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Backend/Java2Rewrites.jrag:95 */ public FieldDeclaration createStaticClassField(String name) { return methodHolder().createStaticClassField(name); } /** * @ast method * @aspect Java2Rewrites * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Backend/Java2Rewrites.jrag:98 */ public MethodDecl createStaticClassMethod() { return methodHolder().createStaticClassMethod(); } /** * @ast method * @aspect Java2Rewrites * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Backend/Java2Rewrites.jrag:102 */ // create anonymous class to delegate to private TypeDecl methodHolder = null; /** * @ast method * @aspect Java2Rewrites * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Backend/Java2Rewrites.jrag:103 */ public TypeDecl methodHolder() { if(methodHolder != null) return methodHolder; String name = "$" + nextAnonymousIndex(); ClassDecl c = addMemberClass(new ClassDecl( new Modifiers(new List()), name, new Opt(), new List(), new List() )); methodHolder = c; return c; } /** * @ast method * @aspect EmitJimple * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/EmitJimple.jrag:186 */ public void jimplify1phase2() { SootClass sc = getSootClassDecl(); sc.setResolvingLevel(SootClass.DANGLING); sc.setModifiers(sootTypeModifiers()); sc.setApplicationClass(); SourceFileTag st = new soot.tagkit.SourceFileTag(sourceNameWithoutPath()); st.setAbsolutePath(compilationUnit().pathName()); sc.addTag(st); sc.setSuperclass(typeObject().getSootClassDecl()); for(Iterator iter = superinterfacesIterator(); iter.hasNext(); ) { TypeDecl typeDecl = (TypeDecl)iter.next(); if(typeDecl != typeObject() && !sc.implementsInterface(typeDecl.getSootClassDecl().getName())) sc.addInterface(typeDecl.getSootClassDecl()); } if(isNestedType()) sc.setOuterClass(enclosingType().getSootClassDecl()); sc.setResolvingLevel(SootClass.HIERARCHY); super.jimplify1phase2(); sc.setResolvingLevel(SootClass.SIGNATURES); } /** * @ast method * */ public InterfaceDecl() { super(); } /** * Initializes the child array to the correct size. * Initializes List and Opt nta children. * @apilevel internal * @ast method * @ast method * */ public void init$Children() { children = new ASTNode[3]; setChild(new List(), 1); setChild(new List(), 2); } /** * @ast method * */ public InterfaceDecl(Modifiers p0, String p1, List<Access> p2, List<BodyDecl> p3) { setChild(p0, 0); setID(p1); setChild(p2, 1); setChild(p3, 2); } /** * @ast method * */ public InterfaceDecl(Modifiers p0, beaver.Symbol p1, List<Access> p2, List<BodyDecl> p3) { setChild(p0, 0); setID(p1); setChild(p2, 1); setChild(p3, 2); } /** * @apilevel low-level * @ast method * */ protected int numChildren() { return 3; } /** * @apilevel internal * @ast method * */ public boolean mayHaveRewrite() { return false; } /** * Replaces the Modifiers child. * @param node The new node to replace the Modifiers child. * @apilevel high-level * @ast method * */ public void setModifiers(Modifiers node) { setChild(node, 0); } /** * Retrieves the Modifiers child. * @return The current node used as the Modifiers child. * @apilevel high-level * @ast method * */ public Modifiers getModifiers() { return (Modifiers)getChild(0); } /** * Retrieves the Modifiers child. * <p><em>This method does not invoke AST transformations.</em></p> * @return The current node used as the Modifiers child. * @apilevel low-level * @ast method * */ public Modifiers getModifiersNoTransform() { return (Modifiers)getChildNoTransform(0); } /** * Replaces the lexeme ID. * @param value The new value for the lexeme ID. * @apilevel high-level * @ast method * */ public void setID(String value) { tokenString_ID = value; } /** * JastAdd-internal setter for lexeme ID using the Beaver parser. * @apilevel internal * @ast method * */ 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(); } /** * Retrieves the value for the lexeme ID. * @return The value for the lexeme ID. * @apilevel high-level * @ast method * */ public String getID() { return tokenString_ID != null ? tokenString_ID : ""; } /** * Replaces the SuperInterfaceId list. * @param list The new list node to be used as the SuperInterfaceId list. * @apilevel high-level * @ast method * */ public void setSuperInterfaceIdList(List<Access> list) { setChild(list, 1); } /** * Retrieves the number of children in the SuperInterfaceId list. * @return Number of children in the SuperInterfaceId list. * @apilevel high-level * @ast method * */ public int getNumSuperInterfaceId() { return getSuperInterfaceIdList().getNumChild(); } /** * Retrieves the number of children in the SuperInterfaceId list. * Calling this method will not trigger rewrites.. * @return Number of children in the SuperInterfaceId list. * @apilevel low-level * @ast method * */ public int getNumSuperInterfaceIdNoTransform() { return getSuperInterfaceIdListNoTransform().getNumChildNoTransform(); } /** * Retrieves the element at index {@code i} in the SuperInterfaceId list.. * @param i Index of the element to return. * @return The element at position {@code i} in the SuperInterfaceId list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public Access getSuperInterfaceId(int i) { return (Access)getSuperInterfaceIdList().getChild(i); } /** * Append an element to the SuperInterfaceId list. * @param node The element to append to the SuperInterfaceId list. * @apilevel high-level * @ast method * */ public void addSuperInterfaceId(Access node) { List<Access> list = (parent == null || state == null) ? getSuperInterfaceIdListNoTransform() : getSuperInterfaceIdList(); list.addChild(node); } /** * @apilevel low-level * @ast method * */ public void addSuperInterfaceIdNoTransform(Access node) { List<Access> list = getSuperInterfaceIdListNoTransform(); list.addChild(node); } /** * Replaces the SuperInterfaceId list element at index {@code i} with the new node {@code node}. * @param node The new node to replace the old list element. * @param i The list index of the node to be replaced. * @apilevel high-level * @ast method * */ public void setSuperInterfaceId(Access node, int i) { List<Access> list = getSuperInterfaceIdList(); list.setChild(node, i); } /** * Retrieves the SuperInterfaceId list. * @return The node representing the SuperInterfaceId list. * @apilevel high-level * @ast method * */ public List<Access> getSuperInterfaceIds() { return getSuperInterfaceIdList(); } /** * Retrieves the SuperInterfaceId list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the SuperInterfaceId list. * @apilevel low-level * @ast method * */ public List<Access> getSuperInterfaceIdsNoTransform() { return getSuperInterfaceIdListNoTransform(); } /** * Retrieves the SuperInterfaceId list. * @return The node representing the SuperInterfaceId list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<Access> getSuperInterfaceIdList() { List<Access> list = (List<Access>)getChild(1); list.getNumChild(); return list; } /** * Retrieves the SuperInterfaceId list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the SuperInterfaceId list. * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<Access> getSuperInterfaceIdListNoTransform() { return (List<Access>)getChildNoTransform(1); } /** * Replaces the BodyDecl list. * @param list The new list node to be used as the BodyDecl list. * @apilevel high-level * @ast method * */ public void setBodyDeclList(List<BodyDecl> list) { setChild(list, 2); } /** * Retrieves the number of children in the BodyDecl list. * @return Number of children in the BodyDecl list. * @apilevel high-level * @ast method * */ public int getNumBodyDecl() { return getBodyDeclList().getNumChild(); } /** * Retrieves the number of children in the BodyDecl list. * Calling this method will not trigger rewrites.. * @return Number of children in the BodyDecl list. * @apilevel low-level * @ast method * */ public int getNumBodyDeclNoTransform() { return getBodyDeclListNoTransform().getNumChildNoTransform(); } /** * Retrieves the element at index {@code i} in the BodyDecl list.. * @param i Index of the element to return. * @return The element at position {@code i} in the BodyDecl list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public BodyDecl getBodyDecl(int i) { return (BodyDecl)getBodyDeclList().getChild(i); } /** * Append an element to the BodyDecl list. * @param node The element to append to the BodyDecl list. * @apilevel high-level * @ast method * */ public void addBodyDecl(BodyDecl node) { List<BodyDecl> list = (parent == null || state == null) ? getBodyDeclListNoTransform() : getBodyDeclList(); list.addChild(node); } /** * @apilevel low-level * @ast method * */ public void addBodyDeclNoTransform(BodyDecl node) { List<BodyDecl> list = getBodyDeclListNoTransform(); list.addChild(node); } /** * Replaces the BodyDecl list element at index {@code i} with the new node {@code node}. * @param node The new node to replace the old list element. * @param i The list index of the node to be replaced. * @apilevel high-level * @ast method * */ public void setBodyDecl(BodyDecl node, int i) { List<BodyDecl> list = getBodyDeclList(); list.setChild(node, i); } /** * Retrieves the BodyDecl list. * @return The node representing the BodyDecl list. * @apilevel high-level * @ast method * */ public List<BodyDecl> getBodyDecls() { return getBodyDeclList(); } /** * Retrieves the BodyDecl list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the BodyDecl list. * @apilevel low-level * @ast method * */ public List<BodyDecl> getBodyDeclsNoTransform() { return getBodyDeclListNoTransform(); } /** * Retrieves the BodyDecl list. * @return The node representing the BodyDecl list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<BodyDecl> getBodyDeclList() { List<BodyDecl> list = (List<BodyDecl>)getChild(2); list.getNumChild(); return list; } /** * Retrieves the BodyDecl list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the BodyDecl list. * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<BodyDecl> getBodyDeclListNoTransform() { return (List<BodyDecl>)getChildNoTransform(2); } /** * @ast method * @aspect Generics * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:73 */ private boolean refined_Generics_InterfaceDecl_castingConversionTo_TypeDecl(TypeDecl type) { TypeDecl S = this; TypeDecl T = type; if(T.isArrayDecl()) return T.instanceOf(S); else if(T.isReferenceType() && !T.isFinal()) { return true; } else { return T.instanceOf(S); } } /** * @attribute syn * @aspect ConstructScope * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupConstructor.jrag:21 */ public Collection lookupSuperConstructor() { ASTNode$State state = state(); try { return typeObject().constructors(); } finally { } } /** * @apilevel internal */ protected boolean methodsSignatureMap_computed = false; /** * @apilevel internal */ protected HashMap methodsSignatureMap_value; /** * @attribute syn * @aspect MethodSignature15 * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/MethodSignature.jrag:387 */ @SuppressWarnings({"unchecked", "cast"}) public HashMap methodsSignatureMap() { if(methodsSignatureMap_computed) { return methodsSignatureMap_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); methodsSignatureMap_value = methodsSignatureMap_compute(); if(isFinal && num == state().boundariesCrossed) methodsSignatureMap_computed = true; return methodsSignatureMap_value; } /** * @apilevel internal */ private HashMap methodsSignatureMap_compute() { HashMap map = new HashMap(localMethodsSignatureMap()); for(Iterator outerIter = superinterfacesIterator(); outerIter.hasNext(); ) { TypeDecl typeDecl = (TypeDecl)outerIter.next(); for(Iterator iter = typeDecl.methodsIterator(); iter.hasNext(); ) { MethodDecl m = (MethodDecl)iter.next(); if(!m.isPrivate() && m.accessibleFrom(this) && !localMethodsSignatureMap().containsKey(m.signature())) if(!(m instanceof MethodDeclSubstituted) || !localMethodsSignatureMap().containsKey(m.sourceMethodDecl().signature())) putSimpleSetElement(map, m.signature(), m); } } for(Iterator iter = typeObject().methodsIterator(); iter.hasNext(); ) { MethodDecl m = (MethodDecl)iter.next(); if(m.isPublic() && !map.containsKey(m.signature())) putSimpleSetElement(map, m.signature(), m); } return map; } protected java.util.Map ancestorMethods_String_values; /** * @attribute syn * @aspect AncestorMethods * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupMethod.jrag:414 */ @SuppressWarnings({"unchecked", "cast"}) public SimpleSet ancestorMethods(String signature) { Object _parameters = signature; if(ancestorMethods_String_values == null) ancestorMethods_String_values = new java.util.HashMap(4); if(ancestorMethods_String_values.containsKey(_parameters)) { return (SimpleSet)ancestorMethods_String_values.get(_parameters); } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); SimpleSet ancestorMethods_String_value = ancestorMethods_compute(signature); if(isFinal && num == state().boundariesCrossed) ancestorMethods_String_values.put(_parameters, ancestorMethods_String_value); return ancestorMethods_String_value; } /** * @apilevel internal */ private SimpleSet ancestorMethods_compute(String signature) { SimpleSet set = SimpleSet.emptySet; for(Iterator outerIter = superinterfacesIterator(); outerIter.hasNext(); ) { TypeDecl typeDecl = (TypeDecl)outerIter.next(); for(Iterator iter = typeDecl.methodsSignature(signature).iterator(); iter.hasNext(); ) { MethodDecl m = (MethodDecl)iter.next(); set = set.add(m); } } if(!superinterfacesIterator().hasNext()) { for(Iterator iter = typeObject().methodsSignature(signature).iterator(); iter.hasNext(); ) { MethodDecl m = (MethodDecl)iter.next(); if(m.isPublic()) set = set.add(m); } } return set; } protected java.util.Map memberTypes_String_values; /** * @attribute syn * @aspect TypeScopePropagation * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupType.jrag:520 */ @SuppressWarnings({"unchecked", "cast"}) public SimpleSet memberTypes(String name) { Object _parameters = name; if(memberTypes_String_values == null) memberTypes_String_values = new java.util.HashMap(4); if(memberTypes_String_values.containsKey(_parameters)) { return (SimpleSet)memberTypes_String_values.get(_parameters); } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); SimpleSet memberTypes_String_value = memberTypes_compute(name); if(isFinal && num == state().boundariesCrossed) memberTypes_String_values.put(_parameters, memberTypes_String_value); return memberTypes_String_value; } /** * @apilevel internal */ private SimpleSet memberTypes_compute(String name) { SimpleSet set = localTypeDecls(name); if(!set.isEmpty()) return set; for(Iterator outerIter = superinterfacesIterator(); outerIter.hasNext(); ) { TypeDecl typeDecl = (TypeDecl)outerIter.next(); for(Iterator iter = typeDecl.memberTypes(name).iterator(); iter.hasNext(); ) { TypeDecl decl = (TypeDecl)iter.next(); if(!decl.isPrivate()) set = set.add(decl); } } return set; } /** * @apilevel internal */ protected boolean memberFieldsMap_computed = false; /** * @apilevel internal */ protected HashMap memberFieldsMap_value; /** * @attribute syn * @aspect Fields * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupVariable.jrag:302 */ @SuppressWarnings({"unchecked", "cast"}) public HashMap memberFieldsMap() { if(memberFieldsMap_computed) { return memberFieldsMap_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); memberFieldsMap_value = memberFieldsMap_compute(); if(isFinal && num == state().boundariesCrossed) memberFieldsMap_computed = true; return memberFieldsMap_value; } /** * @apilevel internal */ private HashMap memberFieldsMap_compute() { HashMap map = new HashMap(localFieldsMap()); for(Iterator outerIter = superinterfacesIterator(); outerIter.hasNext(); ) { TypeDecl typeDecl = (TypeDecl)outerIter.next(); for(Iterator iter = typeDecl.fieldsIterator(); iter.hasNext(); ) { FieldDeclaration f = (FieldDeclaration)iter.next(); if(f.accessibleFrom(this) && !f.isPrivate() && !localFieldsMap().containsKey(f.name())) { putSimpleSetElement(map, f.name(), f); } } } return map; } protected java.util.Map memberFields_String_values; /** * @attribute syn * @aspect Fields * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupVariable.jrag:356 */ @SuppressWarnings({"unchecked", "cast"}) public SimpleSet memberFields(String name) { Object _parameters = name; if(memberFields_String_values == null) memberFields_String_values = new java.util.HashMap(4); if(memberFields_String_values.containsKey(_parameters)) { return (SimpleSet)memberFields_String_values.get(_parameters); } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); SimpleSet memberFields_String_value = memberFields_compute(name); if(isFinal && num == state().boundariesCrossed) memberFields_String_values.put(_parameters, memberFields_String_value); return memberFields_String_value; } /** * @apilevel internal */ private SimpleSet memberFields_compute(String name) { SimpleSet fields = localFields(name); if(!fields.isEmpty()) return fields; for(Iterator outerIter = superinterfacesIterator(); outerIter.hasNext(); ) { TypeDecl typeDecl = (TypeDecl)outerIter.next(); for(Iterator iter = typeDecl.memberFields(name).iterator(); iter.hasNext(); ) { FieldDeclaration f = (FieldDeclaration)iter.next(); if(f.accessibleFrom(this) && !f.isPrivate()) { fields = fields.add(f); } } } return fields; } /** * @attribute syn * @aspect Modifiers * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/Modifiers.jrag:204 */ public boolean isAbstract() { ASTNode$State state = state(); try { return true; } finally { } } /** * @apilevel internal */ protected boolean isStatic_computed = false; /** * @apilevel internal */ protected boolean isStatic_value; /** * @attribute syn * @aspect Modifiers * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/Modifiers.jrag:208 */ @SuppressWarnings({"unchecked", "cast"}) public boolean isStatic() { if(isStatic_computed) { return isStatic_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); isStatic_value = isStatic_compute(); if(isFinal && num == state().boundariesCrossed) isStatic_computed = true; return isStatic_value; } /** * @apilevel internal */ private boolean isStatic_compute() { return getModifiers().isStatic() || isMemberType(); } protected java.util.Map castingConversionTo_TypeDecl_values; /** * @attribute syn * @aspect AutoBoxing * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/AutoBoxing.jrag:148 */ @SuppressWarnings({"unchecked", "cast"}) public boolean castingConversionTo(TypeDecl type) { Object _parameters = type; if(castingConversionTo_TypeDecl_values == null) castingConversionTo_TypeDecl_values = new java.util.HashMap(4); if(castingConversionTo_TypeDecl_values.containsKey(_parameters)) { return ((Boolean)castingConversionTo_TypeDecl_values.get(_parameters)).booleanValue(); } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); boolean castingConversionTo_TypeDecl_value = castingConversionTo_compute(type); if(isFinal && num == state().boundariesCrossed) castingConversionTo_TypeDecl_values.put(_parameters, Boolean.valueOf(castingConversionTo_TypeDecl_value)); return castingConversionTo_TypeDecl_value; } /** * @apilevel internal */ private boolean castingConversionTo_compute(TypeDecl type) { if(refined_Generics_InterfaceDecl_castingConversionTo_TypeDecl(type)) return true; boolean canUnboxThis = !unboxed().isUnknown(); boolean canUnboxType = !type.unboxed().isUnknown(); if(canUnboxThis && !canUnboxType) return unboxed().wideningConversionTo(type); return false; /* else if(unboxingConversionTo(type)) return true; return false; */ } /** * @attribute syn * @aspect TypeAnalysis * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeAnalysis.jrag:211 */ public boolean isInterfaceDecl() { ASTNode$State state = state(); try { return true; } finally { } } protected java.util.Map instanceOf_TypeDecl_values; /** * @attribute syn * @aspect GenericsSubtype * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericsSubtype.jrag:388 */ @SuppressWarnings({"unchecked", "cast"}) public boolean instanceOf(TypeDecl type) { Object _parameters = type; if(instanceOf_TypeDecl_values == null) instanceOf_TypeDecl_values = new java.util.HashMap(4); if(instanceOf_TypeDecl_values.containsKey(_parameters)) { return ((Boolean)instanceOf_TypeDecl_values.get(_parameters)).booleanValue(); } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); boolean instanceOf_TypeDecl_value = instanceOf_compute(type); if(isFinal && num == state().boundariesCrossed) instanceOf_TypeDecl_values.put(_parameters, Boolean.valueOf(instanceOf_TypeDecl_value)); return instanceOf_TypeDecl_value; } /** * @apilevel internal */ private boolean instanceOf_compute(TypeDecl type) { return subtype(type); } /** * @attribute syn * @aspect TypeWideningAndIdentity * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeAnalysis.jrag:423 */ public boolean isSupertypeOfClassDecl(ClassDecl type) { ASTNode$State state = state(); try { if(super.isSupertypeOfClassDecl(type)) return true; for(Iterator iter = type.interfacesIterator(); iter.hasNext(); ) { TypeDecl typeDecl = (TypeDecl)iter.next(); if(typeDecl.instanceOf(this)) return true; } return type.hasSuperclass() && type.superclass() != null && type.superclass().instanceOf(this); } finally { } } /** * @attribute syn * @aspect TypeWideningAndIdentity * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeAnalysis.jrag:440 */ public boolean isSupertypeOfInterfaceDecl(InterfaceDecl type) { ASTNode$State state = state(); try { if(super.isSupertypeOfInterfaceDecl(type)) return true; for(Iterator iter = type.superinterfacesIterator(); iter.hasNext(); ) { TypeDecl superinterface = (TypeDecl)iter.next(); if(superinterface.instanceOf(this)) return true; } return false; } finally { } } /** * @attribute syn * @aspect TypeWideningAndIdentity * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeAnalysis.jrag:453 */ public boolean isSupertypeOfArrayDecl(ArrayDecl type) { ASTNode$State state = state(); try { if(super.isSupertypeOfArrayDecl(type)) return true; for(Iterator iter = type.interfacesIterator(); iter.hasNext(); ) { TypeDecl typeDecl = (TypeDecl)iter.next(); if(typeDecl.instanceOf(this)) return true; } return false; } finally { } } /** * @apilevel internal */ protected int isCircular_visited = -1; /** * @apilevel internal */ protected boolean isCircular_computed = false; /** * @apilevel internal */ protected boolean isCircular_initialized = false; /** * @apilevel internal */ protected boolean isCircular_value; /** * @attribute syn * @aspect Circularity * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeAnalysis.jrag:696 */ @SuppressWarnings({"unchecked", "cast"}) public boolean isCircular() { if(isCircular_computed) { return isCircular_value; } ASTNode$State state = state(); if (!isCircular_initialized) { isCircular_initialized = true; isCircular_value = true; } if (!state.IN_CIRCLE) { state.IN_CIRCLE = true; int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); do { isCircular_visited = state.CIRCLE_INDEX; state.CHANGE = false; boolean new_isCircular_value = isCircular_compute(); if (new_isCircular_value!=isCircular_value) state.CHANGE = true; isCircular_value = new_isCircular_value; state.CIRCLE_INDEX++; } while (state.CHANGE); if(isFinal && num == state().boundariesCrossed) { isCircular_computed = true; } else { state.RESET_CYCLE = true; isCircular_compute(); state.RESET_CYCLE = false; isCircular_computed = false; isCircular_initialized = false; } state.IN_CIRCLE = false; return isCircular_value; } if(isCircular_visited != state.CIRCLE_INDEX) { isCircular_visited = state.CIRCLE_INDEX; if (state.RESET_CYCLE) { isCircular_computed = false; isCircular_initialized = false; isCircular_visited = -1; return isCircular_value; } boolean new_isCircular_value = isCircular_compute(); if (new_isCircular_value!=isCircular_value) state.CHANGE = true; isCircular_value = new_isCircular_value; return isCircular_value; } return isCircular_value; } /** * @apilevel internal */ private boolean isCircular_compute() { for(int i = 0; i < getNumSuperInterfaceId(); i++) { Access a = getSuperInterfaceId(i).lastAccess(); while(a != null) { if(a.type().isCircular()) return true; a = (a.isQualified() && a.qualifier().isTypeAccess()) ? (Access)a.qualifier() : null; } } return false; } /** * @apilevel internal */ protected boolean implementedInterfaces_computed = false; /** * @apilevel internal */ protected HashSet implementedInterfaces_value; /** * @attribute syn * @aspect GenericsTypeCheck * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:411 */ @SuppressWarnings({"unchecked", "cast"}) public HashSet implementedInterfaces() { if(implementedInterfaces_computed) { return implementedInterfaces_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); implementedInterfaces_value = implementedInterfaces_compute(); if(isFinal && num == state().boundariesCrossed) implementedInterfaces_computed = true; return implementedInterfaces_value; } /** * @apilevel internal */ private HashSet implementedInterfaces_compute() { HashSet set= new HashSet(); set.addAll(typeObject().implementedInterfaces()); for(Iterator iter = superinterfacesIterator(); iter.hasNext(); ) { InterfaceDecl decl = (InterfaceDecl)iter.next(); set.add(decl); set.addAll(decl.implementedInterfaces()); } return set; } protected java.util.Map subtype_TypeDecl_values; /** * @attribute syn * @aspect GenericsSubtype * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericsSubtype.jrag:408 */ @SuppressWarnings({"unchecked", "cast"}) public boolean subtype(TypeDecl type) { Object _parameters = type; if(subtype_TypeDecl_values == null) subtype_TypeDecl_values = new java.util.HashMap(4); ASTNode$State.CircularValue _value; if(subtype_TypeDecl_values.containsKey(_parameters)) { Object _o = subtype_TypeDecl_values.get(_parameters); if(!(_o instanceof ASTNode$State.CircularValue)) { return ((Boolean)_o).booleanValue(); } else _value = (ASTNode$State.CircularValue)_o; } else { _value = new ASTNode$State.CircularValue(); subtype_TypeDecl_values.put(_parameters, _value); _value.value = Boolean.valueOf(true); } ASTNode$State state = state(); if (!state.IN_CIRCLE) { state.IN_CIRCLE = true; int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); boolean new_subtype_TypeDecl_value; do { _value.visited = new Integer(state.CIRCLE_INDEX); state.CHANGE = false; new_subtype_TypeDecl_value = subtype_compute(type); if (new_subtype_TypeDecl_value!=((Boolean)_value.value).booleanValue()) { state.CHANGE = true; _value.value = Boolean.valueOf(new_subtype_TypeDecl_value); } state.CIRCLE_INDEX++; } while (state.CHANGE); if(isFinal && num == state().boundariesCrossed) { subtype_TypeDecl_values.put(_parameters, new_subtype_TypeDecl_value); } else { subtype_TypeDecl_values.remove(_parameters); state.RESET_CYCLE = true; subtype_compute(type); state.RESET_CYCLE = false; } state.IN_CIRCLE = false; return new_subtype_TypeDecl_value; } if(!new Integer(state.CIRCLE_INDEX).equals(_value.visited)) { _value.visited = new Integer(state.CIRCLE_INDEX); boolean new_subtype_TypeDecl_value = subtype_compute(type); if (state.RESET_CYCLE) { subtype_TypeDecl_values.remove(_parameters); } else if (new_subtype_TypeDecl_value!=((Boolean)_value.value).booleanValue()) { state.CHANGE = true; _value.value = new_subtype_TypeDecl_value; } return new_subtype_TypeDecl_value; } return ((Boolean)_value.value).booleanValue(); } /** * @apilevel internal */ private boolean subtype_compute(TypeDecl type) { return type.supertypeInterfaceDecl(this); } /** * @attribute syn * @aspect GenericsSubtype * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericsSubtype.jrag:421 */ public boolean supertypeClassDecl(ClassDecl type) { ASTNode$State state = state(); try { if(super.supertypeClassDecl(type)) return true; for(Iterator iter = type.interfacesIterator(); iter.hasNext(); ) { TypeDecl typeDecl = (TypeDecl)iter.next(); if(typeDecl.subtype(this)) return true; } return type.hasSuperclass() && type.superclass() != null && type.superclass().subtype(this); } finally { } } /** * @attribute syn * @aspect GenericsSubtype * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericsSubtype.jrag:437 */ public boolean supertypeInterfaceDecl(InterfaceDecl type) { ASTNode$State state = state(); try { if(super.supertypeInterfaceDecl(type)) return true; for(Iterator iter = type.superinterfacesIterator(); iter.hasNext(); ) { TypeDecl superinterface = (TypeDecl)iter.next(); if(superinterface.subtype(this)) return true; } return false; } finally { } } /** * @attribute syn * @aspect GenericsSubtype * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericsSubtype.jrag:450 */ public boolean supertypeArrayDecl(ArrayDecl type) { ASTNode$State state = state(); try { if(super.supertypeArrayDecl(type)) return true; for(Iterator iter = type.interfacesIterator(); iter.hasNext(); ) { TypeDecl typeDecl = (TypeDecl)iter.next(); if(typeDecl.subtype(this)) return true; } return false; } finally { } } /** * @apilevel internal */ protected boolean sootClass_computed = false; /** * @apilevel internal */ protected SootClass sootClass_value; /** * @attribute syn * @aspect EmitJimpleRefinements * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/SootJastAddJ/EmitJimpleRefinements.jrag:55 */ @SuppressWarnings({"unchecked", "cast"}) public SootClass sootClass() { if(sootClass_computed) { return sootClass_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); sootClass_value = sootClass_compute(); if(isFinal && num == state().boundariesCrossed) sootClass_computed = true; return sootClass_value; } /** * @apilevel internal */ private SootClass sootClass_compute() { if(options().verbose()) System.out.println("Creating from source " + jvmName()); SootClass sc = SootResolver.v().makeClassRef(jvmName()); sc.setModifiers(sootTypeModifiers()); // turn it into an interface return sc; } /** * @attribute syn * @aspect EmitJimple * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/EmitJimple.jrag:90 */ public int sootTypeModifiers() { ASTNode$State state = state(); try { return super.sootTypeModifiers() | soot.Modifier.INTERFACE; } finally { } } /** * @attribute syn * @aspect AnnotationsCodegen * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/Jimple1.5Backend/AnnotationsCodegen.jrag:322 */ public String typeDescriptor() { ASTNode$State state = state(); try { return "L" + jvmName().replace('.', '/') + ";"; } finally { } } /** * @attribute syn * @aspect GenericsCodegen * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/Jimple1.5Backend/GenericsCodegen.jrag:333 */ public SimpleSet bridgeCandidates(String signature) { ASTNode$State state = state(); try { return ancestorMethods(signature); } finally { } } /** * @attribute inh * @aspect TypeConversion * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeAnalysis.jrag:97 */ @SuppressWarnings({"unchecked", "cast"}) public MethodDecl unknownMethod() { ASTNode$State state = state(); MethodDecl unknownMethod_value = getParent().Define_MethodDecl_unknownMethod(this, null); return unknownMethod_value; } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/SyntacticClassification.jrag:75 * @apilevel internal */ public NameType Define_NameType_nameType(ASTNode caller, ASTNode child) { if(caller == getSuperInterfaceIdListNoTransform()) { int childIndex = caller.getIndexOfChild(child); return NameType.TYPE_NAME; } else { return super.Define_NameType_nameType(caller, child); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeAnalysis.jrag:580 * @apilevel internal */ public TypeDecl Define_TypeDecl_hostType(ASTNode caller, ASTNode child) { if(caller == getSuperInterfaceIdListNoTransform()) { int childIndex = caller.getIndexOfChild(child); return hostType(); } else { return super.Define_TypeDecl_hostType(caller, child); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Annotations.jrag:278 * @apilevel internal */ public boolean Define_boolean_withinSuppressWarnings(ASTNode caller, ASTNode child, String s) { if(caller == getSuperInterfaceIdListNoTransform()) { int childIndex = caller.getIndexOfChild(child); return hasAnnotationSuppressWarnings(s) || withinSuppressWarnings(s); } else { return super.Define_boolean_withinSuppressWarnings(caller, child, s); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Annotations.jrag:378 * @apilevel internal */ public boolean Define_boolean_withinDeprecatedAnnotation(ASTNode caller, ASTNode child) { if(caller == getSuperInterfaceIdListNoTransform()) { int childIndex = caller.getIndexOfChild(child); return isDeprecated() || withinDeprecatedAnnotation(); } else { return super.Define_boolean_withinDeprecatedAnnotation(caller, child); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:270 * @apilevel internal */ public boolean Define_boolean_inExtendsOrImplements(ASTNode caller, ASTNode child) { if(caller == getSuperInterfaceIdListNoTransform()) { int childIndex = caller.getIndexOfChild(child); return true; } else { return getParent().Define_boolean_inExtendsOrImplements(this, caller); } } /** * @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); } }
48,916
31.352513
268
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/InterfaceDeclSubstituted.java
/* This file was generated with JastAdd2 (http://jastadd.org) version R20130212 (r1031) */ package soot.JastAddJ; import java.util.HashSet; 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; /** * @production InterfaceDeclSubstituted : {@link InterfaceDecl} ::= <span class="component">&lt;Original:TypeDecl&gt;</span> <span class="component">{@link BodyDecl}*</span>; * @ast node * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.ast:42 */ public class InterfaceDeclSubstituted extends InterfaceDecl implements Cloneable, MemberSubstitutor { /** * @apilevel low-level */ public void flushCache() { super.flushCache(); getBodyDeclList_computed = false; getBodyDeclList_value = null; sourceTypeDecl_computed = false; sourceTypeDecl_value = null; instanceOf_TypeDecl_values = null; subtype_TypeDecl_values = null; localMethodsSignatureMap_computed = false; localMethodsSignatureMap_value = null; localFields_String_values = null; localTypeDecls_String_values = null; constructors_computed = false; constructors_value = null; } /** * @apilevel internal */ public void flushCollectionCache() { super.flushCollectionCache(); } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public InterfaceDeclSubstituted clone() throws CloneNotSupportedException { InterfaceDeclSubstituted node = (InterfaceDeclSubstituted)super.clone(); node.getBodyDeclList_computed = false; node.getBodyDeclList_value = null; node.sourceTypeDecl_computed = false; node.sourceTypeDecl_value = null; node.instanceOf_TypeDecl_values = null; node.subtype_TypeDecl_values = null; node.localMethodsSignatureMap_computed = false; node.localMethodsSignatureMap_value = null; node.localFields_String_values = null; node.localTypeDecls_String_values = null; node.constructors_computed = false; node.constructors_value = null; node.in$Circle(false); node.is$Final(false); return node; } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public InterfaceDeclSubstituted copy() { try { InterfaceDeclSubstituted node = (InterfaceDeclSubstituted) clone(); node.parent = null; if(children != null) node.children = (ASTNode[]) children.clone(); return node; } catch (CloneNotSupportedException e) { throw new Error("Error: clone not supported for " + getClass().getName()); } } /** * Create a deep copy of the AST subtree at this node. * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level */ @SuppressWarnings({"unchecked", "cast"}) public InterfaceDeclSubstituted fullCopy() { InterfaceDeclSubstituted tree = (InterfaceDeclSubstituted) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { switch (i) { case 4: tree.children[i] = new List(); continue; } ASTNode child = (ASTNode) children[i]; if(child != null) { child = child.fullCopy(); tree.setChild(child, i); } } } return tree; } /** * @ast method * */ public InterfaceDeclSubstituted() { super(); } /** * Initializes the child array to the correct size. * Initializes List and Opt nta children. * @apilevel internal * @ast method * @ast method * */ public void init$Children() { children = new ASTNode[3]; setChild(new List(), 1); setChild(new List(), 2); } /** * @ast method * */ public InterfaceDeclSubstituted(Modifiers p0, String p1, List<Access> p2, TypeDecl p3) { setChild(p0, 0); setID(p1); setChild(p2, 1); setOriginal(p3); } /** * @ast method * */ public InterfaceDeclSubstituted(Modifiers p0, beaver.Symbol p1, List<Access> p2, TypeDecl p3) { setChild(p0, 0); setID(p1); setChild(p2, 1); setOriginal(p3); } /** * @apilevel low-level * @ast method * */ protected int numChildren() { return 2; } /** * @apilevel internal * @ast method * */ public boolean mayHaveRewrite() { return false; } /** * Replaces the Modifiers child. * @param node The new node to replace the Modifiers child. * @apilevel high-level * @ast method * */ public void setModifiers(Modifiers node) { setChild(node, 0); } /** * Retrieves the Modifiers child. * @return The current node used as the Modifiers child. * @apilevel high-level * @ast method * */ public Modifiers getModifiers() { return (Modifiers)getChild(0); } /** * Retrieves the Modifiers child. * <p><em>This method does not invoke AST transformations.</em></p> * @return The current node used as the Modifiers child. * @apilevel low-level * @ast method * */ public Modifiers getModifiersNoTransform() { return (Modifiers)getChildNoTransform(0); } /** * Replaces the lexeme ID. * @param value The new value for the lexeme ID. * @apilevel high-level * @ast method * */ public void setID(String value) { tokenString_ID = value; } /** * JastAdd-internal setter for lexeme ID using the Beaver parser. * @apilevel internal * @ast method * */ 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(); } /** * Retrieves the value for the lexeme ID. * @return The value for the lexeme ID. * @apilevel high-level * @ast method * */ public String getID() { return tokenString_ID != null ? tokenString_ID : ""; } /** * Replaces the SuperInterfaceId list. * @param list The new list node to be used as the SuperInterfaceId list. * @apilevel high-level * @ast method * */ public void setSuperInterfaceIdList(List<Access> list) { setChild(list, 1); } /** * Retrieves the number of children in the SuperInterfaceId list. * @return Number of children in the SuperInterfaceId list. * @apilevel high-level * @ast method * */ public int getNumSuperInterfaceId() { return getSuperInterfaceIdList().getNumChild(); } /** * Retrieves the number of children in the SuperInterfaceId list. * Calling this method will not trigger rewrites.. * @return Number of children in the SuperInterfaceId list. * @apilevel low-level * @ast method * */ public int getNumSuperInterfaceIdNoTransform() { return getSuperInterfaceIdListNoTransform().getNumChildNoTransform(); } /** * Retrieves the element at index {@code i} in the SuperInterfaceId list.. * @param i Index of the element to return. * @return The element at position {@code i} in the SuperInterfaceId list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public Access getSuperInterfaceId(int i) { return (Access)getSuperInterfaceIdList().getChild(i); } /** * Append an element to the SuperInterfaceId list. * @param node The element to append to the SuperInterfaceId list. * @apilevel high-level * @ast method * */ public void addSuperInterfaceId(Access node) { List<Access> list = (parent == null || state == null) ? getSuperInterfaceIdListNoTransform() : getSuperInterfaceIdList(); list.addChild(node); } /** * @apilevel low-level * @ast method * */ public void addSuperInterfaceIdNoTransform(Access node) { List<Access> list = getSuperInterfaceIdListNoTransform(); list.addChild(node); } /** * Replaces the SuperInterfaceId list element at index {@code i} with the new node {@code node}. * @param node The new node to replace the old list element. * @param i The list index of the node to be replaced. * @apilevel high-level * @ast method * */ public void setSuperInterfaceId(Access node, int i) { List<Access> list = getSuperInterfaceIdList(); list.setChild(node, i); } /** * Retrieves the SuperInterfaceId list. * @return The node representing the SuperInterfaceId list. * @apilevel high-level * @ast method * */ public List<Access> getSuperInterfaceIds() { return getSuperInterfaceIdList(); } /** * Retrieves the SuperInterfaceId list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the SuperInterfaceId list. * @apilevel low-level * @ast method * */ public List<Access> getSuperInterfaceIdsNoTransform() { return getSuperInterfaceIdListNoTransform(); } /** * Retrieves the SuperInterfaceId list. * @return The node representing the SuperInterfaceId list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<Access> getSuperInterfaceIdList() { List<Access> list = (List<Access>)getChild(1); list.getNumChild(); return list; } /** * Retrieves the SuperInterfaceId list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the SuperInterfaceId list. * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<Access> getSuperInterfaceIdListNoTransform() { return (List<Access>)getChildNoTransform(1); } /** * Replaces the lexeme Original. * @param value The new value for the lexeme Original. * @apilevel high-level * @ast method * */ public void setOriginal(TypeDecl value) { tokenTypeDecl_Original = value; } /** * @apilevel internal * @ast method * */ /** * @apilevel internal */ protected TypeDecl tokenTypeDecl_Original; /** * Retrieves the value for the lexeme Original. * @return The value for the lexeme Original. * @apilevel high-level * @ast method * */ public TypeDecl getOriginal() { return tokenTypeDecl_Original; } /** * Replaces the BodyDecl list. * @param list The new list node to be used as the BodyDecl list. * @apilevel high-level * @ast method * */ public void setBodyDeclList(List<BodyDecl> list) { setChild(list, 2); } /** * Retrieves the number of children in the BodyDecl list. * @return Number of children in the BodyDecl list. * @apilevel high-level * @ast method * */ public int getNumBodyDecl() { return getBodyDeclList().getNumChild(); } /** * Retrieves the number of children in the BodyDecl list. * Calling this method will not trigger rewrites.. * @return Number of children in the BodyDecl list. * @apilevel low-level * @ast method * */ public int getNumBodyDeclNoTransform() { return getBodyDeclListNoTransform().getNumChildNoTransform(); } /** * Retrieves the element at index {@code i} in the BodyDecl list.. * @param i Index of the element to return. * @return The element at position {@code i} in the BodyDecl list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public BodyDecl getBodyDecl(int i) { return (BodyDecl)getBodyDeclList().getChild(i); } /** * Append an element to the BodyDecl list. * @param node The element to append to the BodyDecl list. * @apilevel high-level * @ast method * */ public void addBodyDecl(BodyDecl node) { List<BodyDecl> list = (parent == null || state == null) ? getBodyDeclListNoTransform() : getBodyDeclList(); list.addChild(node); } /** * @apilevel low-level * @ast method * */ public void addBodyDeclNoTransform(BodyDecl node) { List<BodyDecl> list = getBodyDeclListNoTransform(); list.addChild(node); } /** * Replaces the BodyDecl list element at index {@code i} with the new node {@code node}. * @param node The new node to replace the old list element. * @param i The list index of the node to be replaced. * @apilevel high-level * @ast method * */ public void setBodyDecl(BodyDecl node, int i) { List<BodyDecl> list = getBodyDeclList(); list.setChild(node, i); } /** * Retrieves the BodyDecl list. * @return The node representing the BodyDecl list. * @apilevel high-level * @ast method * */ public List<BodyDecl> getBodyDecls() { return getBodyDeclList(); } /** * Retrieves the BodyDecl list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the BodyDecl list. * @apilevel low-level * @ast method * */ public List<BodyDecl> getBodyDeclsNoTransform() { return getBodyDeclListNoTransform(); } /** * Retrieves the BodyDecl list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the BodyDecl list. * @apilevel low-level * @ast method * */ public List<BodyDecl> getBodyDeclListNoTransform() { return (List<BodyDecl>)getChildNoTransform(2); } /** * Retrieves the child position of the BodyDecl list. * @return The the child position of the BodyDecl list. * @apilevel low-level * @ast method * */ protected int getBodyDeclListChildPosition() { return 2; } /** * @attribute syn * @aspect NestedTypes * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeAnalysis.jrag:569 */ public TypeDecl hostType() { ASTNode$State state = state(); try { return getOriginal(); } finally { } } /** * @apilevel internal */ protected boolean getBodyDeclList_computed = false; /** * @apilevel internal */ protected List getBodyDeclList_value; /** * @attribute syn nta * @aspect LookupParTypeDecl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:1051 */ @SuppressWarnings({"unchecked", "cast"}) public List getBodyDeclList() { if(getBodyDeclList_computed) { return (List) getChild(getBodyDeclListChildPosition()); } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); getBodyDeclList_value = getBodyDeclList_compute(); setBodyDeclList(getBodyDeclList_value); if(isFinal && num == state().boundariesCrossed) getBodyDeclList_computed = true; return (List) getChild(getBodyDeclListChildPosition()); } /** * @apilevel internal */ private List getBodyDeclList_compute() { return new BodyDeclList(); } /** * @attribute syn * @aspect LookupParTypeDecl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:1306 */ public TypeDecl original() { ASTNode$State state = state(); try { return getOriginal().original(); } finally { } } /** * @apilevel internal */ protected boolean sourceTypeDecl_computed = false; /** * @apilevel internal */ protected TypeDecl sourceTypeDecl_value; /** * @attribute syn * @aspect SourceDeclarations * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:1507 */ @SuppressWarnings({"unchecked", "cast"}) public TypeDecl sourceTypeDecl() { if(sourceTypeDecl_computed) { return sourceTypeDecl_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); sourceTypeDecl_value = sourceTypeDecl_compute(); if(isFinal && num == state().boundariesCrossed) sourceTypeDecl_computed = true; return sourceTypeDecl_value; } /** * @apilevel internal */ private TypeDecl sourceTypeDecl_compute() { return original().sourceTypeDecl(); } protected java.util.Map instanceOf_TypeDecl_values; /** * @attribute syn * @aspect GenericsSubtype * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericsSubtype.jrag:487 */ @SuppressWarnings({"unchecked", "cast"}) public boolean instanceOf(TypeDecl type) { Object _parameters = type; if(instanceOf_TypeDecl_values == null) instanceOf_TypeDecl_values = new java.util.HashMap(4); if(instanceOf_TypeDecl_values.containsKey(_parameters)) { return ((Boolean)instanceOf_TypeDecl_values.get(_parameters)).booleanValue(); } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); boolean instanceOf_TypeDecl_value = instanceOf_compute(type); if(isFinal && num == state().boundariesCrossed) instanceOf_TypeDecl_values.put(_parameters, Boolean.valueOf(instanceOf_TypeDecl_value)); return instanceOf_TypeDecl_value; } /** * @apilevel internal */ private boolean instanceOf_compute(TypeDecl type) { return subtype(type); } protected java.util.Map subtype_TypeDecl_values; /** * @attribute syn * @aspect GenericsSubtype * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericsSubtype.jrag:501 */ @SuppressWarnings({"unchecked", "cast"}) public boolean subtype(TypeDecl type) { Object _parameters = type; if(subtype_TypeDecl_values == null) subtype_TypeDecl_values = new java.util.HashMap(4); ASTNode$State.CircularValue _value; if(subtype_TypeDecl_values.containsKey(_parameters)) { Object _o = subtype_TypeDecl_values.get(_parameters); if(!(_o instanceof ASTNode$State.CircularValue)) { return ((Boolean)_o).booleanValue(); } else _value = (ASTNode$State.CircularValue)_o; } else { _value = new ASTNode$State.CircularValue(); subtype_TypeDecl_values.put(_parameters, _value); _value.value = Boolean.valueOf(true); } ASTNode$State state = state(); if (!state.IN_CIRCLE) { state.IN_CIRCLE = true; int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); boolean new_subtype_TypeDecl_value; do { _value.visited = new Integer(state.CIRCLE_INDEX); state.CHANGE = false; new_subtype_TypeDecl_value = subtype_compute(type); if (new_subtype_TypeDecl_value!=((Boolean)_value.value).booleanValue()) { state.CHANGE = true; _value.value = Boolean.valueOf(new_subtype_TypeDecl_value); } state.CIRCLE_INDEX++; } while (state.CHANGE); if(isFinal && num == state().boundariesCrossed) { subtype_TypeDecl_values.put(_parameters, new_subtype_TypeDecl_value); } else { subtype_TypeDecl_values.remove(_parameters); state.RESET_CYCLE = true; subtype_compute(type); state.RESET_CYCLE = false; } state.IN_CIRCLE = false; return new_subtype_TypeDecl_value; } if(!new Integer(state.CIRCLE_INDEX).equals(_value.visited)) { _value.visited = new Integer(state.CIRCLE_INDEX); boolean new_subtype_TypeDecl_value = subtype_compute(type); if (state.RESET_CYCLE) { subtype_TypeDecl_values.remove(_parameters); } else if (new_subtype_TypeDecl_value!=((Boolean)_value.value).booleanValue()) { state.CHANGE = true; _value.value = new_subtype_TypeDecl_value; } return new_subtype_TypeDecl_value; } return ((Boolean)_value.value).booleanValue(); } /** * @apilevel internal */ private boolean subtype_compute(TypeDecl type) { return type.supertypeInterfaceDeclSubstituted(this); } /** * @attribute syn * @aspect GenericsSubtype * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericsSubtype.jrag:503 */ public boolean supertypeInterfaceDeclSubstituted(InterfaceDeclSubstituted type) { ASTNode$State state = state(); try { return original() == type.original() && type.enclosingType().subtype(enclosingType()) || super.supertypeInterfaceDeclSubstituted(type); } finally { } } /** * @attribute syn * @aspect GenericsSubtype * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericsSubtype.jrag:437 */ public boolean supertypeInterfaceDecl(InterfaceDecl type) { ASTNode$State state = state(); try { return super.supertypeInterfaceDecl(type) || original().supertypeInterfaceDecl(type); } finally { } } /** * @apilevel internal */ protected boolean localMethodsSignatureMap_computed = false; /** * @apilevel internal */ protected HashMap localMethodsSignatureMap_value; /** * @attribute syn * @aspect LookupParTypeDecl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:1084 */ @SuppressWarnings({"unchecked", "cast"}) public HashMap localMethodsSignatureMap() { if(localMethodsSignatureMap_computed) { return localMethodsSignatureMap_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); localMethodsSignatureMap_value = localMethodsSignatureMap_compute(); if(true) localMethodsSignatureMap_computed = true; return localMethodsSignatureMap_value; } /** * @apilevel internal */ private HashMap localMethodsSignatureMap_compute() { HashMap map = new HashMap(); for(Iterator iter = original().localMethodsIterator(); iter.hasNext(); ) { MethodDecl decl = (MethodDecl)iter.next(); /* ES removing this: if(!decl.isStatic() && (decl.usesTypeVariable() || isRawType())) { BodyDecl b = decl.substitutedBodyDecl(this); addBodyDecl(b); // Here we should access b through an ordinary // child accessor instead of setting is$Final directly, // however doing so appears to cause unexpected behaviour! b.is$Final = true; decl = (MethodDecl) b; } map.put(decl.signature(), decl); * and replacing with: */ if(!decl.isStatic() && (decl.usesTypeVariable() || isRawType())) { BodyDecl copyDecl = ((BodyDeclList)getBodyDeclList()).localMethodSignatureCopy(decl, this); decl = (MethodDecl) copyDecl; } map.put(decl.signature(), decl); } return map; } protected java.util.Map localFields_String_values; /** * @attribute syn * @aspect LookupParTypeDecl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:1119 */ @SuppressWarnings({"unchecked", "cast"}) public SimpleSet localFields(String name) { Object _parameters = name; if(localFields_String_values == null) localFields_String_values = new java.util.HashMap(4); if(localFields_String_values.containsKey(_parameters)) { return (SimpleSet)localFields_String_values.get(_parameters); } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); SimpleSet localFields_String_value = localFields_compute(name); if(true) localFields_String_values.put(_parameters, localFields_String_value); return localFields_String_value; } /** * @apilevel internal */ private SimpleSet localFields_compute(String name) { SimpleSet set = SimpleSet.emptySet; for(Iterator iter = original().localFields(name).iterator(); iter.hasNext(); ) { FieldDeclaration f = (FieldDeclaration)iter.next(); /* ES removing this: if(!f.isStatic() && (f.usesTypeVariable() || isRawType())) { BodyDecl b = f.substitutedBodyDecl(this); addBodyDecl(b); // Here we should access b through an ordinary // child accessor instead of setting is$Final directly, // however doing so appears to cause unexpected behaviour! b.is$Final = true; f = (FieldDeclaration) b; } set = set.add(f); * and replacing with: */ if(!f.isStatic() && (f.usesTypeVariable() || isRawType())) { BodyDecl fCopy = ((BodyDeclList)getBodyDeclList()).localFieldCopy(f, this); f = (FieldDeclaration) fCopy; } set = set.add(f); } return set; } protected java.util.Map localTypeDecls_String_values; /** * @attribute syn * @aspect LookupParTypeDecl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:1154 */ @SuppressWarnings({"unchecked", "cast"}) public SimpleSet localTypeDecls(String name) { Object _parameters = name; if(localTypeDecls_String_values == null) localTypeDecls_String_values = new java.util.HashMap(4); ASTNode$State.CircularValue _value; if(localTypeDecls_String_values.containsKey(_parameters)) { Object _o = localTypeDecls_String_values.get(_parameters); if(!(_o instanceof ASTNode$State.CircularValue)) { return (SimpleSet)_o; } else _value = (ASTNode$State.CircularValue)_o; } else { _value = new ASTNode$State.CircularValue(); localTypeDecls_String_values.put(_parameters, _value); _value.value = SimpleSet.emptySet; } ASTNode$State state = state(); if (!state.IN_CIRCLE) { state.IN_CIRCLE = true; int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); SimpleSet new_localTypeDecls_String_value; do { _value.visited = new Integer(state.CIRCLE_INDEX); state.CHANGE = false; new_localTypeDecls_String_value = localTypeDecls_compute(name); if ((new_localTypeDecls_String_value==null && (SimpleSet)_value.value!=null) || (new_localTypeDecls_String_value!=null && !new_localTypeDecls_String_value.equals((SimpleSet)_value.value))) { state.CHANGE = true; _value.value = new_localTypeDecls_String_value; } state.CIRCLE_INDEX++; } while (state.CHANGE); if(true) { localTypeDecls_String_values.put(_parameters, new_localTypeDecls_String_value); } else { localTypeDecls_String_values.remove(_parameters); state.RESET_CYCLE = true; localTypeDecls_compute(name); state.RESET_CYCLE = false; } state.IN_CIRCLE = false; return new_localTypeDecls_String_value; } if(!new Integer(state.CIRCLE_INDEX).equals(_value.visited)) { _value.visited = new Integer(state.CIRCLE_INDEX); SimpleSet new_localTypeDecls_String_value = localTypeDecls_compute(name); if (state.RESET_CYCLE) { localTypeDecls_String_values.remove(_parameters); } else if ((new_localTypeDecls_String_value==null && (SimpleSet)_value.value!=null) || (new_localTypeDecls_String_value!=null && !new_localTypeDecls_String_value.equals((SimpleSet)_value.value))) { state.CHANGE = true; _value.value = new_localTypeDecls_String_value; } return new_localTypeDecls_String_value; } return (SimpleSet)_value.value; } /** * @apilevel internal */ private SimpleSet localTypeDecls_compute(String name) { SimpleSet set = SimpleSet.emptySet; for(Iterator iter = original().localTypeDecls(name).iterator(); iter.hasNext(); ) { TypeDecl t = (TypeDecl)iter.next(); /* ES: removing this: if(t.isStatic()) set = set.add(t); else { BodyDecl b; TypeDecl typeDecl; if(t instanceof ClassDecl) { ClassDecl classDecl = (ClassDecl)t; typeDecl = classDecl.substitutedClassDecl(this); b = new MemberClassDecl((ClassDecl)typeDecl); addBodyDecl(b); // Here we should access b through an ordinary // child accessor instead of setting is$Final directly, // however doing so appears to cause unexpected behaviour! b.is$Final = true; set = set.add(typeDecl); } else if(t instanceof InterfaceDecl) { InterfaceDecl interfaceDecl = (InterfaceDecl)t; typeDecl = interfaceDecl.substitutedInterfaceDecl(this); b = new MemberInterfaceDecl((InterfaceDecl)typeDecl); addBodyDecl(b); // Here we should access b through an ordinary // child accessor instead of setting is$Final directly, // however doing so appears to cause unexpected behaviour! b.is$Final = true; set = set.add(typeDecl); } } * and replacing with: */ if(t.isStatic()) { set = set.add(t); } else if (t instanceof ClassDecl) { MemberClassDecl copy = ((BodyDeclList)getBodyDeclList()).localClassDeclCopy((ClassDecl)t, this); set = set.add(copy.getClassDecl()); } else if (t instanceof InterfaceDecl) { MemberInterfaceDecl copy = ((BodyDeclList)getBodyDeclList()).localInterfaceDeclCopy((InterfaceDecl)t, this); set = set.add(copy.getInterfaceDecl()); } } return set; } /** * @apilevel internal */ protected boolean constructors_computed = false; /** * @apilevel internal */ protected Collection constructors_value; /** * @attribute syn * @aspect LookupParTypeDecl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:1213 */ @SuppressWarnings({"unchecked", "cast"}) public Collection constructors() { if(constructors_computed) { return constructors_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); constructors_value = constructors_compute(); if(isFinal && num == state().boundariesCrossed) constructors_computed = true; return constructors_value; } /** * @apilevel internal */ private Collection constructors_compute() { Collection set = new ArrayList(); for(Iterator iter = original().constructors().iterator(); iter.hasNext(); ) { ConstructorDecl c = (ConstructorDecl)iter.next(); /* ES: removing this: BodyDecl b = c.substitutedBodyDecl(this); addBodyDecl(b); // Here we should access b through an ordinary // child accessor instead of setting is$Final directly, // however doing so appears to cause unexpected behaviour! b.is$Final = true; * and replacing with: */ BodyDecl b = ((BodyDeclList)getBodyDeclList()).constructorCopy(c, this); set.add(b); } return set; } /** * @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); } }
31,092
30.824974
201
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/JastAddJavaParser.java
// Generated from soot/JastAddJ/JastAddJavaParser.all package soot.JastAddJ; import java.util.ArrayList; import beaver.*; /** * This class is a LALR parser generated by * <a href="http://beaver.sourceforge.net">Beaver</a> v0.9.6.1 * from the grammar specification "JastAddJavaParser.beaver". */ public class JastAddJavaParser extends Parser { static public class Terminals { static public final short EOF = 0; static public final short IDENTIFIER = 1; static public final short SEMICOLON = 2; static public final short BOOLEAN = 3; static public final short BYTE = 4; static public final short SHORT = 5; static public final short INT = 6; static public final short LONG = 7; static public final short CHAR = 8; static public final short FLOAT = 9; static public final short DOUBLE = 10; static public final short RBRACE = 11; static public final short RPAREN = 12; static public final short VOID = 13; static public final short PLUSPLUS = 14; static public final short MINUSMINUS = 15; static public final short LPAREN = 16; static public final short LT = 17; static public final short LBRACE = 18; static public final short COMMA = 19; static public final short SUPER = 20; static public final short THIS = 21; static public final short PLUS = 22; static public final short MINUS = 23; static public final short SYNCHRONIZED = 24; static public final short AT = 25; static public final short NEW = 26; static public final short STATIC = 27; static public final short PUBLIC = 28; static public final short PROTECTED = 29; static public final short PRIVATE = 30; static public final short ABSTRACT = 31; static public final short FINAL = 32; static public final short NATIVE = 33; static public final short TRANSIENT = 34; static public final short VOLATILE = 35; static public final short STRICTFP = 36; static public final short NUMERIC_LITERAL = 37; static public final short BOOLEAN_LITERAL = 38; static public final short CHARACTER_LITERAL = 39; static public final short STRING_LITERAL = 40; static public final short NULL_LITERAL = 41; static public final short CLASS = 42; static public final short QUESTION = 43; static public final short OROR = 44; static public final short ANDAND = 45; static public final short OR = 46; static public final short AND = 47; static public final short XOR = 48; static public final short GT = 49; static public final short EQEQ = 50; static public final short NOTEQ = 51; static public final short LTEQ = 52; static public final short GTEQ = 53; static public final short INSTANCEOF = 54; static public final short RSHIFT = 55; static public final short URSHIFT = 56; static public final short COLON = 57; static public final short RBRACK = 58; static public final short LBRACK = 59; static public final short INTERFACE = 60; static public final short ENUM = 61; static public final short DOT = 62; static public final short LSHIFT = 63; static public final short COMP = 64; static public final short NOT = 65; static public final short MULT = 66; static public final short DIV = 67; static public final short MOD = 68; static public final short WHILE = 69; static public final short DO = 70; static public final short FOR = 71; static public final short IF = 72; static public final short SWITCH = 73; static public final short BREAK = 74; static public final short CONTINUE = 75; static public final short ASSERT = 76; static public final short RETURN = 77; static public final short THROW = 78; static public final short TRY = 79; static public final short EQ = 80; static public final short MULTEQ = 81; static public final short DIVEQ = 82; static public final short MODEQ = 83; static public final short PLUSEQ = 84; static public final short MINUSEQ = 85; static public final short LSHIFTEQ = 86; static public final short RSHIFTEQ = 87; static public final short URSHIFTEQ = 88; static public final short ANDEQ = 89; static public final short XOREQ = 90; static public final short OREQ = 91; static public final short DEFAULT = 92; static public final short CASE = 93; static public final short ELLIPSIS = 94; static public final short IMPLEMENTS = 95; static public final short ELSE = 96; static public final short EXTENDS = 97; static public final short PACKAGE = 98; static public final short THROWS = 99; static public final short IMPORT = 100; static public final short CATCH = 101; static public final short FINALLY = 102; static public final String[] NAMES = { "EOF", "IDENTIFIER", "SEMICOLON", "BOOLEAN", "BYTE", "SHORT", "INT", "LONG", "CHAR", "FLOAT", "DOUBLE", "RBRACE", "RPAREN", "VOID", "PLUSPLUS", "MINUSMINUS", "LPAREN", "LT", "LBRACE", "COMMA", "SUPER", "THIS", "PLUS", "MINUS", "SYNCHRONIZED", "AT", "NEW", "STATIC", "PUBLIC", "PROTECTED", "PRIVATE", "ABSTRACT", "FINAL", "NATIVE", "TRANSIENT", "VOLATILE", "STRICTFP", "NUMERIC_LITERAL", "BOOLEAN_LITERAL", "CHARACTER_LITERAL", "STRING_LITERAL", "NULL_LITERAL", "CLASS", "QUESTION", "OROR", "ANDAND", "OR", "AND", "XOR", "GT", "EQEQ", "NOTEQ", "LTEQ", "GTEQ", "INSTANCEOF", "RSHIFT", "URSHIFT", "COLON", "RBRACK", "LBRACK", "INTERFACE", "ENUM", "DOT", "LSHIFT", "COMP", "NOT", "MULT", "DIV", "MOD", "WHILE", "DO", "FOR", "IF", "SWITCH", "BREAK", "CONTINUE", "ASSERT", "RETURN", "THROW", "TRY", "EQ", "MULTEQ", "DIVEQ", "MODEQ", "PLUSEQ", "MINUSEQ", "LSHIFTEQ", "RSHIFTEQ", "URSHIFTEQ", "ANDEQ", "XOREQ", "OREQ", "DEFAULT", "CASE", "ELLIPSIS", "IMPLEMENTS", "ELSE", "EXTENDS", "PACKAGE", "THROWS", "IMPORT", "CATCH", "FINALLY" }; } static final ParsingTables PARSING_TABLES = new ParsingTables( "U9piNGUyrhJwJWVp3CvquC812hWG7CXoBzmRhnTG4VV0TTqeRd6B2eXxRrHaY0jnY#BUU#7" + "0lQxZQ$zFLfksIR$sS0uSxxzzVssJD#$xv4cQf6c$jXyX3rRvKnUnp20RDjdtoqmo3IB39P" + "q5sPfiGRRnrYFNP4HauZvMkb7u3oPNaBF9M78UEPzSG2ua5v6BVT$e#Hq4U#jzwrtilyeYv" + "5zWBiBkmpeBzmZxGliY#s9IdmrHo7G8ps4mgOgNmOn57Y1JsNuwUH3xRx886KHk3i9rMekj" + "oTva6tA7DJ0R8fVINwN$2l$1a7WPRZ7ocStzo0laHUo$pYBMATOfGNYGpi9zn3hPEjCQROt" + "EXiY5DFgU20qcgyJBO9rWzAidFUdUwqngg6zfNjotDAyqprg3RNiZjHRxBQsrM7m3CjBgX$" + "nsJkItYRMfjPcrkRK5wKyjqyNto026HooRQyWUG1saOw8JihLpBTd6$eQSHSuXvpgNMbsiZ" + "vrLdTMSrPqrh9MihjRArdhM#auFfwT$0tcMtEUETBluyvtkv5xdGcXsj$OdzxjBkstj2yWG" + "nDUsp#CzmPzlJoVhs5FjI#mPP2txGtkAHqXl#sxx7dkoVQzzdts$$Q0zqtx8VjX#n7xKVio" + "UPJzkpxQVi1zms$lphQr87sTjqekiNhgFp7RkGYsD87sjOwtBoMhEMTavb#uB1Po$j7OWRp" + "BE3vD7oAEKCtdBEKrojaTppkHnoRbqMpREv34oYppAELk3IlVQ9pjtMUrAjr4Xdv37dGzoS" + "But5CxPFv1ntjg#50YqdWzqtf6SIRtWF33WV6isplOfv4NxNwAUNolTJvvtxdAwbcwb0ixr" + "xi0SdEyFnUbkjxSxudX5E9F1xle1vzSuPwURvEn$bx6UqGBHjXbdTwNIFVvtpbt#Z#H#v7Q" + "CjRWtmBsLR6tT4dAssgHmleSB#Q9qZzFT6q1k9LinpeEz0Tu0LiyFkZTApbvdKS#tSSvaLV" + "IoR9nf7nVjsLwF74fEn4Xx1aRQqpX7iaPsplxrzW2oEpdQVz2w2ctZL72ydd6czR8zutozU" + "qPGp$TppgKpP3tRksVaFC9RdlnRj0rWIqJtCdkwEmNzv6lKUJkKupgKuoX#bBENWhGd7Kc5" + "DOPiuYo6KlGWRPqPh1HZd0sTFhGKzYRMgA3crnMjvRcWXL#HhHJMscHdRqbU2cTEikPHYko" + "Sz$U$9q#HeSxwpZhW$3HQz4ZAsUfkRmUkjEQ$zx#Nd54ANlCtIyvkXuoSpxP7aoSvvzBDfP" + "l9Hr7EpXdPEJjB#fUWjGm5yoV0UKzmPhtIMitfxzOmpfSuCuDwNaUqyC5vwzbjZnOkMejpG" + "xAUdVTorFC#P1dAMTJpjU2ujcpXrc9i95dMdPHeuJVbhkTnRYCP9#hvfj9DyNfs##VebMjJ" + "ZcIess1T1yuF1VLykRqd6KavMzt9ll7sNBf5SdQkpDWhHwAUdn6SRodTOlt1ETld2yutv#2" + "ybzk3SgHd0OpOj5xhMNmQcOnp2etFSRi6xNcUQ1lx1VMyQaREV8peGzR4I9ATtIsKXTU1R8" + "mneZiPP0yaTx5MCCXf97UnbdiBEIWObNOH8yIjaXqvhYNPaK5WTfTaPxKdavrvZ1tTZs37U" + "pLolMI7qO6pMpmOXOUtQDsjOotXkTQHWjtMrd7kBepTIEmtOEn6aOtYxDmdWxgRqPBit2va" + "fh#EluvWTpIkdJgpldAqipHlT#vIpXT1$nxCsLa393lhFot9ZlO6RntdlzQrhDsTRa$p3#B" + "jZfmfsjr1xgv1hnWeZkooGTtjd774tDJ#qXcGcvrixvkJTS5kQ$SXb93Dijp7#IpBtZiyRx" + "fT1BjvGP$DMdV3l1MytEoy8$oRIsTu0opCdvpkfR7keTuHR4Gvn1fL6alPKOlW#i0JxMwNe" + "5TSaeqThhRgCHBcxRDp$Ole#EdCiBgZtHtiReNp5DYvhxflkc#n8tkHVr7GxcuKurrzqEuc" + "jkY8CjA$iNI1TGsvXxQxqbXlFwkArTqVzb#yxiXWFvYBajlZxBpzChAxqxfHrfr$W4x8Lch" + "CtPtjRtItr5idl4VO9TltRxBFTdvtxx5Fjq#rnzYdsMVOPzfdsUVOvzfZcTNT$arWiLxfTg" + "kxErcFv5ImCzD7RbrGwkVHwYjPsYseZGDAjrEnVAhnxjS9cQR6t5VOVdzxTxrrNEoDQIbWh" + "oc5ipmRAMWUw$4ZxZn11Zihw95eASXWZBgnQtBcZoCERYyYTR3JaMhyn$LYZL9ZfJlfrjw6" + "J37PHuLCmvo#lR#HTRatgZIjT2SNyZNvpD$86qLBGwtS0$sDSDuTvLfE9wTAZmJlGAoTs7P" + "lQuGragK#fXVdOJLMkeFfxdVkDjd7lESvdtkEls79zmulFL2wWmlZlg5tkBrNQIor0lSDmV" + "tmqbZdmTBVUYHu1mBkTCkvqzI7z8A#gSHATx7zyH23VLIylfIzVP1tXNLAQMhfBYxaQzlsh" + "e3qjM$YLf0htA7svlRDrcWz4hm30NUwvTnfwYozkFzMOsHdkdK#yTgPxADYjMUj$7B$Lk#o" + "qXJ$OlSAvmddK$ArTpdaCkyoj4YATncty2$sBxQ7wv5AKq81Txhbt6dgetfnTrHZzabqI#l" + "IP1$ptia#oMjhdUArZGehKLkhmhkGMdbjNSlUkdI6DTgxqDv3ZqG6byw8zrndkliQIvsf5#" + "SKDMQFPliJ80Rxg5YBCTvjs1eHPndtTQyDsZj5tT5hOuqkdL4QQotbpD0ZQRdJEgIf3#i5x" + "Ls9MQkoxOfMJvDzLAmUzcYmR#FPR8s8rTExoBEPrUhsReYFzYworWHtFO$1JfV4NSpJCV8Z" + "pTjABwNJrHZoezjUxYoJVLIii$nEz1wpPxjFWA$bT$Aic50xozxNFf3UO$OiQmCz4aRxZHA" + "$IKomUEeMUl4dg37tARejtMrjPxAF2jemc5k7M8UwTvKU1FUzFQjqDnVo1RPdK2lxSFjeoj" + "mwtBsFp34WFHYAEpOCizHDzEBUhSRiqNHh7UMURxAFYdMyTLAfvCmenHQhdRDZgOGZNaEj4" + "3$3EgrqXbzZNMePa7NjtR$IkeYbRgON$qer1kxOMZsjAqpsKN4cMfD0zK#sHiJP5NtppzAP" + "r0gy$lHxk0VO4wqRd1bw9BJtpPFZZ7Khu$Y8NfnNr9XrEzk#Mhh1P1yLUxGpmtaI7FzWQqJ" + "SyUv#fJ#e5PbZlG7DDQNhIjUMhZSWdUmUAMPfR3RaJh0#zA#m#z8qRx1U$2lKcBq#tRBPaC" + "4#AlPeUw3TtxLBVpZJmUvtRztIxr6XLgNVoHpdJNTnUr3fTtj30zB9P6TlWZVUFHvsMv13x" + "SrepDwIfMwf5$UGI6mKtPOckoUQxAFYFEHDj0Txkz7VQKhJmNGY#4xcOhSfJVR7CRlTt2Nj" + "RUsT$77s3cIG7WdUWTWxissLtSckPQcRwiKzJ8sXlMFhlsdlQhAFYhsd$U#IPmyhUL6nHze" + "dbpntsz9FrAhaOIQ6QvRIJyvqUuG1QmZc3s#wQrcDzX1xFtS7#m1tEtiZCfYbRQuNZEXAp3" + "wORKVPXvdies8VuLyAPeDAdhTBQORRsxyqCIE7bRkQVPItYtsiVGAk$qVhaKepGa4fWp1Dy" + "vVLYNro4BhSNnQZ60sDjoVfhUE2AybwiesrIdWbIKhMCjQoLbzhtV1Aaln4VhPSyb$htzPG" + "ygs1nvNET8mqqnEZ94sxohxTNzPTrv$exekHWLu1TDRAH1aYg$kTCJEZeJtiPmtMCSbV5cj" + "NFPBzl3z9MnQQzgBzAlQJtC7kfVRBp7v9dP3kCcI$WVKjfXjblwEtJdZdByjmFPBzdZzUMn" + "QQzf7z6VRZlLtTw#nFcFrIEl5sbI7x2woVqn0PvR#ZjuvB4yeoLOzatUxjZhFsEucoK6RVe" + "yQNydRtThP$i7zczdlenDjPXknViFv6GsIq$RlUEYvDACjqFPBzf#rXJ5edKHQakHSuDlP3" + "T5AwH8PmrJN4$fQ6d7RaKBrrN9h0$q43KdUd0yuptHFyaUQkvbHZlxjEd9eWLEVlZcD6G$N" + "#sthhkEJdRpSQU2pXBETUvR#Tu8yqrFygsE#c4rpDYP2pdh#RDvM5#ZaRwwtZqWJ#Y#kHIY" + "SxWqi$#gkKJf4pfDAFpkREeupFDgKnsE#g4sU78BGBjjrPU1l$BRrrN9h0Vqa3rcN#vUx1o" + "7ThVx2x38rPLVvMtbaiRHDd7sntqObxY0mv#sBTZuKtTvVJMySbBt$olNEW7iavs5$TESmP" + "vHpf7EttT8vrZlVES4Oxvx6qyvrJiTzP9yubGUXYh9Upq0HdlDuwBhdhVtTdae77rSurrgt" + "EJSxDpctE7SwTpZtElSvzpXIMDisPYlrEEi7uguISfsZ8UTPvNc#TyCxB$pxdHJsICzTvsN" + "d3USlvsFaCvxUld5#TFvo$d3zfckiu9Untr8dRBWYryNSiNKv3thLkbTuwBhdvJt4x6NZKk" + "lNkukvYxb7kijv8CitjvgxizdIxixJLtLxOxw0JTuqWj0xMzLXeGtSJlNLSylAtkxYR6NXi" + "usxlxam6kqESlzmzt3rHbc7kNkxUB6r$zt3ijzU9UtGG6e7rM1OwpZr1RnsNtFnN8DCCFCv" + "optRFTSzpBtGlSYz1$K$4UgrxFSkbthq3##rqGkfboBrNnjpxoLPwwuHtBlxaH$THz38jaZ" + "kRREK#xRxjla4Y2yk5xpVJ2LAK48ynUwrrmZiV$r$DoCImA7msrWbIb12FCNkjTS8x7$$Vp" + "SX6$Y6VVZf1YXBYCMQljKvuv#F$fndPo3$aixvEaAA4U8pPQwqJtldu$sr6Dl8F#Iod4wGe" + "8HvZzbhhX7U#ySSo8nlvXtnMqmbIb12FCNkjTS8x7t$7Z6pa7$BfgXEaA24UO$PQwuHtFlx" + "hc96D$4C#A#a4AKg8nvYzrZhXdO$$7cPa8$#GpuewGOeIuZ5chxLEUEVZlwSPsSW$vBE2Jf" + "2YX7YCsMkj4zxv#9zZHZRo3$aihnEaA24UO$PQwuHtFlvtcf6D$4C#NNI252N4OynUQvtmp" + "iV$RZEoaN$8PscT84K9yHYprredlFFndsn6Dl8F#IoX4wGe8HvZzbhhX7Sk$dPNCxAHVyXd" + "6PqWHGdn6BFNMYUyy$5VsOniv1$oMLmdI552FCRijTO9xtpykvkHZVn3Felf12bAYCUOlTO" + "wuPsF$#fcP2F$a4zVdI152V4OizTQ9xppyL$JZ6pa7$9PJoT8KK8ynkorrWdlVFpxc96D$4" + "C#w#e4AKg8nvYzrZhXdO$$EcPa8$#0ZtUVJWXHGpn6xVNM2Uzi$B5OhdK9PsJYeLz2Flvmd" + "Q1aIeZ7M7crrWdlFFml4pLgu66eVybdM#zUdQ1aIeZ7M7crrWdlFFol53Lgu66eVwJv##a4" + "PL92FCPAghLEUETXVhMeImCFGytJr94wGPeIuZ7ceRLEUETXVhtWOk1XO4vJzzK9qfGGZp4" + "FhNN2Em$pcmGN0my3SvewGYT84w7IR1cpEuVQT0bpACqEnLvQ2IzcypdOO6vdD#YHh54qrR" + "dU7Y8HxOqOSvgwZqwidZ84AxRIBT#NbtWDUUEmYRm1vOrZEiL2Z#IjHwvY1hkJeS9q9p94y" + "2WtDbwXZ8tZCuwDkogaeczIxa1s9BkGtPJq8yJnroFHToVOOkr7XeHEB7MOJf0cGgN7POnv" + "QAsJta5hUJmK$#ymRErY2IkVtLCZyyiXHHUMEbGdI1EXqcFO$it2VuVQT56OFnOAc0VXaBb" + "OvfT3YZ6dgV$M2T94gFI8Z34FhNNIEs3#I2Z#Ns5OgVE$1FCoI37cD7LFdI1DX4eFOViN2$" + "yLQjD5OVvGA60UX3LrNWOfnfoc$aidI1EXqiConZoqradlWFd3eVX$Xc6bplyKpCiWnPWZp" + "JjR9nYdHAWqqplR$vE6Q1vwwwHtm7ncA60UX9DrNWufibGpFflg1AKI8VTs6MDbrLedlOCt" + "gmRHTxH5VktSEqadO0n23VpN#o$Xzzm7YLeq894RiB9tj4FYxbIMbZXJ6zze8kupM9ybDv5" + "#JdTtcZlTdU4#I3de9Cp7de6LladdsdES8LdUjyhzfCnUre4OyG#ojYUVso$WdBk7yozdJ#" + "VVpb1$IvsWdaIeD4l6MErfhPFUGOkQ5Oh$HnXM#i8VeY#KGOhr1PgwXKwG9aAbHx7zWuN$2" + "BNfeZ1$D1Gm3yAQyKUFv15Vovochg4Jf2aX7cCUMkk4DvrhnR#gKcDzOdrcVM5zQNrjpRU#" + "itwmVh9#iNuBkEYnmfOvMk7zNvQsgawGgeHuZFbehPFU53tSUfUI#ApiKgOB5kzI0vPalZi" + "vMeIEPBCofDbFsX$4wyV#2drY3V87#SkXTrEw8xQbjHPri#VRbrZzT6$1AL#ggIInywDtSO" + "BvnKntL6XXlsJ$QBzkFsD$RF$N$jjPqI5E6wTz014olveofry4q37t#omWStMM6vrFicVPh" + "VuYTbbePc0UpYSV9qEiOyWcehtqWQob4wGf8HvZ7bhhf3ToEXKrUOc$GQokBs6wy6W4CGDI" + "mDokYyo4QUh#Ea6Q4k8nvg6rZalmBOJ3wBdAEy3l1jTs$kzWUXZZUm2GgAxUEyp$tJk0MfX" + "uaCIvYhGLF7hf16bgw7SM$ZtKfal0$53At6TthWNpGqMTSLqzZzEOYOU1EKrTKoT8Kq8ynl" + "BGMiSbO7uGg$D3l0CPSuo0ta6iphc6XWvYMiHDF0pCQMfldI1D3Vt6mh#5sdG9c1$Cc1yfw" + "fnoF9ZnFJ9evq7SnCF0dEQY6LkS3HPiR0dUNIRgd8oaBYcZeeOv7HMzCtM2Ub12FCPgHskT" + "z0xcamEJtFs1mFdTGwilZVLlf34pChL8SdUdibpop2TVflD9xtGoKfbF$guNdWVDMSudtRd" + "sqqsRJwOm6kbsuJavtSL#BtU9S3x9odcCScJPdUPWXakQEiCrCmgNWD58TOPhQ74XexaBWT" + "7#kHYzjX0O7PABqViBWT4nUHWvsxRqbPBrd7E2oaWxLeu9nqfh51qhdGiSzcH6ndcOkcXcy" + "3gTVgpKidkRxA5XjqTsTjw0v36GEkmtfL#DYnsXpEpSlhgwetXvwiwRbk0tZUf2Ngf53dOt" + "QDa1EnUx9nFidepgr5XsTgNBTETeYfsBtHC9Taz4TMei1xjnMdR0piLkTeBTxAXEZUNe5QT" + "hsG4x5xl74#mUZ#hKM0vsPshP0JiNkra9ThEYEZMMWztPMdR0piNkiGIxnw8wDQPdvv#c4y" + "pIb12FKMozTTARvVreWjsZKPqQCs2DqGcibH2FKMozTTARvVr8WjqZKPqQCs2TgXDOAo4Ue" + "zXwwwGto$lX1Bk7eperfaVozj49F9MGY05RRvtqPda$b63tK5IdnlH8$YawGLcK48zHRBrr" + "qflbDpF1RcPKfyRqIDxUEe6d4X8nOEkjazuixmSJx1wCwjIO0MjVdS1Q2OaOiFNMIM#Mtum" + "4knbHdHepO8tG2QoLa8W1Ms#Tz6RvJK#mcnxLgJ4zadOqVbSx6WCxrsZyL8BTKr6T6ijnhd" + "XVomxOMTcLnfR6nhd9nNdQTPCMETXzgBtBCPACpCQEvcncXslWQhfjAZktd#4UJ4Psl6ROF" + "GWzkuquEzKY1xi1sYDxMXvsPcxw9GUxGGjuRvpur$XNfN59fkTWTvEXtOt8V4tsRy$u6p5T" + "QBepmr76knpiRbbGTlwr$jMfTOVq9hExRS7O#Qxl9lWmNRZrNSekj3JTcVJM8vT8$tG9Sv7" + "Mv0g5m7Wo8MIYbJOGD#JBjj1vUzAjin5BRoErpEWKrWwCpq1motI1$q0LbuL6UlAkvq0kAK" + "XVqJHkxGoa8Vhl7TuUT6jrOAbVqLR0$jE31AZqhQB8hxxE84V#ebJ#Fqk8DuZbCb1Qmss49" + "txvzmPniUUP$Bq$ulNa$K5rT6kDzVxmV$N#e9ovLgBwlyOvH$tJnBe0Dlsj1eG7IMlcrr$u" + "zqUU$TdMW13MNd1il#ArYtfU4jjV$AzAv$g$Hkgvl$zBwLooUUY3MCI$Z7ph$ypggxzIpzJ" + "pPuxb$q96mEQNj2CLpPbfVsASjs7uN#4CmVr$4eOZABgr6i#3UIhdrYnjGrZzh7BcwFvF36" + "ja6bBfV8KpoxbqVkbygiVs9wJM8pIMQwMTSrBywAYSgMMwIAlGcZFasv1pEeAUCmrJpceUZ" + "FDhoHQLXpFrDdDs#qZqB9n3ot2huopHcvUpNDohMoDd5K$FeVavfoy5vu9pmVb$dVC2$QB6" + "lZvXTREMi#fO9k$RrzZNoczeBiXlX#5YVlf0#JNpwKpVZQTBv1Ty#mftgdrTJgQO#ReFSAR" + "o5$mOupiJPL1#cyxCb7jUPazehfeqB#elrTd#7s0XCdg$rJ7wgVaPoNb3ab5oXfrav6oRXP" + "7lABvFCMG7mhQ8YPLkLKkLGqASSgBYXPhaOlBt4i$SUZxLoIrVPJpBGYtJHSKBDTcHV2jHE" + "elgv9QlCfvbePRfekA5ckn8NYbHkXBLoIrVPJpBuiK$hfiG5I$KP4Vo6nEbQwGwkUMhZ6TP" + "g6MQMCkhU5oN3ydxAr6wlwXERlaguraMQfakAbweoOvK#Y5kMVg1wkIMhpAUPQ6MwQBYXPe" + "SIDydBB#dEhdbgundulnzEL7nGars9BykRkdNKPtSybN6iopKCbrKl52J7QdqNQ9qtr6TtF" + "9LnhCir39TLBnGamFfcuJbDrGdjtoLyKoSloadAbweoO7qTSBoQwgJMxxAU2RENvSJ5I$Kv" + "43w8c7v1TN9BLzbF1FdByg9YXTgSY1zdh3ydEhabgyodedpv#L4nGirEP0#IrX#HdLoorSP" + "pyJvitAYueMQ74YV9Ym$fJgvvQkCP#ByQJbHyK9DTYI$EcxfLrETtF9LnhCir39Dh0rKFAx" + "BYLILiAoYEhdbgunduboLBcI4YYTq#P0IxnRuxQXERlaguvaujoidAbweoO7KDc7Pbkhabg" + "yodebpstAYueMQx4YbnE#wfQkfJcxvAkDP5cgPBYfUgCc1bFWTltGLrSajNsKy4#UhoecA5" + "sfo84rAM4wYEhdbgunduZofdAXueIO7qfK9ookfJcxvAkEPE5zPJbIyK9C3QMB2SYBLoIrV" + "PJmJvudbHCKBDTcHV3jkwTjK9xTybV4i2xLC5nKlr6H7yhoufUTHdTpoLSQpB5xPHSKBDJc" + "G4byRyOPHdTpoLSOpSHvMJbIyK9CToMyVj$JRKvtSybN6iopKCbrKl52J0waoOLb9TNBBLn" + "dFnBaoNSGSgJB4DI4RCIeIbXLK9xTybV5Cd2lIHSoHAa9S4x89mLirRkcjIdLoorSPpx9Go" + "tHHyK9DTgJIUN7BqdbK9xTybV4i2xLC5nKlr6H7yclZbdujrSajNsKyoq8jqqN52pNPaRoU" + "SKkl9zN9BLzbFCj2BTD5nGirsP6IjzXzzhaDkINYunk#$YCSciKlAogUdu9iylV#JfJkRwg" + "JMo8iU3pBGYtJHSKBDTcHIlFZbgNvL2UtV9NnB0krJ1SLBzJaGFeoOVabrSajNsKy4#Slou" + "cA5sgo8tc9zrszeLGdjtoLyImBjKmN5I$Kv40Qdh0SJdLoorSPpyHvU3bHyK9D3gHk2SjkL" + "2UtV9NnJ9oxbHCLBzJaG4hy7u3NbUhabgyodebprtAYueMQ74Y9$m3mLg8wkUMhZ6VYl58v" + "KV52JGwan7V$lHMfJcxvAkEPEAzOJbIyK9CTgVHjtBBqBTN9BLzbFCj2BTD5nGirEP0IpoQ" + "Klg8wkUMhZ6VY$5KvKV52JNOaRw#ufRSNrSajNsKyoq8jqqN52pKva7eaB7jGdTpoLSOpSU" + "vHJbIyK9C3AV4yYzUTwkIMhpAUYNFtSgBYXPeSIAiaB5UXEhdbgunduhnAEL7nGaqEf9KJb" + "YjJdTpoLSOpSLwvdAXueIOxadzOtD8$ZEhabgyoBfRejyqq$cd2lyR6GeUG8KAdNOmOXoOi" + "3wKwkUKhsPN7DKlqwxw7SSyqKNEHrZ5CzhqeShWHu#04vuEfJcxvAkEPwldWT17rJ4ENefu" + "FZY1dGlB#Z5jwVrATtFALZEDnbRDzleRpPTmpJVZNuwostf$s1MI8q2cBoxuxHIut8$aDYT" + "8rK9tSybN6ot8Mbcd2ETCGvInqAkUkPP7g4tdMKvtSybN6Ct6kJnV16I76kJw27DPp6bB7H" + "9uTgKvklMUu1O$JnNl6UqQrZyQuPPem$uya7jU5M2gQ4QD3WdC7gfDRxrbkmUCCzrdlsGZd" + "PvF#QSByFv9uN1TYgMX6Z4CId0#XEhdrdkOMFCvmd$QUZd1#EkcV9lOnv8CGZ#j2B1NDXB0" + "GdsRlb07tFJqkUJSeoAie6Vr#wykHUlkDwkHMM8YuUR7lm7gTj4oJuEtAtq9hBUGh9eI0wQ" + "z1xYSwmt5Sll9#zNxbMvxABNYSsOdtn8tlRFwQBf6StuZgeeiH8t5zuttBTEmBlmZFuHP2I" + "qDpl3aH#pb9$rIP8#HRyfcq3h5KDDCNVjMlImi$ziLfkUMhZ8ibzHnk#efry3LhyULQX4x0" + "#J3sXUjCIBydBDbN3UMMhsJNy5k7iIKnLp9zAJ7wnKI1Iw8wiT1vo4daS2F686q9mtU61v7" + "ZkOtwpd1aEJdfhSYWwDk#D9s#CunjWtXJ#0yZil7juuKtwhKcNF8X3TbNir6lMPbQhm7prk" + "R73Ml0gpC9EywHkFTseXsy7UfeYCVCc55ixgyJ#Ytq4DljIERpyqaaRywfpgir2RDIDSkOX" + "5cg6YDc53lcbOAjxKKCnylmUnt7mRR69CnArInc4cQfQeoOKUoOLmgsjWGCXsELAIl3mRRH" + "9CnArVGo2RDKDKRCA7RCAmLRMmA6usLuruFZODl99CnArInb4cQfQeoOKUoOLmgsjWGCXsE" + "LAIl3mRRQ9CnArJIOX5cg6YDc53lcbOAjBG73yJ8yKyjniAqt2RDIDQkRX5cg6YDc53lcbO" + "AjBG73yH9NvHfBXeFjcYPXLgfcDPCmIrLZn8nYnxnIiBKbO3WSgqnP6GwsQvc4MQcQDKp2B" + "5MD4JEA7VDAmTQMWE5mh39bPJZOBciIPgLgbZO9irGrHimeTimh1LjR0eR3iSgKbU5ucdyw" + "RhwhQxQyl11ouClWqcc9RpwJo5UkIF3zibViipDyvOelBw44vw84VKG9$gBl4rj$MwLe2Uo" + "Uzgfs#7#bhrYOo$cQRpvJNVZM1hDuf$dg2BYee#2T4557bgQrfBrVmdmghOxDnSjwHt$iE2" + "zxHNjPkzwkjDlPhcrPdXLSxLglsxtijUmUrblMcmglpYtTfkBrvVVN7CV#H7b$okyFNjisu" + "t7yWXr7#GvLsd5CUHzBrDTX2xU#z5VoB4LUoNDU9pOVBrp9WvSZhvbIwiju9S$UfdFE1Q$J" + "cxk#v9jyQRm8#tN3$4OWU9stOBoSSUMFe$4tciXIcbUQ9yDMfTsl6TlzF5PVy#AyahL5EUX" + "4uRN1mXudiYpWfViVlDR0QwjMoclxLifhbrRAQsWhvRLFA#MrVolbTMWhvNLaw#JbZ6sbl2" + "vgfRokQAMyhcgbl6vifRnkRwMy9hSiB#jYp5VP5OKrFiZrNkl#ihpOLzwibwsvrWlMyzRJr" + "hFMJ6kszQJriFMeDSkQPh4lQilV1YrkVOTrbtMF7Z7bjy5Ro3RsDzc#GrOIpuKutKM8Fgtp" + "dRKRheyluF#fgNwFpzd9sLxORyczpQ9ofJ5dzvPkBuxcMsFERabTTB7V3CDECyv5dUqaH##" + "vE4VlEQOBZ#LpzjjaQwUNadFg$Hxg3uHFaDlRpbho2jVfBR7BjqUvv6cFZjN4zjYoHxrlK9" + "PtqagQyNvFljuZdb12x#6XVBtdQREep6biuVOUHznHBDzxdCELy7zQelUe74rd1ES8CqFte" + "1O$JrMtU0uhj7WE6xPu3XVolcNTbklPYfi3dDs9VBzj9$IjbcExAqjzHTEK9f5jbUUJOeib" + "$WM2RDVYDVb1I#TWDsDFDkJmN8ldy4gBv$1fY#VmNOldy6kBdrVQjdWEAxLu3YktU0vRjtW" + "E8reyXnO$qph7jLGELcsB8RVOA65ztcB8yreC#QiMG$wcnP2$RJ7axriC#SSMG$wvnP2R$L" + "nK#eJ$lcdzJaDyANqIXjCNQccIqCfgosD2htrNolJxPkbZ#GG$3H5s$LZwc8Qrru#TdSZpS" + "jJI956xq3hKEhESax5b$pLhUgA$z95uglub6X9e7p7jIzvBQXxHM6Xf4kel1NXVMZjmFSUA" + "encV$s$Ufy0$QkQdlu$J$GSUizB#kw7Z8jmlMO$GXay7DO4X#KR$7tZEiDR0pjhPES3#qJd" + "KsRly$mSk0dRxPFztmqN0RjzMpUwXLitkaLRDxh7Mt6VjQdsVRINiQberkwLQDRjbMZCxw#" + "Q5nYwwfBu17ovwTlmDUBfePtMFknj0rOtG$nhHtzykzupn2cGbqZNuZ#HipnWlPow5khXRP" + "2czkmBRBK6M99t9KgHB956MVh5SfM$mBZ09mnX7zopCIi$r9ck#A65ZwPd7bjY$7vHUfhpF" + "TJmiBUYlFQRIgtcJnQX$cgZOxlBDD1DzgPbmtZEt0U#zH1s#5#fe26lwxsAnDa3zqqIJCsi" + "3WVvgayXqjYuNMkjzU3fj0pASiYpEFC8si43rJlEpkf6Fc#NelTWiA7ykE0hHt0dBpMJEWc" + "FOnBlA9A9DNCLN6UDnaxNqOFj99X48T1zycrtejTQXZQwvUP5lqZEVAqqYRAxagupnk4P2T" + "jBpV9C81BeF$eLIwBNMq7VnkgZMeOvXTL7a$AYLUObuwULyPhMSbnZtGnqDIJ7bej4kLrQM" + "WCGGgIuC1RAujtW2d#aOpkAAB55EE3RtBoDz8B5ygKvmwwD8RwztWX$JCPpUYlGf9pmNxbz" + "6reR4ygKwpfAb2j4TDPLbr3zTkDM2Z3MsGt7ya$L2Y2##6y5ZSf5fEe$GXcrFr0jD4GWi5d" + "Y9D9r7QCEsn#c5fWW45WkyH9hE8xHXDNgdNcWAH#2nu3Y9D9r7QCEsT#Y5fWW45WkyH9hE8" + "xHXsvFrGbC40ei5NY9Dvn7QiEs9Ug4f0e750Y#HflC8RTZs1BtG5870Oe6NIDDvX3PiUxnU" + "Q8f0OB70IwJfF48RjZrMBpH58B1Ou2NIT1wX3TiUfHUQ8X1OBF0IQJgFq8Pk$T5weIaSWSV" + "a8jDq7g4Dsvwa5veY45Wiy19fEe$GXZ7VM2yqXIFmM51IaQRp26tOTaEzq1I1m6A1bqZJUO" + "GsR7kNNcYAG62nm4kawJn26xOThHUQ8X1OBF0IQJgFq8PjJz8BJH48B1PuYJITHsZ3jiVeX" + "QO811OBl4IQpYEqOTlZz49J10AB1LuYJUSHsh3jqNgXAGA1nG8laQRp26tOzZzweIa2WSK2" + "Bv6cymXjs7OZlT0KWS1YWPT8qtc4DcoxWLveYa1WiS1BfEayGXk#TquaAyRl5fNEmNNiS8x" + "WhaYKx#FQPxlqURQLatUBGXjIcO9yDaTsjtR$rNHaVufEg9uZyvXSP9hE8xGH#$jrGlK2WS" + "K2Bv6cymXjnFu#dL2zG62nm4kawJn26x6$LoTKBn1OBF0IQJgFq4Ri9#k4wWK2YmLU8atd4" + "ThmlVU0JgYU8$2ON6IQpYEq4VifEg5wWS1YWPT8qtc4DeBxFJgXUex0Oq59HPhE8xGH#xjr" + "GlK2WSK2Bv6cymXjnFukdL2zG62nm4kawJn26x6$KoTKBn1OBF0IQJgFq4Rixz09rGi45Wk" + "yH9hE8xGHH$9kdL0zH#2nuBYBD9r7Q2Fsf#Y4wWK2YmLU8atd4Te8xkVfXEev0ey59HLfEe" + "$GHkpFrmdL2mGM2xn4ciuZj25b5#RHfEjaxrlh839FnOf#bvElXAXVpqnVodsNCxGBhHVW6" + "l#PfllQRSbWK8YTJUqRvAywLc#SGQ#tRsE$wln2VaFialA$MVbZTKBrubYDbI6BMBPCqta4" + "HrTwdgCJgXS8B1PuYJITHsWZzcVeXEe50ei5NY9Dvn7QYFrPEg5wWS1YWPT8qtc4Dc9$cqw" + "eNY2mME0bqdGUeOtOdwiJgXS8B1PuYJITHsWZzcVhXEe50ei5NY9Dvn7QYFtfEg5wWS1YWP" + "T8qtc4Dc9$faweNY2mME0bqdGUeKtvNpEZ7h4b$RVStzWlMSH9$4EzVxjEg3vCPvxVEpywF" + "yaqdKU8A4FEpoQoKG$d5sEfY3C$$Sg1BkhythqyrvL3olXDv$VEr$u3Ea497d3OFt7nM50k" + "aQRp26tutjj99rJF4NXCBZ9Dvn7QYFqEEg5wWS1YWPT8qtc4DcA$ZKweNY2mME0bqdGUeOt" + "ORwSJgXS8B1PuYJITHsWZwliwdL0zH#2nuEY8D9r7Q2Fs5#g4wWK2YmLU8atd4Tg8$GKweN" + "g1m6A1bqZJUOGsebPsr0dLSmGU2#fGfEayGXkntrudL2yGM2pm4cawZz16xBVM2TKB11OBl" + "4IQpYEq4VjjTKBr0e750Y#HflC8RKZPXNbePbdaTNMMHLwpZmzdMMGmPbc9PsrAf#gV3ABF" + "sc2hUTQ6fzDPLbFdY4JpfaJ6sUMEJVPyeicUJpNLq#xGD4$xBhj2SwJEKkVFufclSFwiQGt" + "6PxvIZouxiheP$2tH6No2WMO96T3$Q93$Yo1JrN34YpA8BAP$M908SXlk4Hhi$90uvrziNn" + "MSyyT5QuIUyytjdIsLMioBb7d4E7hEpuVf$qSdA8MuQ#l$HyMKQJeFnUOOdI15t1T7JF6GQ" + "JeFnUPedI15tBT6JF6GQJeFnUOedI15$1w5cE8XqtGUYisHEa7AaSBYIDL3fkay59iZT88K" + "yNO#Oeg7JDDvX3RUFJh1s2xkj7dtg1uoJUUXs9og4wISAYnELJraciuZjF57wGGb62LACah" + "ra6aw3yNcS9qWHNnp0J75GwRfF1IROtM25F6hAMAAXqpJUGYBvn1xBYfSBzFfDOFquAbnU#" + "d3B5v4xCMeSBrC3t6OzOjyg$DHFT8NuQ6RAxmTdIkeutdyAMBl8uuLZkVUHrmdKtbCrOPBS" + "Zpdbca2Yy$2dCaFrX3hNzvdNl0rNHeI5eesVQ6MQGABNoHsOFsB5rnRqf2mKBHbylmbNM3n" + "iyGEh7$sWkjU6X8MYhPCdZ#d2on#ajY1zKzSnpG$1HQAjaoUFwKBB7wKs87rZrp7D3y65eg" + "sJ9u$fWiiVf3OWVKFNCSqFmGMYhPCdZ#a2oo#bzY1zVTSnpJV1nQAjaoUtwSBBBwJs87rTr" + "vmfuQ6X8MYBPFdT#a2Y$aIEx2UxmN$Xqv3maBHbibpVhh0uXk97LX$mtLCyqrWeMZBvFbDk" + "i3YQuaTM7$DTKppTM2XQCla#NMwmE8hYHrOV#K5SsKQ4XQAjaoUNwKBB3wKs87rXrp7D1y6" + "5egsJ9uVfWiiFfNOH8xndt8TqtyQM2ZQCdb#cYwm#4HY1zQVUC5RppGaB1HjcJm$IHTOV2w" + "n0#lFkOvfFWyi56sPF3zF5rXyBB43wu#zu2rf6X8MYhPCdX#d2oo#bDX47iylkOxflmmi56" + "sPFBzC5rZCazY1zJml#EsDXeI5eYsJvxnqWSKN4Zkm$i8BlX1FGy92qPR9yujqWKMLn0wig" + "xYEQQe22qLR9i#gT855fSGEh2kzoi2$Ch1Gj6Noh4mNM5H8xC2wWkkOfYAmKBHbygn85rXq" + "bDY1TKSl$5$KZe65eYsJPyTqKR6bjVy2vjWlH8Mcycsubp6TlVHX5dCGcnCLhfVf8GwpdiE" + "tEXzcyJnYpqU5wuFq5oGEYptFjpeVPl4SOgbNM8oHpANy5TQpY3qR5QuFqfzNhh1OQjnU#Z" + "2BPn1x9YfS7wG$9t5Ox1c#rVamYwSHUpegN1#aFojnMEnfljNvC8kd47igAbmVf3yZSLZiA" + "RxL#J2B9n5xCYfS7wG$BN5Ox4c#rVamYoSGUo8gN1#aFoLnMEm9ljNvC8lPYCsE2jS7wKzA" + "71QRpRSw7xfur$YplMkYmlL1#XCIXyQeFculVQG7ILqeal3GNP6Jl7TOlMiYpqZCfMjKMAv" + "pHUvpfHzxHcAkpbxw11xbVrEM7ZhBxByfy$$IdgktT2jSXkB6$f6K$wRCMxofLSF$MtYETa" + "zrJs4#FvVl2JJL#ONz#gmzJixyhCV9PSyrEz#eRuUd$PSjisQ$ARkdQU#SYF#onN82hoUsb" + "6bDZcUwl#FyhO8hB7VLCMDBz5kHXyLO3XTyZjNyWd6XSh#9HFXC19#JoE4ajfX$mKWiLv83" + "0Y$D$IPoihwEZ9p#a#jD#hAzcN8otryhKruT#duXSrxU9gANhPK5O5vWBzoMeiVURu6mz$X" + "VhEy2ky0kiCjZbovjvh4g#HL4upVemxEuqxqy4nOJJEWtw5kmbDhdQ4pdxhGdBPpDH2dNqt" + "4L$k$cgRDmSPJtbNHjnDaqElDnjcoDxK$3UxFosCvHJSCknzlPj7NMoVzNRETL7IRquWwO6" + "tmJX6BRPpk$btaQPp1wOXeUUtRR#SXbNy7CW4U0DzWTatXYQ89Y4U1np6nF8MamnwkO#Pz2" + "ycxJYGcJfwLx87QhJbHCrOEdfNiWTejE8fYA1qzBzq3iPfr4C1KFdfRkWTXDEebWAXuyBTq" + "3iHjr4i5KF7XQkWTYD#WaWgbuyBHq3yIkrqa4K$7WQUaUY5sdamYcui7JqZqGkrqd4Kp5Ww" + "TfVVfx$QLDO1teQ5Yi0xs14YT8OpePvglqJnCoafdjHVtJX8pq1dc3o9OaiZ2TP3Q8fFp3S" + "CWixfycZDrWv9fvpiR2$UAvC6thk8eki0li0hl0Bh0Bx0pOzchs6isDRVUsr$udrqc1NM0N" + "s0LsWLrW5zW5Te5TO1VO1NQ1NM0Ns0LsWLrW5zW5Te5TO1VO1NQ1NM3$qx6Btm4Bx2PXHzw" + "cr3zRdhAmjodPKw$cjoa7koStzVciy6tAMBaZhBr#db9J$5k#KaUvqP1gKUPjqSvEWtiIzK" + "yJCeBbihwtVhH275$LUUixjTxw$hT#ukkzNCTPqL1eGVtJXETC$TE4ZF3d#udluOGwi9fFu" + "mYz6xVotfKw$riQ4h7lhDseVvg8MdctZ7mWymbo$43gQDYVBsBi$qwpBDG$JOJPO4$x7yVw" + "nVpSjV#Z$wCm2jweK7I4XX3$mMVVPbAVkvOw7kPhw9yceN#QbAkda6DiYRmh39nyxuA8TuM" + "TxkIGu5rX$NFuetclP$ydJPmjMAyNItAqyzwAzVfTlRUeBamDOebtXIFBSB4$aFhhnDh56i" + "QnlJUP9Uqb4rdeSEzDeICyLSQyDn9ytmXrD8Jr06gl5vQdWatcKt#TC4iQUaTQ1hcy4#W83" + "OKnmn9xTvxwwuJbY7tfTPaZ2x5ni$HwwNNJk1dDZ5gQXAM$6jYz6bY$ohNEBESPR1yn5uLQ" + "ceIblnpOlHnOloorvHPgQHAM$c9Wzs9W$M8fmvSIkRTPMFgSm8w6s1UEIdDASr8WLVGvPc7" + "fBmHsBmJeBvHUI85KqLym2qj$Fh1xFa1$NchBeZzl5fO#Dx2R6w3FBSrDWLJHvvg5fRyMs2" + "5ahsHtirSflIQrPT5VCmjBVoMmUoMmVaLgowA$OXQM$b9Wzr9W$PBKbaL$oImi$Ot0xet0#" + "erIOWmqeBzX5fR#OM3tOM3zOIdZzz#efKbO#WU1tGU1zGUb3z8m5VGFpCBItm$itW#ito#z" + "duQfeBzl5fR#Nc3tNc3zdjIMHN$FB2pztS3ktS3wtL9YHcX0VzSiBFsTmEwTmFgTKhbpb4H" + "$nomi$Ut0xkt0#csfBOl#jbbO#bk1tLk1zLkbjz8m5VItpCBItmpitWoitoozcOQfeBzfbg" + "XTQ9rbFYQkmlZIN5$nr#TxAj4k1Kw1it1n8lShv0oeNRb$fV0ISoNl1QPhJpgI2cy0X5cuK" + "uDqw6JOebS50vB#LDmvv3DNV1dEdUPETsUu3xAK0Ng9OhlFQSlfiBijD6VrRejaerntAHpp" + "tMKIsC5T9bHU71krVL82konYo9P$fw7iFR55ZzXitsrWNaJ$Bnc2GOwnkmaCTFaQlzDMhYH" + "iANldJNSiodyRJcU1AyYNs1La#JoRZHNoV5svQjLQkAiiV5RkccLPhRq8M6rSbjK#Yu3LEU" + "dt7M1niMJbqwyxTyYUP$et4Zn#FqJvmgttgYVkXhZNaA#THuG5#qQ2bxXkz5vHT5#p#AkXM" + "3knxTxM26kaYkt2nvqf$QN0ccwPjVTw39juhtklA#7NmfZGlUQ5ryoKIUmAclhh94XxBHGm" + "eLl6fFIan2u5N$#CtILE6IjAJwR8Cym4nxJq3CLcnnJ8scEQo0C#PWc#zbXwYkL2sogGdSU" + "IxOQiY$Mv2EUdKYJuOcdfYI2NxBNnH8ey5zJ6SpGNojHUpbu#ojHPAaJpwJUgEmZavypYVy" + "7jQ4yeFLVs2oHbloh2lXPI6POr#DvbxEkNwbT5z5yG9KCPtaoo4uwAY66XiIWM6sjeZz4VF" + "sVdQ3t7i7QDfAcnw3tiQ8oGpSIU$rVWy4WiWUL$m5S35l7Vu2jTBFeVGX$0UZkwZOkqXtp0" + "jZ51skjYVKFWfBGvvlCwzqWAhosqkT$yrqk$qTgb#STgTpRQrwzqPJxyxj5lfT$uDYuyrzA" + "laD$ODYRWyIfVAHxpIEinyF1VvHv9aUpzrn1xZRAd#MlO$q9Nwa7p1zPh$cjy6nUHwo#mVe" + "rkuuAqdyLAyQX76dlgypFtI4h0$iFIp$w7hEvVYxDtqSzy#jy27PWF#oSP$qF$GxwD2y#Lz" + "b$WQVklH$zrcuuPbJHFF$Lk7#s$vRymv8t5MD21yzAX#E$IbMBnCruvHFzTU5JIRLoGzXbd" + "3xoPaT55cw$$RdfU$dji5UT#pYw2y0fVUKq0xptkaHHf3tcFRME2j9V5#Wf7IEJr4by3d9U" + "vHrAaFUHbjeq9ZiXalZBCm2DSl35ybJZUPEwH56aFcSosCO7$#tnbc867KgxFIN2EeXx##z" + "mZATo6jTttzKVC$qXWLNA4o7s4AIB3Tk9ebcsx$iSCBPpviVi88VFmFW9lQULxWliygNGVy" + "EW$X7UGzn5YJsTC4MZjmdpAp4$FRNQMBr6MG7uvlDiXZi$Btiig6kA9tzQy5wCwDKRzfI3w" + "fRL3D0tRkTIVONp1FQ6P6s91vdg9NwsyvwCwDKRz6SONNkBtA8bD$U6Z$SSNWMqHcpZ49Mr" + "8MnoRzgXnMikLf8fKaqwaXjIIEb9F6aWZMOmiJfOWIvBEP2coD5c6B4kM8rt8ycG5iY9PYN" + "GbtSZAP1NIdVGWFScgP3MoEbc3h4bwaRL8RzA7h4tMmQY#7kbBrYVzI7yoW0maWnZsHcHZi" + "WdP57EEpSaMP4ko5HcCCyisc4LiHxOdEv0TCPFP6JEANJ6ds1rpcZt8lyYUvDyPcTDLChUq" + "pFSZ#vC3M1dpCBUH4sTkmJBEWnYPKpv3oJ2MqzuPox0NF6GP1chBmE#MN0BhfjM#1Odpg3E" + "MuLto7Ys3jR6rIUOo32EJWp9CJZaEip5$p5E6#jGoV6qimneGUXoU94zbBiDafGpVQykm4N" + "aSyWGaJnagaByim$W4ZvgKjbJ1oa2PPId3RAKdzuDqrhRTi2TFpb26eK2bPTY0R2ZAq1Eem" + "nAefZBmetuWEOWSJ0uXXvB3oE5a53c274cE8aUJOyX$oB7aE78yEG6be#sEbj8YOyZ7A545" + "EHDppoz8XUMo#uRrI9CzePwC8vUHot6anfC9P2Av4fghoDNa6d8jkOvSJsuWDvARoCta5d8" + "hkOtSJkuWTvAxoDta7gi7IZgGt4#ca0TOBr#3p82c7tAT17q5UIm7PxN#nh3wOvoj1glHMa" + "nm$ZBWF8bpjbOCE5TcvCpnEEVluJKBdFUJkGEl6JWBX3ZdEb7Fa$DoPZrlXk1S1wyN4BE3t" + "EiMa7E$66TBmxblthR1Mk0mmVdZe6ryWTngaLVz0d3kXHhSZt6sME#YdEiKph8zpmuuMnav" + "qpw#d#0yWs57EURXR0E1SXo6iezX77dReFLIBzh6nm7dBmJdke3pMnavzmFEWu8pnPQ87pF" + "4IU3y1H0vxnV5Fdifff9fP3hZFOkCiJOWZv1zMEndbEPRLWewMiPhVb9G2ZjZAIfHy$MY53" + "CNiEOd8LVAaSvyUCtp5ZwGSUMjfJxW$AtWN1bmtZCpvqb1pVCMsdJEimJdOUJJ66SvOgkSP" + "JrRUUkPZTYISqsprtFOmWSApiaMtfHwdjrizKovKexpWrufwzb2YCO7ubmTh#UGSqFcNjch" + "sJZRg6dAaPu5neXwfV4Ns5oBZoIN9qRizGFECpDovemuvppiA0lEQ0pQhuKvE6$9DCJPXIr" + "tBy6k8VVvf6diXa7s4ep6W56jO4htydX$6h2h5Uo61kmwjoWxEfkj5qTt39irSQRzo5xMwe" + "nThOQT7R3hrS97Tg#Wlup1N6cWwD$VWwbiTo4xIyp87CaEePPaHtj3FQuBEBj9w0qLejrD2" + "jhTfubHVcZkkfjaLLYLkTd9V6SYtp72BphBKi#RTkBiNv6HNIthNVcFh8syre17Bx2hnB7Z" + "TLV3yE9zLXnPrAfajsH6TlMib#LbjptOqV5p7xIuCPX5ZSTvYbu9zBS6M0CJvyB9YRhBEgj" + "kMhlhnwvq1efsLybwC9#BsgBkh5HsMUjkCh1btUclL$UBN7FtPzUhsrjhPBppr8#XsYbt6U" + "WrznyeIpzOqnBFrjzvicpM5wcrBFKBP9nLnSQE6SXbU31$tvUCD9J5YfHbRrOM2tFWR6NPZ" + "zajgRDJsFKGH$a5Oe6T$YuQjQDdYJX3EGuEjsYgPQt6ocAw9rWRAKqbAyqCr6IsqbXiJc#Z" + "ncbBatLNYskVIc3BqjI8EtOlC2RwqfZkIT3IcBZ$eU5ErspSwzZ8ORCroNq$R5NkzTQQs3O" + "VztuQxdKvwftQqYlhoJ7kzDuGlOT2kLFCUlI5nx5zeXcvpuzmxyNocPE3EsqNDfDAh5#XNN" + "m3f0fMxvK8SUxrJ6WvEpSZzpaHxbREUl#6tO#SdC2b9QfY$2dtEfJeSUJ#19inwRdJ8nX7c" + "GcVDExFHxXFoibz87ZpcMuSUHRIgaHxVno8Jx1UKOcpMdRkb4VsziwvhmzMsRY$1GyJ#nv0" + "hsBStnBiwr4UC$TP2GHwxp6DUrs4Um$6$IrmpiPz4cfoSi2Udd7ZEL3kLS4zPZeFCN5VNyD" + "zO0xk6p7kbP1it6t6t88t7MU6iNcssklgH9lXp2lPlUZoVNLInhxwjQRDV89Uaetx9sp6iq" + "y2Tp#qW2gaL8g#IiTBc$NKoXpjtSQno5xld7kFpBE46V0mzTMweAzINlG8KUxczfviRpDXd" + "tUSwPkvpL0kje7z7AkTwAjqVAbZBR7IME#pWbaQdmrz0nRv#ceDuqvdGrcvM#oSD0nrbDPN" + "wr575BqkXNilLh8VO4FlprQoirbD6dUhROJxPDvNhTgCtFzW#TdiTvfAzljHjA#AzcxrHMt" + "EOFK$B4DVhSdMLzbnZRSPEtEReICChVauxWpML#S4VRMEbQyUHyTKxtN8Vo2E3is$1dEBIh" + "IQpcNQJ8y8z$t473WhznfMa$JUZIskiVHjXhRtliXjad5EeDQx5QjtFVDP0VDALZjyTBSoN" + "ujalP8yaPn4JYQZoIc6wweQ714Bg#vQP7lm78uZOcFT9#MwAkovTZ0pwudOGYwBw4FwiWn7" + "wd3M2fy7ionbgM7Ml2nsgogBdRiiQ65MxqLMbaciB0ErPQ6jdvTbFBop7fVAHLOMMunZkh9" + "K8MsuWRyTyEyLdDrid5qMDdzwZqWtA#BynnlvrsZ6g$6BeFuj9lgsb5R$amB#VTbepcT65O" + "kWN$SLCwVmzvzwSGLMcS8$l7Tb1UFIy4KoBbMo#tJ38Jy8xZJCnzWQ4tzbXiHxFEEVUOQKd" + "t#DaVzmTfxYOsXVjgKbukDgNOR#MwdqtwmpZURaRxFh7Pin2RVXUI5B#x74V2Fh5Lb#$fQ1" + "VmshRSfW3lj5W8wcTLQrc2bLPAn$MzH$oysNJBDKnfVCHzklOBLAvxypHVknKkfVDtvQBTX" + "#PXh7ppcivdcjyx9OeltGEmOc$XKH$Zym$XKjE7wQse$56CmKUzwAA2FAlow5VpX$c1pK$s" + "HnJx$v#Tj6$WE1HLCjFx9G$cnlu8yKmH#XEgpWp#nRX3z3rlBt3Kl1l#1Vy2$u5$mB$WN$W" + "d$1l#1Vy2$u5$mB$lyK$WmF$0MZWly$Z7$1l63UVCpfNKNEdDHcPQxaaFAcBaiNz$$88CDz" + "mbgMAkgDXJkdCm#VXMXAdITgoCOQFGuLf39YONfUh9uqiFGpoLd2SYmvBsETzmgPP$vjz46" + "5KvJnq#GPyYnvJadVAwsrn1athRKqfSwDpu#8rWABohJMig3jdFHZxNpW0Z8VgcCkx5g8UL" + "7dHPt$S#kSJCx4V7PJwZpwtfV8RmBvYdpDQvbXJsRQUf5gO4vcOsNlQ2lC7s7CCryNmEDDh" + "6$J$CaOyZxvW7n8FZ9zXKB9PpnM#aRJRxdUjyhtfCEfoECqSZevWyn5w6No2dcLl4PUB$f2" + "o$G5og6fp9iqdyHSA#ltJm8kXb#VmpfGU5Us57DcsOzj1x9jqsTbGqLw4sPbJQhp1$t8Oc9" + "ENYp7F4XV1CnZZAEn5nMx3FD99TQIhMK6hMj8egxLTaAVsihENF5hgJgFlgDiizOoWVNR2e" + "PI8SvPTUBjW$gqrf8yLsLdddTKZ3Dd#KsWlOqp3qRnEbxZTDiop9k$peCIrBEw$yVKkUGjP" + "pQjhyvXhyp9$DIbTJ3t3VF9i8tpipeRUzB75ZRsDDjyiYzQJyRv95AtRxdv970jtXOH6YFs" + "Sz6BWlbas295wf9iAnXXs#oCbBm2HhuVPQHfSGMZWb7pNYdLBjWTIUqCNgSpFJEgkr$QCyc" + "EpkepZuUsvXY8EPRyGcKiDGSxNTtHAu4yTPTaAERSmuAuEXejA3lw$SbcOAV45vXTUAOhs1" + "Ni2dO5ku9TmQvWLx3xfxFZzslq2tr7sbVkyJKJE$g5ycntEUXrjf4TvHUlkGLdXsr6ThxFl" + "lsNKdkSNJCVsJpijZVNdPRn0jUTd#Eg9#t8KaoAsfpiihUxREp8FcIVWftcEowcgqL#Nu$$" + "umBOqNyhI6F7#Wv$0gZilnKmgu5a4DlpVolefUGV$X9g#hS2MXD30$jz96jeQKrS6Lw5IzR" + "y2Q1u6usKEWDhOaTPiz4dSUrlP4tljClVuxwbh1NEDUnfitgc3MgQuTDZEb1bIhyPcvSplV" + "OtSxRwf74sjGxcRMavLyOvDwMULSw#Ue#b7skJ0nU8iyt$oqNbJBzleFYevu7o$x$1lquHu" + "onPi$D0lwoS#Nc0jGqhuDmhv1pKH3zMLmD3rlauColAUMYadgM#Rn1k2kUXOkImOssZXZ$X" + "sDHwbfpPlfavoz6EQLCvH$XdQ1kfd0FqfhHd8sVbwO7cuvoiaTR4MTIdWRE2r8oSqvU2Sy6" + "vuFm$ptc1Vb5Zo6VJVsvbeVF91R5lQ3RnjqD5Otpw8EzlXymdyWi##PmyGkRbOyf$mUTCvI" + "$uKSPMJQ8CJM0giDQnrcskcZGl2$TtuOAHfbN9DskIxJ#ulbfWHkhiaSqrsUnne1oTv6msE" + "JePnuv5FgAQEPkMWdF1kU1SS2uu5vmBpWNdWdF1kU1SS2uu5vmBpWNdWdF1kU1SS2uu5vmB" + "pWNdWdF1kU1SS2uu5vmBpWNdWdF1kU2yg3X7dwhApPbz8OozDK2$RTPYdCc3fdgEVjsNVes" + "j76TXcLBFv4Us$UN$UpsREMUfvtASoULi#$C$gJrppWjUp$yipl9RNiexVodlFsVYpDErVJ" + "3iemNdvk1i6kioSbxaJxEhk6IC2JSenwK#$yhe5UPwpdhk9fzZdPUfdkKRjvfwZY1#KlQBi" + "q4R8V$DzaonLUxjs4pdGyxTMgj5tj9egRwuEiQyDLkcBxRKE4th#PysLqfhrtIkH7vEcIl5" + "$k5MU2dltrfbtk6nLaXub$jNZV#1TtWM8IuRzPgRQKlX1ZMW$xfV9QbYbkBDTl6DaDJlkIX" + "zF#CLMzP#H3v7tv#No7ieUqjyh#mbo67PR2L8UnjNba3Vnugo5cKjobgKjIXhKTQYh0kfh2" + "ruTStsLxHy3cAlEHPC7tpbYiNulEwJB5#v4Xx$pLE2WDqdx2rrmpUVmt#qOTTXkN98hoFIZ" + "yrr1#hhACAZtFs5UybzpSNBQfzsxAp5hIMi9QtErbBMqjOorhBMSjBEMidgQdMpLhPMiRgt" + "1AzoRIhGPpYEpSkhTHx7RFMblv9dASeRzQsllWIx5gYlu3v32Y#HlvdT0lDYPvToetNPVrY" + "JJ8DmgpkEBS4hspYHPIbu5RmANWMlWbV1g#1Ly2fuDPKNgSHyDVQDhl9FsL5URD#AVXlafH" + "5eOyJrqPdaB5uQ#P#QqU$noQTroCGifGcueZJa$aNHNiXtwSS55ahOQjDy7AsUaYDxtYF2C" + "Vby0VarLywYtjbnKtwhPbZqRbspFFN9qfNs28uBxRVgfXnrUh$7l6IxtrFq7bOZ6mfTA#Wz" + "9euH5h#cCBptV#5ky$$V70ASwFzKjnXR$i$QsdD9vFcaHEeROlzEQwt98eSYXoA78eSY1#s" + "uNo0No0No$nHoS6ryQPvxDO5bfkkps3#3QP$1DruRHvwEzpDVF#RXvnkUZYSFaOUnVJGBFs" + "B7ww$S6nBb#4NI1h6qyB#68cz8fF9hxgUrcnklxDD1qNytnDevMO$GXl#1rxGUalaV#Wfs1" + "Rk2NS6kO5Um#$$CBgPFVRDIiTEpYzovPFl4h8wCf$znHV$RHuDQfdJyFwxo$4Soh5uoboAI" + "zsTPIaz#Pzi$oL$aRr8YNYHDbDxgaAVqLfVoJxdpMQSeFKgDiARK2fCUGSXOUjAV361FBDg" + "oz46A$Xqy#W#dXjAJlPNoTCZrddENvfg9jWnEfCOolAsOvRecR0FvtlfbeUY$lAMsd82JQ0" + "FbMWxh0K7BCItaTzPoWZQmOFLEMmwhz#OvUgq7fRLWP6eXmR7DCRQa8RCMqcJaM7lREnAZo" + "CrKfX2v9Sh4$y4zMYOvNf2z8#yk0LbNSarTbFz$ODgV1fh$FPw58kzWQt9Xxour8MzQUx7t" + "flIvfloxFV9kgVUwpFmIkRPoVhgZfZzscRzrjc2ZEEL7zBs7pju4brewDmsOPHuHqf5vloo" + "G2#G2kK0ka0la0ld$0x9lcAqNo0LoWLmW5yW5Sdxaj8KXD#st79jU9qUmMlWRve7T8BRLFB" + "6Jynf$GNmjxBL7A$pDIjnDuNVEbop$crNsUmra0x9XwsXR1NA1l32HC$oQcNBdESjlkGXDI" + "FXbx9dD$skc4llCP8Uqd$AC7hvlTSp3qLe#9MTmj7gPyxO6nVDUz6seG2wG2#JMW9osy5z5" + "$NopB8jqJZvhGohrJmQLVNQ0phAQFaSiFDEk7YnuwevKufclSFwiRGs6PxxIZouxiXdQLfo" + "1jfs6pyJ5tkLdgQQlvOD1JDE4RqiOVjlVNdrg87jxPpOzCimZb7b9WLbW5fZ$L4pWzT0$cn" + "hWrVd1TKXpuB5jPhpiCmNVppkU#x6dYCKpetihuxdncL4DXyHudZwYy$jP8iz1RCj7z1nvQ" + "kkYoBF8iyYpoBF8iyYpoBF8iyYpo7EHvIdir3mritIMsiGx5irznP7XYcZl0g$0#$#AvvUz" + "8W$np7qzpnrMzOey3LEM9$3B$8n4zj#KTPRPVrCM$wMzTtdBIDxYxKXJoOLLZQ#yHqbUobZ" + "op#YlptfaybFMuqH$VMQ$AHlU3jVLAFzDsUhaw#w49sgKXSkq9cjjq$qTQwC8UiZoGHqpPf" + "FyBrk59VzM97hME#c$O32hiDP#99tfVzacyZB#Wf6eipehV4zFSx$9Mi5m90sShFNz76$IP" + "#ZDjCSPxw#bbrTxzsxza3alRzFGozTAqvaNs0ktfHXuhxyWsAJd$s9z5zW5Te5T7hlijsTo" + "OkVv1dru5YTZilyN9VjgoSIMBAN#EHhZkJljIOll17RALOD5ydstFyXtZ5h2P1knLetEVCZ" + "4rjZ#ajZak$BO5caQTZdUrggjiqx#ls8tz$LkI$n2RtegGR5fjYST2im2iy1S#9ZXrsEKDn" + "Sqln#8BmH5trpG$ixWP$#Eom9zfOSCZUPgMgXT99w17V8Tc7tEniATTRcsZgle0hl0Bh0Bx" + "0Axm2wm2#m2ky0ki0li0hl0Bh0Bx0Axm2wm2#m2ky0ki0li0hl0Bh0Bx0Axm2wm2#m2ky0k" + "i0lihDYnfxwrpvQR5$4s9SKs$okbHIOqzVaizLyf8q$aHbb7$bMDVyitUFACSeizULR#RL7" + "oKyRduXB$vsPrYZvfHnuYzMd$#iQjL7uPSyxqF9u#LnOQ6ZmjcCdAv$$JsZpSv5ECWv8viZ" + "eRsZ9VGK2D3DArH0Fc0Zw7AQqYptOQdiBCN8ACNtimbcceGH$jJqFplGiY#nCP4xuhNFuvV" + "5#y2n9mI8nsx2bMjTS$Q7oADV6kS0Jd3R5$9yyNEiYFBFIBCSyC$zfBtnNE$eME1UqtVldd" + "QsFlX9VDKOu3WnWw7#tfE93oxhoIMxclgKRH#RT9v3dW8V8mje#cb6K1qCil1Ng1Ng0Nw0L" + "wWVvFGm$i1h5joZU$T5yb4Q5c#eg$ALz3oGgS0cUXuaHdi09bGjb$fJ1Tp$F$7g9lml4hs4" + "UYwIAicQa7VVfDzEctXUvzyW7va7p4PkA6Fi$imkl3txJlu5CTUxSusS$zo7LNU7sOxowJn" + "9PtcNpVwXV7XcxJE7Pvn90j$qv3sIy$B7B4vljk0qjdY2O6USRk$0oqtqKmVbKiqxkmcRxJ" + "bZWMvRyDf$icdBY2p72thzbOHQzQ2rR$T5PQBuKL8VHSa3tFz3uYxZtrKEpbNMpaIMgHfxp" + "tHF#NASFzfond3VOjn14iP9fNskev9fcJFDkbCOcbb#5bP58fcPZ#tITjh4YzsyNhcHxJMd" + "Rt3yUKtUdIVHqoaKTvP55JWqGU5FaXNRl1Uda#pY7omgsDA5FU4p8W2plQ4t3rK$OhfsNFZ" + "xGdz4YMDN6dKxqBd$85KJA2bJKodiIG#LtG4Vgn9dxyukUywFSkrLZi7dOavYlti9Cn3PPo" + "D99OiQFrXZWQxwJKCatlOVYwb3oYFNpDFnd7weAcfu#1R5H5NcnKPRMSg5qnwbAi4P9TQXl" + "9n1v7lc2$IDdxAKjvzhnTK$OiD4ABqchP2sRYt9za7$POphvvcFk#ZdbaTCXGxqLUmDBUHs" + "ZQqVSZppsmU7WVWN$LktnFU1FCtnQuuZw2xyTPCcRAjwuN3KjHam5BbgBE82dB#lJvBekhp" + "tWeSn34C0THqiGllL6RM9vq5hf0USRyv6nRsCJJWpo9#yufX2xtVuRDdOGyS03MamYPzWaX" + "qpjWNHBh8ApROJqQwnc4M2uXRViIqh4ZVDx0Vd$i$yR#AKAEUH7fqnaaEUOlGlwp2jPTi8x" + "1UW$MzmXfSpOXnmBxs7MmxeFr8gmFO$sQaECMnxe9rb5OhoRaj3ROFqz8pok0#peX7GOGOb" + "#0$Gs4BBiXz5zW3xjbaTToksDz0EaZ2UbIHyZ5jV1V3V7BmFT4GYfM0iOBs8EBqmdxZx0$2" + "aHNn$vPx8TXlGM3#ckmG$lhVIRqxnEorYlO$uYqVsDz56dBOpsDa57BeFxg2QcXzOXrrB#W" + "VucG7ISW3awZBiTw1o6tVO2L#X#1zJgKVnxquDqUFZNN4d9PP#Ysn1uyRhqPuPd8ipyuBui" + "zodthfy3y4$6nXDIs9MGdS6#FS#TEXsF5yTW9M5rmV2o7aEfB44TTEEDWUp0XE#y9F$1PwN" + "Q4KQVEuzYZF3k3movR07zx#EqBlgCHH$dQmlVMty05xU2sNeGiRs45dnLmx5T4safp2Uc6U" + "bbv0zGFi7jFnVen8NqgWFCqkFT6sM2tooDONqMHSOntxOCLvTiL77P5$RL7sx5xWDyi78EN" + "2Mat3HYhecw#HTevX5GE10$uL4u2ttxOe#pjWLU5uzkX2dlasU5AfA7Dk3XM7Uw6FTfi1VO" + "Tgx72joEETILisw7zTiJnhaHTLEBOLww1lD7cEfuE7ApMjWYZVgfGnzKR8Vryw52NrMXV3k" + "gh0lNTQG$iqOuhKATjmQVYBkpF1IVKstauvXrGL$REuB8OscDNGaQZlM#DOsg3pzPeNwSTX" + "3twXTCUwOZtd4t8jYZJPJTXlndsgAVXQ2kNewwtHzkz71ndZCSUnsF$tx77SP#2$dBv3BG3" + "O5wEOtSeZlqLZS06Zoisnlu9h1uXf#EQvmhmFXrjxOfhi4UVFXtjumgK$OmksEFOd87o7By" + "28TkXZMw7VZk#EtGes$ZTi0VFCy5p6vItBOvhNxILjT1spqDzL4mcP7qSf$RWFXxjhl8XyD" + "qLuVi9MHNzRLkqvTw3KL#7mXRvjSCnNXzjfJVAUHwERINwzlheSrLekzi3QmUC7pE0tm$zO" + "3pogaITzGEFRN2yji4uCHdzfjztQ5CutfKz2UcFzjh$Ul127LHkWp2uLwBibU0o03m607C2" + "#eOBhXCmJfo9upaGUGmSWHNjPz0IE5Q$m1vy1g5#1iqXP8DkX9o$57GemmOO2cSyXlqxX6o" + "8DhGXnfaDloHa8zekKFVjraGORR8tneRpjq8vC3PjXBuo0sMSW6Cy1VKx0MtfzeknHryu3E" + "aJVWKFZ3qJLyGUvPYu0$O$478MwkOiy9g8VdSRnhlRq7udebtTZh5kuhlOevuglm4csj9ar" + "44Fj84xq9QdeCrLhOmLuVEFnHwSDaOVxe4nhYDmdRLm7D3dDaPViz3NDy5OlSbGwD56jyKu" + "Upx6bohuzHa2FSRfJN7SDaNVg0BdAepBvwC$LI6lFgYFJJ6UkoL2haJREmjjPTYHX5nW8nq" + "ucw6i5o3lgkCGFXvvVGwRjt2ixYNaNhIHiu5RXMEr6V0kGFxjCRxUYtPtzjR0nBXyByRFir" + "5lLJ$31yVwNhJJir7t7J1Utujn$coqiIuO6tP0UMtuTS0nw8qwkN9Tr0FQmPNGt$4Vx2$57" + "cMw4cF97V2xydkSnb3cIHYRX#4uJa9xt0iS9s6T0jwJCBulZt5s4coNHpclmfYvF8vn5VHL" + "oo6ECQyZ#jzLE1Tqn5Xm5LORxUigZ84EyhhgA#Z1$sgqPHjzxkfDKHwSEwz6tLIXdroDyRq" + "QEDMR4x8vygd6k5UDjb8D7WHZyzKOFzkWRr#DUgr66xi6xReQTR8IodCDZicgUs6F$h4gsl" + "8rE9UjYhPs3SQcrJ1ENOjyLxiAUvoFLvkF$I4uTM4ykXPZuUeO1wv57Q#EMTYr63FMGF#z3" + "cFH6gYZDZyXl1FuutooF$ZiZpQwFyhH0PolEnNbEGmh#kjrE3zNeUwgKM$NuRndVmWVZDNN" + "OsplYBPuFS8Lj3neqzVlXtC2oduzsjqAECxLQEkTSEoNUn0wZ6zJC3PVZ$gOWdFw3QYF1r1" + "VDw3FheZsVSC9A2$uFO1sVyDjE5uuPzpm9lPxOqKxl15OTw8jt0ZzdJYUDw9ExWBtk#1$5$" + "hINJYdtdWXzk1v8$Av6#tpRenxTuFJZU1vDyRIcz0$xduIA$fxDSQZQfo$BZWFUnp3pT7Eg" + "r6FrJT21xxLw2kROxxJ0MtO1Vu5Q0$L62$MnlbZ2vo7gv77XHZRgr6UjP775i2lnbZhOkow" + "46Ner0vwjByjqFywmUv2Z2sTK5VhO5pP4iT#I#Ip9UmxOEpjX7DO9#Wkn5ZP2VrsAyGxehp" + "jCJPTYB6t4yR$TS1rg$iGnhdYGenndT2$ra6x6Lo9CBYtHprTXF6Z4#O6wsBi7WoVJcY$5r" + "5id5$NHTyQZFgx2Msm4yRJcu2t1lfo9thUmV5eX$0gQDyTqFPxuznRWJ7f79nppm7EEHZpp" + "i4uTGx6tdDnxZiNRVXSZAtddemL$UnSS3mNOvurcqxmCCRXN7duSApe9vqmXX#AyUSKzDLE" + "6BCEVmvxzE$3qHwhKBUTq9QhCUPqGdmisdurnjIEIAz0FLJiY7CIsb4NZESTWTyLv$5JK8w" + "k65ShK1Sr6C#xOTvLYJPVZNe#1Vsi2zfj5upXowCEbiTOiZpwoGgObzHWl5a1nxS6xQOA$M" + "iiuhLevxNWLuSvOnrywt6khKTwFOvR0t0RaDw0z4QaDoAzBzO3K7ShO1ogGVblmZcb1ctd0" + "EIn8kgl1ctnG9Hr9OphDKYx2MDL3VWV29oLS1wfGHtkXd6Z1hONWLiDwk9sdBDh$e0DveWh" + "eNyj1WwrwDEBWKSjsl1Dg9zQd7jhSHvS3BnSd1FQO3pgYlFZuk3O5SUxFThdM9mVRiOuMOk" + "wgCNSUt7aUH3wM2tiQd7kl1bpabgqargqqyLHfWuu9zQY$Io1iYs1SdM0JoquB8dybqJU5w" + "5Frk9uBuayQz5$QZ6UtOnvM2twUMVaMmVi3kWJdJ1cT4PUDJZcTPW$TARrYUDo2kQ1TPZ7r" + "E6urs3CQelnhJrmgr6UEeovxR7lXBdClPW3j4ETT4GvEc6yhqDVhmItEindbWAtMlINcz4U" + "7M0j1PuteytKuRopD7Xsn3cj8uv7D#Ix8iQELT1cTaDRt1rjunRCmOTZVDu3RVKMu7H5d##" + "6DdqBsaSTnlrkc2$KOSofGnjU6MFPqk3M1cFiogY7bJ56B8roBqFBYVFlCYXVEvItZkQDCj" + "#7$jmDTTeDzLE7zdeBsbKTskn165DM0PSwzEjwzCi#E8whe1$S1mxr2FT1krqJvz0gSAd7k" + "N0PMbSeMntgj0xjkmvZGHtwzdQe#uCmljIXZkfHfbiGhqS$F1YOzGtOurZMO#oinpXx2zfE" + "FUOk1sEygaT$gKUxEmIOzQY3YsWQyhi7us0zqW#cSSpdwZ6$k1NpXNgKxH2SD#jnBks3Syr" + "ej9rwZFSkobsF#kc1V8v7NrfrRUpXkohcnYTWRhGgvgOduDmn1EUCYm#4BSvBzU2x6ifkuv" + "nqCOvrFTfuFNYlXddd49n$Ag2lnxdnOge7PZtEjQjXF6g3iRmUvRyOTTA0CQ#X1kSh7FyX6" + "0#NWwuDpd#N0BS1VQ01ntHrzDksw7CD68SkGTqquDWru7YiZh9q19S6z9bBS4mRC5OqOBnV" + "7VNPW7gx16sh0NNNW3d06ZZlLg8VD61EqWR7fW7zgVqKSCHylGxj#JvQZpYFrQFDNO9hsGQ" + "SSwfnVZq1VNXDSBY7veinf1VQV2#4Ay6p2dNGWBbR0zhHFHYZ6t2yAj26gZ6FweFnznxKIG" + "FE4#qnRZHWhEw1ut42EAyn4NkSizP0lYVYdB4cZjM960SRWD4Mvv8ZmBCZsjyH65iRCBPsn" + "9Xn2jfX0uxL4HZpJaLTdOhpogcuVZaLu#sfEFQdebsDGRsCmN4RWp5z3Ffj0yxvOz0MBa7R" + "R8VpP0FwG0FcVqUYFYv5tsd0#U18rFcbAFkb64yQK8VLw6SduXYlIUiDuvMBS0FcHvTYp6$" + "0lEKyUapG1c$3#R81$NTDS6X0VsY3SR01Oykb64yQC0PMezyUYVmRK1z7uhot2lhDaVGQ3x" + "eZmSV6EUeer6S3sijH2BT7FPw8CQS1xUGaZECDc0TqGljgm5oo0UM$1zSO3S3k1NwzS3rJJ" + "S#7gES6u3PW3Bq7Sy86p34hqMSxWLiVd7ScOmxJW6kUAgGtuBpU0#tv91oBDT7dJy8vPKqS" + "vvDm37jXVdGIjK5$N1DzQ3Aj6yohUc6SwWMS6inrQf1l3Vh9oRYEE1bppvF1jn7pthR0E8g" + "EPSZ$AFYsnTXt5EPB5QYxez466z6EAZ2ETa1zDk8OD#9wz6WSkqPWL6ECF1fjfX7zycYqxq" + "QCsuredvCn3sn4Ewp2EQKMPUY8zj6DZbdOhunvtgquRlKuftT36scFDj4HxQKRpWKhOuwoC" + "evD1xI33ZY$DeBBqUXlxO5vDChI2DnZS4vfnB4w1luhetrUYlFQE70QXxuw3jS3ut3k6eTZ" + "C0vrqOY#Nulss8Ynkn5ZtsISjnfHTsl1PYtKVoskEslH$nen7ZUYl9Ff7csb2ksY5kDi8$P" + "rE3UEGTssntN2CMZVbQZROz0s6j6kwj2UriPOD9boHVliX3b98#QlFQ4x6UU4Nh0$6VElNk" + "W79wDjh8NnSpJcHureyzMeptQeXsewnyAOLOssqOZvRoVqxKRmwuGvNWVqYwauHjCnJvoA#" + "S1KrFLKv3CLxQSIPIUmjsZzesrCnVW$5SUw4SUg4Nsc4kso7UOWKz5M6p7VcuOwcevpopJK" + "tJISmwQZlyr0N#Y0yMCQsj8qZ3KpS7ndW4iZdSlWU4n3cst4ED49nw4MFEhGzkeNu$VP9g$" + "3zolGkHlcWCwJD6vQORS5trjz#9wCvVj3waARGozDmyYo0hyNtpiRwTFRp3BxJZbMuNksm1" + "l6z$RHVD#sezWFYVe#iB4err8Y$$FD#IptKVRok7T4uxVXkBdeVmHzrFsslF$WkUQqbMBOO" + "vyFmzllQ$PpneNXTht5lc$MCeM#Mv#MtRPhUxvlqoQgRxyqtvCp1JVHFjiV9FRYEBOV4$fO" + "9qOns0qJ5lPz$xreMXkSYwnR5T#Nekdk3cREzd42$w5Gj#k3IRljAgBnNR$Hu#rm7zyVrbF" + "in$7zYklp$N7Ny$teDVd#WDtuljDTV5$VbUyR8ySMyIVvVh6keMwnCyJ#yoIFnJSL#vjYvJ" + "qh3EzsKZHjhn$3yBvlXk4ANFyvmtdO6QJuFnlFDugtzmhcj0gSboekZkbkLCBlAFbipU$9B" + "T4cZiFJks9ktHPZERbRoNkdD6wXNNid3E$U64qRlGtV7t0ptzVKytszgFSbzXNx9wD#DSU5" + "uGD#vVi3D#7xBdt3j0UsIlBPVIyb$N2#hpmlrBN5UTZwI#Yl4pwYxP1vKIpdloBz3v7#PPY" + "sf6XdbRWM6B9fgD$xz32yZA9VvYPXBygpDuvV5UOFoxO9RPRTc#$RqNa5pb$BFXgcBRTq6A" + "uIutILEByiAUfpoS$vlhDek$KYtY3YDH$oVQs8rmfE1rugzf$m$K7Y$D9rBxuVVQ3OdyNtn" + "miUtUVo$M5JnNvRlZzqi2ZZkto$mxkIksw5$M5ylqztlj$$Wp1jf2lsWjF8eM8loZvokjYB" + "ikvN9$Q3nFvWiPyWza#5s8UDqlCvxAqmV4Hr63v#sJ0y#aQndnNg3Zf5x4MzT7qaJAjh8$Q" + "YpTU9yUZWPSN#aD2sGHoNHgLjT1QwfGJEKebp5tG2S#ckKVtIedqihHddXboiqRqVXZlWsg" + "WQrp9xY6FJSRCmRG$H3Yj4lFeshBXEs6EMqEyPslwhIkXcnlDJR8Q4uOwOGrTZllOlsM#ML" + "En#5BhEVDy9S#vgNAVjEK3eZmbjzpn7wFx3z$limVS7j4tcR$SqSSkoWaTl3UOzVB$kiGQV" + "xc5uXpsIwTj#68tlSEQ2SMnpueBvhtjZ6Dv7zC4LbFFUkdyewG$n$NfRXhfX#ulz0tn$qPR" + "2vX9zVljyo$UTn9Yz5gxNslw4iNaIZxUjmRWc#ji8qPTglX2OxuOu8xRBLyxXxPAw4QU4uT" + "g9EFUzWtMiebFcKBVs5Jfb37UKi7ietqzvWUyhTWlJAbwCvNkl4lua8$zDCCRKyl31ojni#" + "EJolewVddxRLz7ulkAytdUbKDVEGPyJn#M1tVblIbMhPU7EVLPH#lk#cmYTE3#kSeUI9iQW" + "LNu9TNkr4$kT#VwYJ$c##m35Jyn9kfyPwlPVcUyhbkTxIpnluGxX#xRYEgcjCa$Qy$Kazty" + "ldzHLhIBI3ecd2VsCQBp#FwWpSJuUQfYt3TNEow6$IgFxAgdhS0BVLzjH$HHbZ9$QxlygE$" + "FWA8ee3dVFp6QpoqqIvGQnE3n0xW1g8OXbQQbLMiK$bdz0bIMA8YhnWc2uhuJB4mKlK2u59" + "K4kaKj10K4y00752m4v51K44Io$xdwRcMGtAbLyzNlz#lLxtRCpFRERseMuUf5rp5PgmGvd" + "#sUOPuLdOETV$8V4zWbzfVAyNkEWKq$U8mTbJhFEEOtV58v9oZMIiq1YvZaTUZgCAQxo6Ja" + "JxlC5Fo5v9NznVjW$Tv$JH57egwcTwhuLSzqcvvdvN29PJ9pSgu9k5UC2sRjo3ians2bjUM" + "QfspzzdWEdXRRt7llsYh1TsjDfR1RF2itInvQcNjUb4L#9qrf5adEov93xSdo6w66dIVEPI" + "2V6RHH$NseD2FDbLtZ6a7go9#VU9JdMIxk$qwnJJlspue$S#vAznNTBfRNiadcFS5hZUcAc" + "XFtzveIswiCSEj8$jVBSmfZSEwlg#pUOymsybuyy5vN9tbfz2JbtfyUNDPTvo$dkSptVd2z" + "haBNaojuVhAHlceoxmsbjUU$aoJaJasEOBVULr7l#tECoZo7YN#qqpnELSpG#lkgrnPT9xA" + "sL$7B$pYjE7zD2xilBRrUgvOqmr$sDijKQV0lH0FgPlo5LLTUDjsiSgQzJMZqh313k5UxBm" + "42XMFWJVe0IvLdknZRqXtkKhwzK6Zp1j9NuhDzyEn8yjGlTHOmcvYhw35U3#Ny4TzDd#1fx" + "dugfrTWfdh5uwcdq$s9###fv5GYnY1gor67olSzSsbA$BR5lCwS4TWB$ASP7EPE1xOpPJiw" + "js5knDw0Rq8sCFurj#1jxF$NsKyyHZwWXkxozXlWrZ5zb2TIxpAqTysd7lAv0GPqbtr$eEU" + "BFCTQHYAWXgGvHqn6tB2NdKd8wOke8UOxW#vZSxSdTdbf9j1BgD$GYOh#t#4AWE#3lW3qTr" + "XAtblubQ8ftQ9TPVFKYxKoyT9vyae5NMCkhhEypU8tsozJx55wdzWkqgsAEYkcEhACZwtTu" + "kXDhweHMXshOrSXnZ5p7q5dK#HpcKcSsn$WBbT2N4MEud7m$Mtmrp#Af#UXyT07w9hp1s8M" + "e8z1j6DU6EZMOXqVS8loBYBcVF2c#X0zWiSLNZrY2SdtOeNro#UJu1VzCT2RwM3anDPYumP" + "nZZcprE6t30#IDyY1Z7u8di1sUeDKGT2WCmnvcrTc5v2caHagBy1LHDyLmsiEj#ce4zWYhZ" + "b6qHrcjo6ZyewtwQWps67GyEXwTW4v09w8JqKde97GoEfdwJw66aVZEX#SuXZtjjUvPfhlp" + "WlFKC$kFlHRCDR#CTIxZDQj9VsVydNaDQwaiY8FEoAMoRqs9C9KS#VJbawSsTNx4b#8WyGV" + "nEGBTbRYksDFmFycuS8yr1FPQCjV2MvoREvX737yCVtJUonc$79yZfewIwoW#Hn1HGqntOs" + "mtyjH1wr3FuKVK4EWucaLC5lcEmo7ECKUsPJ1p2ab4zZn38gA6P7axjOyvgaNKK3rjBm$L4" + "2$VvnnPQXp7O1psM7GiQot1LqBC2kQy2TycV8RDj3TRzTK9x1DMVTsSTJUtwgi2nXPGeu2v" + "5Z1FHpAjlOUyUuZVYUvaR0x7AGVjZdR7$o5#mqV2hmvTrw5MKdybSTlGRUZlQ26r2wbTIAr" + "2wlo4xm1z1uZ$pkAhlUXU$5yvzBKMN$T6UwEvQ2uryj0yz0BqOc9JzzzlgF4jc7lGAexP87" + "o3o3k8TaLD#Vr8knpTCaAhSZn1wnOMJz3wGekVaNhqrRCQKXzVVQlfDA2lWTN$fY6n3Qs6D" + "CBNoAgl6sCtjkhh9jXDhFgwANPJgxxEniwswklMsAsvXWoNO1lCBnS#cexknNDIBpImtoJG" + "#Xhq6lfEyjXsadOFsZrebz8kHTUZwz5rw3hwcz7V3Es2Ti6$1VyMr7mVo$mQ0UziWCSj#is" + "$6Vy0zJvlfG=="); // Generated from soot/JastAddJ/JastAddJavaParser.all class Events extends Parser.Events { public void scannerError(Scanner.Exception e) { errors.add(new Problem(null, e.getMessage(), e.line, e.column, Problem.Severity.ERROR, Problem.Kind.LEXICAL)); } public void syntaxError(Symbol token) { int line = token.getLine(token.getStart()); int column = token.getColumn(token.getStart()); int endLine = token.getLine(token.getEnd()); int endColumn = token.getColumn(token.getEnd()); String value = token.value != null ? token.value.toString() : Terminals.NAMES[token.getId()]; errors.add(new Problem(null, "unexpected token \"" + value + "\"", line, column, endLine, endColumn, Problem.Severity.ERROR, Problem.Kind.SYNTACTIC)); } public void unexpectedTokenRemoved(Symbol token) { } public void missingTokenInserted(Symbol token) { } public void misspelledTokenReplaced(Symbol token) { } public void errorPhraseRemoved(Symbol error) { } } { report = new Events(); // Use error handler in parser } public CompilationUnit parse(java.io.InputStream is, String fileName) throws java.io.IOException, beaver.Parser.Exception { CompilationUnit cu; errors = new ArrayList(); try { JavaScanner scanner = new JavaScanner(new Unicode(is)); cu = (CompilationUnit)parse(scanner); } catch(Parser.Exception e) { // build empty compilation unit for failed error recovery cu = new CompilationUnit(); } catch(Error e) { cu = new CompilationUnit(); errors.add(new Problem(null, e.getMessage(), 0, 0, Problem.Severity.ERROR, Problem.Kind.LEXICAL)); } for(java.util.Iterator iter = errors.iterator(); iter.hasNext(); ) { Problem p = (Problem)iter.next(); p.setFileName(fileName); cu.addParseError(p); } return cu; } protected java.util.Collection errors = new ArrayList(); public JastAddJavaParser() { super(PARSING_TABLES); } protected Symbol invokeReduceAction(int rule_num, int offset) { switch(rule_num) { case 0: // goal = compilation_unit.cu { final Symbol _symbol_cu = _symbols[offset + 1]; final CompilationUnit cu = (CompilationUnit) _symbol_cu.value; return cu; } case 1: // type = primitive_type.t { final Symbol _symbol_t = _symbols[offset + 1]; final Access t = (Access) _symbol_t.value; return t; } case 2: // type = reference_type.t { final Symbol _symbol_t = _symbols[offset + 1]; final Access t = (Access) _symbol_t.value; return t; } case 3: // primitive_type = numeric_type.t { final Symbol _symbol_t = _symbols[offset + 1]; final Access t = (Access) _symbol_t.value; return t; } case 4: // primitive_type = BOOLEAN.BOOLEAN { final Symbol BOOLEAN = _symbols[offset + 1]; return new PrimitiveTypeAccess("boolean"); } case 5: // numeric_type = integral_type.t { final Symbol _symbol_t = _symbols[offset + 1]; final Access t = (Access) _symbol_t.value; return t; } case 6: // numeric_type = floating_point_type.t { final Symbol _symbol_t = _symbols[offset + 1]; final Access t = (Access) _symbol_t.value; return t; } case 7: // integral_type = BYTE.BYTE { final Symbol BYTE = _symbols[offset + 1]; return new PrimitiveTypeAccess("byte"); } case 8: // integral_type = SHORT.SHORT { final Symbol SHORT = _symbols[offset + 1]; return new PrimitiveTypeAccess("short"); } case 9: // integral_type = INT.INT { final Symbol INT = _symbols[offset + 1]; return new PrimitiveTypeAccess("int"); } case 10: // integral_type = LONG.LONG { final Symbol LONG = _symbols[offset + 1]; return new PrimitiveTypeAccess("long"); } case 11: // integral_type = CHAR.CHAR { final Symbol CHAR = _symbols[offset + 1]; return new PrimitiveTypeAccess("char"); } case 12: // floating_point_type = FLOAT.FLOAT { final Symbol FLOAT = _symbols[offset + 1]; return new PrimitiveTypeAccess("float"); } case 13: // floating_point_type = DOUBLE.DOUBLE { final Symbol DOUBLE = _symbols[offset + 1]; return new PrimitiveTypeAccess("double"); } case 14: // reference_type = class_or_interface_type.t { final Symbol _symbol_t = _symbols[offset + 1]; final Access t = (Access) _symbol_t.value; return t; } case 15: // reference_type = array_type.t { final Symbol _symbol_t = _symbols[offset + 1]; final Access t = (Access) _symbol_t.value; return t; } case 16: // class_type = class_or_interface_type.n { final Symbol _symbol_n = _symbols[offset + 1]; final Access n = (Access) _symbol_n.value; return n; } case 17: // interface_type = class_or_interface_type.n { final Symbol _symbol_n = _symbols[offset + 1]; final Access n = (Access) _symbol_n.value; return n; } case 18: // array_type = primitive_type.t dims.d { final Symbol _symbol_t = _symbols[offset + 1]; final Access t = (Access) _symbol_t.value; final Symbol _symbol_d = _symbols[offset + 2]; final List d = (List) _symbol_d.value; return t.addArrayDims(d); } case 19: // array_type = name.n dims.d { final Symbol _symbol_n = _symbols[offset + 1]; final Access n = (Access) _symbol_n.value; final Symbol _symbol_d = _symbols[offset + 2]; final List d = (List) _symbol_d.value; return n.addArrayDims(d); } case 20: // name = simple_name.s { final Symbol _symbol_s = _symbols[offset + 1]; final Access s = (Access) _symbol_s.value; return s; } case 21: // name = qualified_name.q { final Symbol _symbol_q = _symbols[offset + 1]; final Access q = (Access) _symbol_q.value; return q; } case 22: // simple_name = IDENTIFIER.IDENTIFIER { final Symbol IDENTIFIER = _symbols[offset + 1]; return new ParseName(IDENTIFIER); } case 23: // qualified_name = name.n DOT.DOT simple_name.i { final Symbol _symbol_n = _symbols[offset + 1]; final Access n = (Access) _symbol_n.value; final Symbol DOT = _symbols[offset + 2]; final Symbol _symbol_i = _symbols[offset + 3]; final Access i = (Access) _symbol_i.value; return n.qualifiesAccess(i); } case 24: // compilation_unit = package_declaration.p { final Symbol _symbol_p = _symbols[offset + 1]; final IdUse p = (IdUse) _symbol_p.value; return new CompilationUnit(p.getID(), new List(), new List()); } case 25: // compilation_unit = package_declaration.p import_declarations.i { final Symbol _symbol_p = _symbols[offset + 1]; final IdUse p = (IdUse) _symbol_p.value; final Symbol _symbol_i = _symbols[offset + 2]; final List i = (List) _symbol_i.value; return new CompilationUnit(p.getID(), i, new List()); } case 26: // compilation_unit = package_declaration.p type_declarations.t { final Symbol _symbol_p = _symbols[offset + 1]; final IdUse p = (IdUse) _symbol_p.value; final Symbol _symbol_t = _symbols[offset + 2]; final List t = (List) _symbol_t.value; return new CompilationUnit(p.getID(), new List(), t); } case 27: // compilation_unit = package_declaration.p import_declarations.i type_declarations.t { final Symbol _symbol_p = _symbols[offset + 1]; final IdUse p = (IdUse) _symbol_p.value; final Symbol _symbol_i = _symbols[offset + 2]; final List i = (List) _symbol_i.value; final Symbol _symbol_t = _symbols[offset + 3]; final List t = (List) _symbol_t.value; return new CompilationUnit(p.getID(), i, t); } case 28: // compilation_unit = { return new CompilationUnit("", new List(), new List()); } case 29: // compilation_unit = import_declarations.i { final Symbol _symbol_i = _symbols[offset + 1]; final List i = (List) _symbol_i.value; return new CompilationUnit("", i, new List()); } case 30: // compilation_unit = type_declarations.t { final Symbol _symbol_t = _symbols[offset + 1]; final List t = (List) _symbol_t.value; return new CompilationUnit("", new List(), t); } case 31: // compilation_unit = import_declarations.i type_declarations.t { final Symbol _symbol_i = _symbols[offset + 1]; final List i = (List) _symbol_i.value; final Symbol _symbol_t = _symbols[offset + 2]; final List t = (List) _symbol_t.value; return new CompilationUnit("", i, t); } case 32: // import_declarations = import_declaration.i { final Symbol _symbol_i = _symbols[offset + 1]; final ImportDecl i = (ImportDecl) _symbol_i.value; return new List().add(i); } case 33: // import_declarations = import_declarations.l import_declaration.i { final Symbol _symbol_l = _symbols[offset + 1]; final List l = (List) _symbol_l.value; final Symbol _symbol_i = _symbols[offset + 2]; final ImportDecl i = (ImportDecl) _symbol_i.value; return l.add(i); } case 34: // type_declarations = type_declaration.t { final Symbol _symbol_t = _symbols[offset + 1]; final TypeDecl t = (TypeDecl) _symbol_t.value; return !(t instanceof EmptyType) ? new List().add(t) : new List() ; } case 35: // type_declarations = type_declarations.l type_declaration.t { final Symbol _symbol_l = _symbols[offset + 1]; final List l = (List) _symbol_l.value; final Symbol _symbol_t = _symbols[offset + 2]; final TypeDecl t = (TypeDecl) _symbol_t.value; return !(t instanceof EmptyType) ? l.add(t) : l; } case 36: // package_declaration = PACKAGE.PACKAGE name_decl.n SEMICOLON.SEMICOLON { final Symbol PACKAGE = _symbols[offset + 1]; final Symbol _symbol_n = _symbols[offset + 2]; final IdUse n = (IdUse) _symbol_n.value; final Symbol SEMICOLON = _symbols[offset + 3]; return n; } case 37: // name_decl = simple_name_decl.s { final Symbol _symbol_s = _symbols[offset + 1]; final IdUse s = (IdUse) _symbol_s.value; return s; } case 38: // name_decl = qualified_name_decl.q { final Symbol _symbol_q = _symbols[offset + 1]; final IdUse q = (IdUse) _symbol_q.value; return q; } case 39: // simple_name_decl = IDENTIFIER.IDENTIFIER { final Symbol IDENTIFIER = _symbols[offset + 1]; return new IdUse(IDENTIFIER); } case 40: // qualified_name_decl = name_decl.n DOT.DOT IDENTIFIER.i { final Symbol _symbol_n = _symbols[offset + 1]; final IdUse n = (IdUse) _symbol_n.value; final Symbol DOT = _symbols[offset + 2]; final Symbol i = _symbols[offset + 3]; return new IdUse(n.getID() + "." + ((String)i.value)); } case 41: // import_declaration = single_type_import_declaration.s { final Symbol _symbol_s = _symbols[offset + 1]; final ImportDecl s = (ImportDecl) _symbol_s.value; return s; } case 42: // import_declaration = type_import_on_demand_declaration.t { final Symbol _symbol_t = _symbols[offset + 1]; final ImportDecl t = (ImportDecl) _symbol_t.value; return t; } case 43: // single_type_import_declaration = IMPORT.IMPORT name.n SEMICOLON.SEMICOLON { final Symbol IMPORT = _symbols[offset + 1]; final Symbol _symbol_n = _symbols[offset + 2]; final Access n = (Access) _symbol_n.value; final Symbol SEMICOLON = _symbols[offset + 3]; return new SingleTypeImportDecl(n); } case 44: // type_import_on_demand_declaration = IMPORT.IMPORT name.n DOT.DOT MULT.MULT SEMICOLON.SEMICOLON { final Symbol IMPORT = _symbols[offset + 1]; final Symbol _symbol_n = _symbols[offset + 2]; final Access n = (Access) _symbol_n.value; final Symbol DOT = _symbols[offset + 3]; final Symbol MULT = _symbols[offset + 4]; final Symbol SEMICOLON = _symbols[offset + 5]; return new TypeImportOnDemandDecl(n); } case 45: // type_declaration = class_declaration.c { final Symbol _symbol_c = _symbols[offset + 1]; final ClassDecl c = (ClassDecl) _symbol_c.value; return c; } case 46: // type_declaration = interface_declaration.i { final Symbol _symbol_i = _symbols[offset + 1]; final InterfaceDecl i = (InterfaceDecl) _symbol_i.value; return i; } case 47: // type_declaration = SEMICOLON.SEMICOLON { final Symbol SEMICOLON = _symbols[offset + 1]; return new EmptyType(new Modifiers(), "EmptyType", new Opt(), new List()); } case 48: // modifiers = modifier.m { final Symbol _symbol_m = _symbols[offset + 1]; final Modifier m = (Modifier) _symbol_m.value; return new List().add(m); } case 49: // modifiers = modifiers.l modifier.m { final Symbol _symbol_l = _symbols[offset + 1]; final List l = (List) _symbol_l.value; final Symbol _symbol_m = _symbols[offset + 2]; final Modifier m = (Modifier) _symbol_m.value; return l.add(m); } case 50: // modifier = PUBLIC.PUBLIC { final Symbol PUBLIC = _symbols[offset + 1]; return new Modifier("public"); } case 51: // modifier = PROTECTED.PROTECTED { final Symbol PROTECTED = _symbols[offset + 1]; return new Modifier("protected"); } case 52: // modifier = PRIVATE.PRIVATE { final Symbol PRIVATE = _symbols[offset + 1]; return new Modifier("private"); } case 53: // modifier = STATIC.STATIC { final Symbol STATIC = _symbols[offset + 1]; return new Modifier("static"); } case 54: // modifier = ABSTRACT.ABSTRACT { final Symbol ABSTRACT = _symbols[offset + 1]; return new Modifier("abstract"); } case 55: // modifier = FINAL.FINAL { final Symbol FINAL = _symbols[offset + 1]; return new Modifier("final"); } case 56: // modifier = NATIVE.NATIVE { final Symbol NATIVE = _symbols[offset + 1]; return new Modifier("native"); } case 57: // modifier = SYNCHRONIZED.SYNCHRONIZED { final Symbol SYNCHRONIZED = _symbols[offset + 1]; return new Modifier("synchronized"); } case 58: // modifier = TRANSIENT.TRANSIENT { final Symbol TRANSIENT = _symbols[offset + 1]; return new Modifier("transient"); } case 59: // modifier = VOLATILE.VOLATILE { final Symbol VOLATILE = _symbols[offset + 1]; return new Modifier("volatile"); } case 60: // modifier = STRICTFP.STRICTFP { final Symbol STRICTFP = _symbols[offset + 1]; return new Modifier("strictfp"); } case 61: // class_declaration = CLASS.CLASS IDENTIFIER.IDENTIFIER class_body.b { final Symbol CLASS = _symbols[offset + 1]; final Symbol IDENTIFIER = _symbols[offset + 2]; final Symbol _symbol_b = _symbols[offset + 3]; final List b = (List) _symbol_b.value; return new ClassDecl(new Modifiers(new List()), IDENTIFIER, new Opt(), new List(), b); } case 62: // class_declaration = modifiers.m CLASS.CLASS IDENTIFIER.IDENTIFIER class_body.b { final Symbol _symbol_m = _symbols[offset + 1]; final List m = (List) _symbol_m.value; final Symbol CLASS = _symbols[offset + 2]; final Symbol IDENTIFIER = _symbols[offset + 3]; final Symbol _symbol_b = _symbols[offset + 4]; final List b = (List) _symbol_b.value; return new ClassDecl(new Modifiers(m), IDENTIFIER, new Opt(), new List(), b); } case 63: // class_declaration = CLASS.CLASS IDENTIFIER.IDENTIFIER super.s class_body.b { final Symbol CLASS = _symbols[offset + 1]; final Symbol IDENTIFIER = _symbols[offset + 2]; final Symbol _symbol_s = _symbols[offset + 3]; final Opt s = (Opt) _symbol_s.value; final Symbol _symbol_b = _symbols[offset + 4]; final List b = (List) _symbol_b.value; return new ClassDecl(new Modifiers(new List()), IDENTIFIER, s, new List(), b); } case 64: // class_declaration = modifiers.m CLASS.CLASS IDENTIFIER.IDENTIFIER super.s class_body.b { final Symbol _symbol_m = _symbols[offset + 1]; final List m = (List) _symbol_m.value; final Symbol CLASS = _symbols[offset + 2]; final Symbol IDENTIFIER = _symbols[offset + 3]; final Symbol _symbol_s = _symbols[offset + 4]; final Opt s = (Opt) _symbol_s.value; final Symbol _symbol_b = _symbols[offset + 5]; final List b = (List) _symbol_b.value; return new ClassDecl(new Modifiers(m), IDENTIFIER, s, new List(), b); } case 65: // class_declaration = CLASS.CLASS IDENTIFIER.IDENTIFIER interfaces.i class_body.b { final Symbol CLASS = _symbols[offset + 1]; final Symbol IDENTIFIER = _symbols[offset + 2]; final Symbol _symbol_i = _symbols[offset + 3]; final List i = (List) _symbol_i.value; final Symbol _symbol_b = _symbols[offset + 4]; final List b = (List) _symbol_b.value; return new ClassDecl(new Modifiers(new List()), IDENTIFIER, new Opt(), i, b); } case 66: // class_declaration = modifiers.m CLASS.CLASS IDENTIFIER.IDENTIFIER interfaces.i class_body.b { final Symbol _symbol_m = _symbols[offset + 1]; final List m = (List) _symbol_m.value; final Symbol CLASS = _symbols[offset + 2]; final Symbol IDENTIFIER = _symbols[offset + 3]; final Symbol _symbol_i = _symbols[offset + 4]; final List i = (List) _symbol_i.value; final Symbol _symbol_b = _symbols[offset + 5]; final List b = (List) _symbol_b.value; return new ClassDecl(new Modifiers(m), IDENTIFIER, new Opt(), i, b); } case 67: // class_declaration = CLASS.CLASS IDENTIFIER.IDENTIFIER super.s interfaces.i class_body.b { final Symbol CLASS = _symbols[offset + 1]; final Symbol IDENTIFIER = _symbols[offset + 2]; final Symbol _symbol_s = _symbols[offset + 3]; final Opt s = (Opt) _symbol_s.value; final Symbol _symbol_i = _symbols[offset + 4]; final List i = (List) _symbol_i.value; final Symbol _symbol_b = _symbols[offset + 5]; final List b = (List) _symbol_b.value; return new ClassDecl(new Modifiers(new List()), IDENTIFIER, s, i, b); } case 68: // class_declaration = modifiers.m CLASS.CLASS IDENTIFIER.IDENTIFIER super.s interfaces.i class_body.b { final Symbol _symbol_m = _symbols[offset + 1]; final List m = (List) _symbol_m.value; final Symbol CLASS = _symbols[offset + 2]; final Symbol IDENTIFIER = _symbols[offset + 3]; final Symbol _symbol_s = _symbols[offset + 4]; final Opt s = (Opt) _symbol_s.value; final Symbol _symbol_i = _symbols[offset + 5]; final List i = (List) _symbol_i.value; final Symbol _symbol_b = _symbols[offset + 6]; final List b = (List) _symbol_b.value; return new ClassDecl(new Modifiers(m), IDENTIFIER, s, i, b); } case 69: // super = EXTENDS.EXTENDS class_type.c { final Symbol EXTENDS = _symbols[offset + 1]; final Symbol _symbol_c = _symbols[offset + 2]; final Access c = (Access) _symbol_c.value; return new Opt(c); } case 70: // interfaces = IMPLEMENTS.IMPLEMENTS interface_type_list.i { final Symbol IMPLEMENTS = _symbols[offset + 1]; final Symbol _symbol_i = _symbols[offset + 2]; final List i = (List) _symbol_i.value; return i; } case 71: // interface_type_list = interface_type.i { final Symbol _symbol_i = _symbols[offset + 1]; final Access i = (Access) _symbol_i.value; return new List().add(i); } case 72: // interface_type_list = interface_type_list.l COMMA.COMMA interface_type.i { final Symbol _symbol_l = _symbols[offset + 1]; final List l = (List) _symbol_l.value; final Symbol COMMA = _symbols[offset + 2]; final Symbol _symbol_i = _symbols[offset + 3]; final Access i = (Access) _symbol_i.value; return l.add(i); } case 73: // class_body = LBRACE.LBRACE class_body_declarations_opt.c RBRACE.RBRACE { final Symbol LBRACE = _symbols[offset + 1]; final Symbol _symbol_c = _symbols[offset + 2]; final List c = (List) _symbol_c.value; final Symbol RBRACE = _symbols[offset + 3]; return c; } case 74: // class_body_declarations = class_body_declaration.c { final Symbol _symbol_c = _symbols[offset + 1]; final BodyDecl c = (BodyDecl) _symbol_c.value; return new List().add(c); } case 75: // class_body_declarations = class_body_declarations.l class_body_declaration.c { final Symbol _symbol_l = _symbols[offset + 1]; final List l = (List) _symbol_l.value; final Symbol _symbol_c = _symbols[offset + 2]; final BodyDecl c = (BodyDecl) _symbol_c.value; return l.add(c); } case 76: // class_body_declaration = class_member_declaration.c { final Symbol _symbol_c = _symbols[offset + 1]; final BodyDecl c = (BodyDecl) _symbol_c.value; return c; } case 77: // class_body_declaration = instance_initializer.i { final Symbol _symbol_i = _symbols[offset + 1]; final InstanceInitializer i = (InstanceInitializer) _symbol_i.value; return i; } case 78: // class_body_declaration = static_initializer.si { final Symbol _symbol_si = _symbols[offset + 1]; final StaticInitializer si = (StaticInitializer) _symbol_si.value; return si; } case 79: // class_body_declaration = constructor_declaration.c { final Symbol _symbol_c = _symbols[offset + 1]; final ConstructorDecl c = (ConstructorDecl) _symbol_c.value; return c; } case 80: // class_member_declaration = field_declaration.f { final Symbol _symbol_f = _symbols[offset + 1]; final BodyDecl f = (BodyDecl) _symbol_f.value; return f; } case 81: // class_member_declaration = method_declaration.m { final Symbol _symbol_m = _symbols[offset + 1]; final MethodDecl m = (MethodDecl) _symbol_m.value; return m; } case 82: // class_member_declaration = class_declaration.c { final Symbol _symbol_c = _symbols[offset + 1]; final ClassDecl c = (ClassDecl) _symbol_c.value; return new MemberClassDecl(c); } case 83: // class_member_declaration = interface_declaration.i { final Symbol _symbol_i = _symbols[offset + 1]; final InterfaceDecl i = (InterfaceDecl) _symbol_i.value; return new MemberInterfaceDecl(i); } case 84: // class_member_declaration = SEMICOLON.SEMICOLON { final Symbol SEMICOLON = _symbols[offset + 1]; return new InstanceInitializer(new Block()); } case 85: // field_declaration = type.t variable_declarators.v SEMICOLON.SEMICOLON { final Symbol _symbol_t = _symbols[offset + 1]; final Access t = (Access) _symbol_t.value; final Symbol _symbol_v = _symbols[offset + 2]; final List v = (List) _symbol_v.value; final Symbol SEMICOLON = _symbols[offset + 3]; return new FieldDecl(new Modifiers(new List()), t, v); } case 86: // field_declaration = modifiers.m type.t variable_declarators.v SEMICOLON.SEMICOLON { final Symbol _symbol_m = _symbols[offset + 1]; final List m = (List) _symbol_m.value; final Symbol _symbol_t = _symbols[offset + 2]; final Access t = (Access) _symbol_t.value; final Symbol _symbol_v = _symbols[offset + 3]; final List v = (List) _symbol_v.value; final Symbol SEMICOLON = _symbols[offset + 4]; return new FieldDecl(new Modifiers(m), t, v); } case 87: // variable_declarators = variable_declarator.v { final Symbol _symbol_v = _symbols[offset + 1]; final VariableDecl v = (VariableDecl) _symbol_v.value; return new List().add(v); } case 88: // variable_declarators = variable_declarators.l COMMA.COMMA variable_declarator.v { final Symbol _symbol_l = _symbols[offset + 1]; final List l = (List) _symbol_l.value; final Symbol COMMA = _symbols[offset + 2]; final Symbol _symbol_v = _symbols[offset + 3]; final VariableDecl v = (VariableDecl) _symbol_v.value; return l.add(v); } case 89: // variable_declarator = variable_declarator_id.v { final Symbol _symbol_v = _symbols[offset + 1]; final VariableDecl v = (VariableDecl) _symbol_v.value; return v; } case 90: // variable_declarator = variable_declarator_id.v EQ.EQ variable_initializer.i { final Symbol _symbol_v = _symbols[offset + 1]; final VariableDecl v = (VariableDecl) _symbol_v.value; final Symbol EQ = _symbols[offset + 2]; final Symbol _symbol_i = _symbols[offset + 3]; final Expr i = (Expr) _symbol_i.value; v.setInit(i); return v; } case 91: // variable_declarator_id = IDENTIFIER.IDENTIFIER dims_opt.d { final Symbol IDENTIFIER = _symbols[offset + 1]; final Symbol _symbol_d = _symbols[offset + 2]; final List d = (List) _symbol_d.value; return new VariableDecl(IDENTIFIER, d, new Opt()); } case 92: // variable_initializer = expression.e { final Symbol _symbol_e = _symbols[offset + 1]; final Expr e = (Expr) _symbol_e.value; return e; } case 93: // variable_initializer = array_initializer.a { final Symbol _symbol_a = _symbols[offset + 1]; final ArrayInit a = (ArrayInit) _symbol_a.value; return a; } case 94: // method_declaration = method_header.m method_body.b { final Symbol _symbol_m = _symbols[offset + 1]; final MethodDecl m = (MethodDecl) _symbol_m.value; final Symbol _symbol_b = _symbols[offset + 2]; final Opt b = (Opt) _symbol_b.value; m.setBlockOpt(b); return m; } case 95: // method_header = type.t IDENTIFIER.IDENTIFIER LPAREN.LPAREN formal_parameter_list_opt.l RPAREN.RPAREN { final Symbol _symbol_t = _symbols[offset + 1]; final Access t = (Access) _symbol_t.value; final Symbol IDENTIFIER = _symbols[offset + 2]; final Symbol LPAREN = _symbols[offset + 3]; final Symbol _symbol_l = _symbols[offset + 4]; final List l = (List) _symbol_l.value; final Symbol RPAREN = _symbols[offset + 5]; return new MethodDecl(new Modifiers(new List()), t.addArrayDims(new List()), IDENTIFIER, l, new List(), new Opt()); } case 96: // method_header = modifiers.m type.t IDENTIFIER.IDENTIFIER LPAREN.LPAREN formal_parameter_list_opt.l RPAREN.RPAREN { final Symbol _symbol_m = _symbols[offset + 1]; final List m = (List) _symbol_m.value; final Symbol _symbol_t = _symbols[offset + 2]; final Access t = (Access) _symbol_t.value; final Symbol IDENTIFIER = _symbols[offset + 3]; final Symbol LPAREN = _symbols[offset + 4]; final Symbol _symbol_l = _symbols[offset + 5]; final List l = (List) _symbol_l.value; final Symbol RPAREN = _symbols[offset + 6]; return new MethodDecl(new Modifiers(m), t.addArrayDims(new List()), IDENTIFIER, l, new List(), new Opt()); } case 97: // method_header = type.t IDENTIFIER.IDENTIFIER LPAREN.LPAREN formal_parameter_list_opt.l RPAREN.RPAREN dims.d { final Symbol _symbol_t = _symbols[offset + 1]; final Access t = (Access) _symbol_t.value; final Symbol IDENTIFIER = _symbols[offset + 2]; final Symbol LPAREN = _symbols[offset + 3]; final Symbol _symbol_l = _symbols[offset + 4]; final List l = (List) _symbol_l.value; final Symbol RPAREN = _symbols[offset + 5]; final Symbol _symbol_d = _symbols[offset + 6]; final List d = (List) _symbol_d.value; return new MethodDecl(new Modifiers(new List()), t.addArrayDims(d), IDENTIFIER, l, new List(), new Opt()); } case 98: // method_header = modifiers.m type.t IDENTIFIER.IDENTIFIER LPAREN.LPAREN formal_parameter_list_opt.l RPAREN.RPAREN dims.d { final Symbol _symbol_m = _symbols[offset + 1]; final List m = (List) _symbol_m.value; final Symbol _symbol_t = _symbols[offset + 2]; final Access t = (Access) _symbol_t.value; final Symbol IDENTIFIER = _symbols[offset + 3]; final Symbol LPAREN = _symbols[offset + 4]; final Symbol _symbol_l = _symbols[offset + 5]; final List l = (List) _symbol_l.value; final Symbol RPAREN = _symbols[offset + 6]; final Symbol _symbol_d = _symbols[offset + 7]; final List d = (List) _symbol_d.value; return new MethodDecl(new Modifiers(m), t.addArrayDims(d), IDENTIFIER, l, new List(), new Opt()); } case 99: // method_header = type.t IDENTIFIER.IDENTIFIER LPAREN.LPAREN formal_parameter_list_opt.l RPAREN.RPAREN throws.tl { final Symbol _symbol_t = _symbols[offset + 1]; final Access t = (Access) _symbol_t.value; final Symbol IDENTIFIER = _symbols[offset + 2]; final Symbol LPAREN = _symbols[offset + 3]; final Symbol _symbol_l = _symbols[offset + 4]; final List l = (List) _symbol_l.value; final Symbol RPAREN = _symbols[offset + 5]; final Symbol _symbol_tl = _symbols[offset + 6]; final List tl = (List) _symbol_tl.value; return new MethodDecl(new Modifiers(new List()), t.addArrayDims(new List()), IDENTIFIER, l, tl, new Opt()); } case 100: // method_header = modifiers.m type.t IDENTIFIER.IDENTIFIER LPAREN.LPAREN formal_parameter_list_opt.l RPAREN.RPAREN throws.tl { final Symbol _symbol_m = _symbols[offset + 1]; final List m = (List) _symbol_m.value; final Symbol _symbol_t = _symbols[offset + 2]; final Access t = (Access) _symbol_t.value; final Symbol IDENTIFIER = _symbols[offset + 3]; final Symbol LPAREN = _symbols[offset + 4]; final Symbol _symbol_l = _symbols[offset + 5]; final List l = (List) _symbol_l.value; final Symbol RPAREN = _symbols[offset + 6]; final Symbol _symbol_tl = _symbols[offset + 7]; final List tl = (List) _symbol_tl.value; return new MethodDecl(new Modifiers(m), t.addArrayDims(new List()), IDENTIFIER, l, tl, new Opt()); } case 101: // method_header = type.t IDENTIFIER.IDENTIFIER LPAREN.LPAREN formal_parameter_list_opt.l RPAREN.RPAREN dims.d throws.tl { final Symbol _symbol_t = _symbols[offset + 1]; final Access t = (Access) _symbol_t.value; final Symbol IDENTIFIER = _symbols[offset + 2]; final Symbol LPAREN = _symbols[offset + 3]; final Symbol _symbol_l = _symbols[offset + 4]; final List l = (List) _symbol_l.value; final Symbol RPAREN = _symbols[offset + 5]; final Symbol _symbol_d = _symbols[offset + 6]; final List d = (List) _symbol_d.value; final Symbol _symbol_tl = _symbols[offset + 7]; final List tl = (List) _symbol_tl.value; return new MethodDecl(new Modifiers(new List()), t.addArrayDims(d), IDENTIFIER, l, tl, new Opt()); } case 102: // method_header = modifiers.m type.t IDENTIFIER.IDENTIFIER LPAREN.LPAREN formal_parameter_list_opt.l RPAREN.RPAREN dims.d throws.tl { final Symbol _symbol_m = _symbols[offset + 1]; final List m = (List) _symbol_m.value; final Symbol _symbol_t = _symbols[offset + 2]; final Access t = (Access) _symbol_t.value; final Symbol IDENTIFIER = _symbols[offset + 3]; final Symbol LPAREN = _symbols[offset + 4]; final Symbol _symbol_l = _symbols[offset + 5]; final List l = (List) _symbol_l.value; final Symbol RPAREN = _symbols[offset + 6]; final Symbol _symbol_d = _symbols[offset + 7]; final List d = (List) _symbol_d.value; final Symbol _symbol_tl = _symbols[offset + 8]; final List tl = (List) _symbol_tl.value; return new MethodDecl(new Modifiers(m), t.addArrayDims(d), IDENTIFIER, l, tl, new Opt()); } case 103: // method_header = VOID.VOID IDENTIFIER.IDENTIFIER LPAREN.LPAREN formal_parameter_list_opt.l RPAREN.RPAREN throws_opt.tl { final Symbol VOID = _symbols[offset + 1]; final Symbol IDENTIFIER = _symbols[offset + 2]; final Symbol LPAREN = _symbols[offset + 3]; final Symbol _symbol_l = _symbols[offset + 4]; final List l = (List) _symbol_l.value; final Symbol RPAREN = _symbols[offset + 5]; final Symbol _symbol_tl = _symbols[offset + 6]; final List tl = (List) _symbol_tl.value; return new MethodDecl(new Modifiers(new List()), new PrimitiveTypeAccess("void"), IDENTIFIER, l, tl, new Opt()); } case 104: // method_header = modifiers.m VOID.VOID IDENTIFIER.IDENTIFIER LPAREN.LPAREN formal_parameter_list_opt.l RPAREN.RPAREN throws_opt.tl { final Symbol _symbol_m = _symbols[offset + 1]; final List m = (List) _symbol_m.value; final Symbol VOID = _symbols[offset + 2]; final Symbol IDENTIFIER = _symbols[offset + 3]; final Symbol LPAREN = _symbols[offset + 4]; final Symbol _symbol_l = _symbols[offset + 5]; final List l = (List) _symbol_l.value; final Symbol RPAREN = _symbols[offset + 6]; final Symbol _symbol_tl = _symbols[offset + 7]; final List tl = (List) _symbol_tl.value; return new MethodDecl(new Modifiers(m), new PrimitiveTypeAccess("void"), IDENTIFIER, l, tl, new Opt()); } case 105: // formal_parameter_list = formal_parameter.f { final Symbol _symbol_f = _symbols[offset + 1]; final ParameterDeclaration f = (ParameterDeclaration) _symbol_f.value; return new List().add(f); } case 106: // formal_parameter_list = formal_parameter_list.l COMMA.COMMA formal_parameter.f { final Symbol _symbol_l = _symbols[offset + 1]; final List l = (List) _symbol_l.value; final Symbol COMMA = _symbols[offset + 2]; final Symbol _symbol_f = _symbols[offset + 3]; final ParameterDeclaration f = (ParameterDeclaration) _symbol_f.value; return l.add(f); } case 107: // formal_parameter = type.t IDENTIFIER.IDENTIFIER dims_opt.d { final Symbol _symbol_t = _symbols[offset + 1]; final Access t = (Access) _symbol_t.value; final Symbol IDENTIFIER = _symbols[offset + 2]; final Symbol _symbol_d = _symbols[offset + 3]; final List d = (List) _symbol_d.value; return new ParameterDeclaration(new Modifiers(new List()), t.addArrayDims(d), IDENTIFIER); } case 108: // formal_parameter = modifiers.m type.t IDENTIFIER.IDENTIFIER dims_opt.d { final Symbol _symbol_m = _symbols[offset + 1]; final List m = (List) _symbol_m.value; final Symbol _symbol_t = _symbols[offset + 2]; final Access t = (Access) _symbol_t.value; final Symbol IDENTIFIER = _symbols[offset + 3]; final Symbol _symbol_d = _symbols[offset + 4]; final List d = (List) _symbol_d.value; return new ParameterDeclaration(new Modifiers(m), t.addArrayDims(d), IDENTIFIER); } case 109: // throws = THROWS.THROWS class_type_list.l { final Symbol THROWS = _symbols[offset + 1]; final Symbol _symbol_l = _symbols[offset + 2]; final List l = (List) _symbol_l.value; return l; } case 110: // class_type_list = class_type.c { final Symbol _symbol_c = _symbols[offset + 1]; final Access c = (Access) _symbol_c.value; return new List().add(c); } case 111: // class_type_list = class_type_list.l COMMA.COMMA class_type.c { final Symbol _symbol_l = _symbols[offset + 1]; final List l = (List) _symbol_l.value; final Symbol COMMA = _symbols[offset + 2]; final Symbol _symbol_c = _symbols[offset + 3]; final Access c = (Access) _symbol_c.value; return l.add(c); } case 112: // method_body = block.b { final Symbol _symbol_b = _symbols[offset + 1]; final Block b = (Block) _symbol_b.value; return new Opt(b); } case 113: // method_body = SEMICOLON.SEMICOLON { final Symbol SEMICOLON = _symbols[offset + 1]; return new Opt(); } case 114: // static_initializer = STATIC.STATIC block.b { final Symbol STATIC = _symbols[offset + 1]; final Symbol _symbol_b = _symbols[offset + 2]; final Block b = (Block) _symbol_b.value; return new StaticInitializer(b); } case 115: // instance_initializer = block.b { final Symbol _symbol_b = _symbols[offset + 1]; final Block b = (Block) _symbol_b.value; return new InstanceInitializer(b); } case 116: // constructor_declaration = IDENTIFIER.IDENTIFIER LPAREN.LPAREN formal_parameter_list_opt.pl RPAREN.RPAREN throws_opt.tl LBRACE.LBRACE RBRACE.RBRACE { final Symbol IDENTIFIER = _symbols[offset + 1]; final Symbol LPAREN = _symbols[offset + 2]; final Symbol _symbol_pl = _symbols[offset + 3]; final List pl = (List) _symbol_pl.value; final Symbol RPAREN = _symbols[offset + 4]; final Symbol _symbol_tl = _symbols[offset + 5]; final List tl = (List) _symbol_tl.value; final Symbol LBRACE = _symbols[offset + 6]; final Symbol RBRACE = _symbols[offset + 7]; Block b = new Block(new List()); new List().setStart(LBRACE.getStart() + 1); b.setStart(LBRACE.getStart()); b.setEnd(RBRACE.getEnd()); return new ConstructorDecl(new Modifiers(new List()), IDENTIFIER, pl, tl, new Opt(), b); } case 117: // constructor_declaration = modifiers.m IDENTIFIER.IDENTIFIER LPAREN.LPAREN formal_parameter_list_opt.pl RPAREN.RPAREN throws_opt.tl LBRACE.LBRACE RBRACE.RBRACE { final Symbol _symbol_m = _symbols[offset + 1]; final List m = (List) _symbol_m.value; final Symbol IDENTIFIER = _symbols[offset + 2]; final Symbol LPAREN = _symbols[offset + 3]; final Symbol _symbol_pl = _symbols[offset + 4]; final List pl = (List) _symbol_pl.value; final Symbol RPAREN = _symbols[offset + 5]; final Symbol _symbol_tl = _symbols[offset + 6]; final List tl = (List) _symbol_tl.value; final Symbol LBRACE = _symbols[offset + 7]; final Symbol RBRACE = _symbols[offset + 8]; Block b = new Block(new List()); new List().setStart(LBRACE.getStart() + 1); b.setStart(LBRACE.getStart()); b.setEnd(RBRACE.getEnd()); return new ConstructorDecl(new Modifiers(m), IDENTIFIER, pl, tl, new Opt(), b); } case 118: // constructor_declaration = IDENTIFIER.IDENTIFIER LPAREN.LPAREN formal_parameter_list_opt.pl RPAREN.RPAREN throws_opt.tl LBRACE.LBRACE explicit_constructor_invocation.c RBRACE.RBRACE { final Symbol IDENTIFIER = _symbols[offset + 1]; final Symbol LPAREN = _symbols[offset + 2]; final Symbol _symbol_pl = _symbols[offset + 3]; final List pl = (List) _symbol_pl.value; final Symbol RPAREN = _symbols[offset + 4]; final Symbol _symbol_tl = _symbols[offset + 5]; final List tl = (List) _symbol_tl.value; final Symbol LBRACE = _symbols[offset + 6]; final Symbol _symbol_c = _symbols[offset + 7]; final ExprStmt c = (ExprStmt) _symbol_c.value; final Symbol RBRACE = _symbols[offset + 8]; Block b = new Block(new List()); new List().setStart(LBRACE.getStart() + 1); b.setStart(LBRACE.getStart()); b.setEnd(RBRACE.getEnd()); return new ConstructorDecl(new Modifiers(new List()), IDENTIFIER, pl, tl, new Opt(c), b); } case 119: // constructor_declaration = modifiers.m IDENTIFIER.IDENTIFIER LPAREN.LPAREN formal_parameter_list_opt.pl RPAREN.RPAREN throws_opt.tl LBRACE.LBRACE explicit_constructor_invocation.c RBRACE.RBRACE { final Symbol _symbol_m = _symbols[offset + 1]; final List m = (List) _symbol_m.value; final Symbol IDENTIFIER = _symbols[offset + 2]; final Symbol LPAREN = _symbols[offset + 3]; final Symbol _symbol_pl = _symbols[offset + 4]; final List pl = (List) _symbol_pl.value; final Symbol RPAREN = _symbols[offset + 5]; final Symbol _symbol_tl = _symbols[offset + 6]; final List tl = (List) _symbol_tl.value; final Symbol LBRACE = _symbols[offset + 7]; final Symbol _symbol_c = _symbols[offset + 8]; final ExprStmt c = (ExprStmt) _symbol_c.value; final Symbol RBRACE = _symbols[offset + 9]; Block b = new Block(new List()); new List().setStart(LBRACE.getStart() + 1); b.setStart(LBRACE.getStart()); b.setEnd(RBRACE.getEnd()); return new ConstructorDecl(new Modifiers(m), IDENTIFIER, pl, tl, new Opt(c), b); } case 120: // constructor_declaration = IDENTIFIER.IDENTIFIER LPAREN.LPAREN formal_parameter_list_opt.pl RPAREN.RPAREN throws_opt.tl LBRACE.LBRACE block_statements.l RBRACE.RBRACE { final Symbol IDENTIFIER = _symbols[offset + 1]; final Symbol LPAREN = _symbols[offset + 2]; final Symbol _symbol_pl = _symbols[offset + 3]; final List pl = (List) _symbol_pl.value; final Symbol RPAREN = _symbols[offset + 4]; final Symbol _symbol_tl = _symbols[offset + 5]; final List tl = (List) _symbol_tl.value; final Symbol LBRACE = _symbols[offset + 6]; final Symbol _symbol_l = _symbols[offset + 7]; final List l = (List) _symbol_l.value; final Symbol RBRACE = _symbols[offset + 8]; Block b = new Block(l); l.setStart(LBRACE.getStart() + 1); b.setStart(LBRACE.getStart()); b.setEnd(RBRACE.getEnd()); return new ConstructorDecl(new Modifiers(new List()), IDENTIFIER, pl, tl, new Opt(), b); } case 121: // constructor_declaration = modifiers.m IDENTIFIER.IDENTIFIER LPAREN.LPAREN formal_parameter_list_opt.pl RPAREN.RPAREN throws_opt.tl LBRACE.LBRACE block_statements.l RBRACE.RBRACE { final Symbol _symbol_m = _symbols[offset + 1]; final List m = (List) _symbol_m.value; final Symbol IDENTIFIER = _symbols[offset + 2]; final Symbol LPAREN = _symbols[offset + 3]; final Symbol _symbol_pl = _symbols[offset + 4]; final List pl = (List) _symbol_pl.value; final Symbol RPAREN = _symbols[offset + 5]; final Symbol _symbol_tl = _symbols[offset + 6]; final List tl = (List) _symbol_tl.value; final Symbol LBRACE = _symbols[offset + 7]; final Symbol _symbol_l = _symbols[offset + 8]; final List l = (List) _symbol_l.value; final Symbol RBRACE = _symbols[offset + 9]; Block b = new Block(l); l.setStart(LBRACE.getStart() + 1); b.setStart(LBRACE.getStart()); b.setEnd(RBRACE.getEnd()); return new ConstructorDecl(new Modifiers(m), IDENTIFIER, pl, tl, new Opt(), b); } case 122: // constructor_declaration = IDENTIFIER.IDENTIFIER LPAREN.LPAREN formal_parameter_list_opt.pl RPAREN.RPAREN throws_opt.tl LBRACE.LBRACE explicit_constructor_invocation.c block_statements.l RBRACE.RBRACE { final Symbol IDENTIFIER = _symbols[offset + 1]; final Symbol LPAREN = _symbols[offset + 2]; final Symbol _symbol_pl = _symbols[offset + 3]; final List pl = (List) _symbol_pl.value; final Symbol RPAREN = _symbols[offset + 4]; final Symbol _symbol_tl = _symbols[offset + 5]; final List tl = (List) _symbol_tl.value; final Symbol LBRACE = _symbols[offset + 6]; final Symbol _symbol_c = _symbols[offset + 7]; final ExprStmt c = (ExprStmt) _symbol_c.value; final Symbol _symbol_l = _symbols[offset + 8]; final List l = (List) _symbol_l.value; final Symbol RBRACE = _symbols[offset + 9]; Block b = new Block(l); l.setStart(LBRACE.getStart() + 1); b.setStart(LBRACE.getStart()); b.setEnd(RBRACE.getEnd()); return new ConstructorDecl(new Modifiers(new List()), IDENTIFIER, pl, tl, new Opt(c), b); } case 123: // constructor_declaration = modifiers.m IDENTIFIER.IDENTIFIER LPAREN.LPAREN formal_parameter_list_opt.pl RPAREN.RPAREN throws_opt.tl LBRACE.LBRACE explicit_constructor_invocation.c block_statements.l RBRACE.RBRACE { final Symbol _symbol_m = _symbols[offset + 1]; final List m = (List) _symbol_m.value; final Symbol IDENTIFIER = _symbols[offset + 2]; final Symbol LPAREN = _symbols[offset + 3]; final Symbol _symbol_pl = _symbols[offset + 4]; final List pl = (List) _symbol_pl.value; final Symbol RPAREN = _symbols[offset + 5]; final Symbol _symbol_tl = _symbols[offset + 6]; final List tl = (List) _symbol_tl.value; final Symbol LBRACE = _symbols[offset + 7]; final Symbol _symbol_c = _symbols[offset + 8]; final ExprStmt c = (ExprStmt) _symbol_c.value; final Symbol _symbol_l = _symbols[offset + 9]; final List l = (List) _symbol_l.value; final Symbol RBRACE = _symbols[offset + 10]; Block b = new Block(l); l.setStart(LBRACE.getStart() + 1); b.setStart(LBRACE.getStart()); b.setEnd(RBRACE.getEnd()); return new ConstructorDecl(new Modifiers(m), IDENTIFIER, pl, tl, new Opt(c), b); } case 124: // explicit_constructor_invocation = THIS.THIS LPAREN.LPAREN argument_list_opt.l RPAREN.RPAREN SEMICOLON.SEMICOLON { final Symbol THIS = _symbols[offset + 1]; final Symbol LPAREN = _symbols[offset + 2]; final Symbol _symbol_l = _symbols[offset + 3]; final List l = (List) _symbol_l.value; final Symbol RPAREN = _symbols[offset + 4]; final Symbol SEMICOLON = _symbols[offset + 5]; ConstructorAccess c = new ConstructorAccess("this", l); c.setStart(THIS.getStart()); c.setEnd(RPAREN.getEnd()); return new ExprStmt(c); } case 125: // explicit_constructor_invocation = SUPER.SUPER LPAREN.LPAREN argument_list_opt.l RPAREN.RPAREN SEMICOLON.SEMICOLON { final Symbol SUPER = _symbols[offset + 1]; final Symbol LPAREN = _symbols[offset + 2]; final Symbol _symbol_l = _symbols[offset + 3]; final List l = (List) _symbol_l.value; final Symbol RPAREN = _symbols[offset + 4]; final Symbol SEMICOLON = _symbols[offset + 5]; SuperConstructorAccess c = new SuperConstructorAccess("super", l); c.setStart(SUPER.getStart()); c.setEnd(RPAREN.getEnd()); return new ExprStmt(c); } case 126: // explicit_constructor_invocation = primary.p DOT.DOT SUPER.SUPER LPAREN.LPAREN argument_list_opt.l RPAREN.RPAREN SEMICOLON.SEMICOLON { final Symbol _symbol_p = _symbols[offset + 1]; final Expr p = (Expr) _symbol_p.value; final Symbol DOT = _symbols[offset + 2]; final Symbol SUPER = _symbols[offset + 3]; final Symbol LPAREN = _symbols[offset + 4]; final Symbol _symbol_l = _symbols[offset + 5]; final List l = (List) _symbol_l.value; final Symbol RPAREN = _symbols[offset + 6]; final Symbol SEMICOLON = _symbols[offset + 7]; SuperConstructorAccess c = new SuperConstructorAccess("super", l); c.setStart(SUPER.getStart()); c.setEnd(RPAREN.getEnd()); return new ExprStmt(p.qualifiesAccess(c)); } case 127: // explicit_constructor_invocation = name.n DOT.DOT SUPER.SUPER LPAREN.LPAREN argument_list_opt.l RPAREN.RPAREN SEMICOLON.SEMICOLON { final Symbol _symbol_n = _symbols[offset + 1]; final Access n = (Access) _symbol_n.value; final Symbol DOT = _symbols[offset + 2]; final Symbol SUPER = _symbols[offset + 3]; final Symbol LPAREN = _symbols[offset + 4]; final Symbol _symbol_l = _symbols[offset + 5]; final List l = (List) _symbol_l.value; final Symbol RPAREN = _symbols[offset + 6]; final Symbol SEMICOLON = _symbols[offset + 7]; SuperConstructorAccess c = new SuperConstructorAccess("super", l); c.setStart(SUPER.getStart()); c.setEnd(RPAREN.getEnd()); return new ExprStmt(n.qualifiesAccess(c)); } case 128: // interface_declaration = INTERFACE.INTERFACE IDENTIFIER.IDENTIFIER interface_body.b { final Symbol INTERFACE = _symbols[offset + 1]; final Symbol IDENTIFIER = _symbols[offset + 2]; final Symbol _symbol_b = _symbols[offset + 3]; final List b = (List) _symbol_b.value; return new InterfaceDecl(new Modifiers(new List()), IDENTIFIER, new List(), b); } case 129: // interface_declaration = modifiers.m INTERFACE.INTERFACE IDENTIFIER.IDENTIFIER interface_body.b { final Symbol _symbol_m = _symbols[offset + 1]; final List m = (List) _symbol_m.value; final Symbol INTERFACE = _symbols[offset + 2]; final Symbol IDENTIFIER = _symbols[offset + 3]; final Symbol _symbol_b = _symbols[offset + 4]; final List b = (List) _symbol_b.value; return new InterfaceDecl(new Modifiers(m), IDENTIFIER, new List(), b); } case 130: // interface_declaration = INTERFACE.INTERFACE IDENTIFIER.IDENTIFIER extends_interfaces.i interface_body.b { final Symbol INTERFACE = _symbols[offset + 1]; final Symbol IDENTIFIER = _symbols[offset + 2]; final Symbol _symbol_i = _symbols[offset + 3]; final List i = (List) _symbol_i.value; final Symbol _symbol_b = _symbols[offset + 4]; final List b = (List) _symbol_b.value; return new InterfaceDecl(new Modifiers(new List()), IDENTIFIER, i, b); } case 131: // interface_declaration = modifiers.m INTERFACE.INTERFACE IDENTIFIER.IDENTIFIER extends_interfaces.i interface_body.b { final Symbol _symbol_m = _symbols[offset + 1]; final List m = (List) _symbol_m.value; final Symbol INTERFACE = _symbols[offset + 2]; final Symbol IDENTIFIER = _symbols[offset + 3]; final Symbol _symbol_i = _symbols[offset + 4]; final List i = (List) _symbol_i.value; final Symbol _symbol_b = _symbols[offset + 5]; final List b = (List) _symbol_b.value; return new InterfaceDecl(new Modifiers(m), IDENTIFIER, i, b); } case 132: // extends_interfaces = EXTENDS.EXTENDS interface_type.i { final Symbol EXTENDS = _symbols[offset + 1]; final Symbol _symbol_i = _symbols[offset + 2]; final Access i = (Access) _symbol_i.value; return new List().add(i); } case 133: // extends_interfaces = extends_interfaces.l COMMA.COMMA interface_type.i { final Symbol _symbol_l = _symbols[offset + 1]; final List l = (List) _symbol_l.value; final Symbol COMMA = _symbols[offset + 2]; final Symbol _symbol_i = _symbols[offset + 3]; final Access i = (Access) _symbol_i.value; return l.add(i); } case 134: // interface_body = LBRACE.LBRACE interface_member_declarations_opt.i RBRACE.RBRACE { final Symbol LBRACE = _symbols[offset + 1]; final Symbol _symbol_i = _symbols[offset + 2]; final List i = (List) _symbol_i.value; final Symbol RBRACE = _symbols[offset + 3]; return i; } case 135: // interface_member_declarations = interface_member_declaration.i { final Symbol _symbol_i = _symbols[offset + 1]; final BodyDecl i = (BodyDecl) _symbol_i.value; return new List().add(i); } case 136: // interface_member_declarations = interface_member_declarations.l interface_member_declaration.i { final Symbol _symbol_l = _symbols[offset + 1]; final List l = (List) _symbol_l.value; final Symbol _symbol_i = _symbols[offset + 2]; final BodyDecl i = (BodyDecl) _symbol_i.value; return l.add(i); } case 137: // interface_member_declaration = constant_declaration.c { final Symbol _symbol_c = _symbols[offset + 1]; final BodyDecl c = (BodyDecl) _symbol_c.value; return c; } case 138: // interface_member_declaration = abstract_method_declaration.a { final Symbol _symbol_a = _symbols[offset + 1]; final BodyDecl a = (BodyDecl) _symbol_a.value; return a; } case 139: // interface_member_declaration = class_declaration.c { final Symbol _symbol_c = _symbols[offset + 1]; final ClassDecl c = (ClassDecl) _symbol_c.value; return new MemberClassDecl(c); } case 140: // interface_member_declaration = interface_declaration.i { final Symbol _symbol_i = _symbols[offset + 1]; final InterfaceDecl i = (InterfaceDecl) _symbol_i.value; return new MemberInterfaceDecl(i); } case 141: // interface_member_declaration = SEMICOLON.SEMICOLON { final Symbol SEMICOLON = _symbols[offset + 1]; return new StaticInitializer(new Block()); } case 142: // constant_declaration = field_declaration.f { final Symbol _symbol_f = _symbols[offset + 1]; final BodyDecl f = (BodyDecl) _symbol_f.value; return f; } case 143: // abstract_method_declaration = method_header.m SEMICOLON.SEMICOLON { final Symbol _symbol_m = _symbols[offset + 1]; final MethodDecl m = (MethodDecl) _symbol_m.value; final Symbol SEMICOLON = _symbols[offset + 2]; return m; } case 144: // array_initializer = LBRACE.LBRACE RBRACE.RBRACE { final Symbol LBRACE = _symbols[offset + 1]; final Symbol RBRACE = _symbols[offset + 2]; return new ArrayInit(new List()); } case 145: // array_initializer = LBRACE.LBRACE variable_initializers.v RBRACE.RBRACE { final Symbol LBRACE = _symbols[offset + 1]; final Symbol _symbol_v = _symbols[offset + 2]; final List v = (List) _symbol_v.value; final Symbol RBRACE = _symbols[offset + 3]; return new ArrayInit(v); } case 146: // array_initializer = LBRACE.LBRACE COMMA.COMMA RBRACE.RBRACE { final Symbol LBRACE = _symbols[offset + 1]; final Symbol COMMA = _symbols[offset + 2]; final Symbol RBRACE = _symbols[offset + 3]; return new ArrayInit(new List()); } case 147: // array_initializer = LBRACE.LBRACE variable_initializers.v COMMA.COMMA RBRACE.RBRACE { final Symbol LBRACE = _symbols[offset + 1]; final Symbol _symbol_v = _symbols[offset + 2]; final List v = (List) _symbol_v.value; final Symbol COMMA = _symbols[offset + 3]; final Symbol RBRACE = _symbols[offset + 4]; return new ArrayInit(v); } case 148: // variable_initializers = variable_initializer.v { final Symbol _symbol_v = _symbols[offset + 1]; final Expr v = (Expr) _symbol_v.value; return new List().add(v); } case 149: // variable_initializers = variable_initializers.l COMMA.COMMA variable_initializer.v { final Symbol _symbol_l = _symbols[offset + 1]; final List l = (List) _symbol_l.value; final Symbol COMMA = _symbols[offset + 2]; final Symbol _symbol_v = _symbols[offset + 3]; final Expr v = (Expr) _symbol_v.value; return l.add(v); } case 150: // block = LBRACE.LBRACE block_statements_opt.l RBRACE.RBRACE { final Symbol LBRACE = _symbols[offset + 1]; final Symbol _symbol_l = _symbols[offset + 2]; final List l = (List) _symbol_l.value; final Symbol RBRACE = _symbols[offset + 3]; return new Block(l); } case 151: // block_statements = block_statement.b { final Symbol _symbol_b = _symbols[offset + 1]; final Stmt b = (Stmt) _symbol_b.value; return new List().add(b); } case 152: // block_statements = block_statements.l block_statement.b { final Symbol _symbol_l = _symbols[offset + 1]; final List l = (List) _symbol_l.value; final Symbol _symbol_b = _symbols[offset + 2]; final Stmt b = (Stmt) _symbol_b.value; return l.add(b); } case 153: // block_statement = local_variable_declaration_statement.l { final Symbol _symbol_l = _symbols[offset + 1]; final VarDeclStmt l = (VarDeclStmt) _symbol_l.value; return l; } case 154: // block_statement = class_declaration.c { final Symbol _symbol_c = _symbols[offset + 1]; final ClassDecl c = (ClassDecl) _symbol_c.value; return new LocalClassDeclStmt(c); } case 155: // block_statement = statement.s { final Symbol _symbol_s = _symbols[offset + 1]; final Stmt s = (Stmt) _symbol_s.value; return s; } case 156: // local_variable_declaration_statement = local_variable_declaration.l SEMICOLON.SEMICOLON { final Symbol _symbol_l = _symbols[offset + 1]; final VarDeclStmt l = (VarDeclStmt) _symbol_l.value; final Symbol SEMICOLON = _symbols[offset + 2]; return l; } case 157: // local_variable_declaration = type.t variable_declarators.l { final Symbol _symbol_t = _symbols[offset + 1]; final Access t = (Access) _symbol_t.value; final Symbol _symbol_l = _symbols[offset + 2]; final List l = (List) _symbol_l.value; return new VarDeclStmt(new Modifiers(new List()), t, l); } case 158: // local_variable_declaration = modifiers.m type.t variable_declarators.l { final Symbol _symbol_m = _symbols[offset + 1]; final List m = (List) _symbol_m.value; final Symbol _symbol_t = _symbols[offset + 2]; final Access t = (Access) _symbol_t.value; final Symbol _symbol_l = _symbols[offset + 3]; final List l = (List) _symbol_l.value; return new VarDeclStmt(new Modifiers(m), t, l); } case 159: // statement = statement_without_trailing_substatement.s { final Symbol _symbol_s = _symbols[offset + 1]; final Stmt s = (Stmt) _symbol_s.value; return s; } case 160: // statement = labeled_statement.l { final Symbol _symbol_l = _symbols[offset + 1]; final LabeledStmt l = (LabeledStmt) _symbol_l.value; return l; } case 161: // statement = if_then_statement.i { final Symbol _symbol_i = _symbols[offset + 1]; final IfStmt i = (IfStmt) _symbol_i.value; return i; } case 162: // statement = if_then_else_statement.i { final Symbol _symbol_i = _symbols[offset + 1]; final IfStmt i = (IfStmt) _symbol_i.value; return i; } case 163: // statement = while_statement.w { final Symbol _symbol_w = _symbols[offset + 1]; final WhileStmt w = (WhileStmt) _symbol_w.value; return w; } case 164: // statement = for_statement.f { final Symbol _symbol_f = _symbols[offset + 1]; final ForStmt f = (ForStmt) _symbol_f.value; return f; } case 165: // statement_without_trailing_substatement = block.b { final Symbol _symbol_b = _symbols[offset + 1]; final Block b = (Block) _symbol_b.value; return b; } case 166: // statement_without_trailing_substatement = empty_statement.e { final Symbol _symbol_e = _symbols[offset + 1]; final EmptyStmt e = (EmptyStmt) _symbol_e.value; return e; } case 167: // statement_without_trailing_substatement = expression_statement.e { final Symbol _symbol_e = _symbols[offset + 1]; final ExprStmt e = (ExprStmt) _symbol_e.value; return e; } case 168: // statement_without_trailing_substatement = switch_statement.s { final Symbol _symbol_s = _symbols[offset + 1]; final SwitchStmt s = (SwitchStmt) _symbol_s.value; return s; } case 169: // statement_without_trailing_substatement = do_statement.d { final Symbol _symbol_d = _symbols[offset + 1]; final DoStmt d = (DoStmt) _symbol_d.value; return d; } case 170: // statement_without_trailing_substatement = break_statement.b { final Symbol _symbol_b = _symbols[offset + 1]; final BreakStmt b = (BreakStmt) _symbol_b.value; return b; } case 171: // statement_without_trailing_substatement = continue_statement.c { final Symbol _symbol_c = _symbols[offset + 1]; final ContinueStmt c = (ContinueStmt) _symbol_c.value; return c; } case 172: // statement_without_trailing_substatement = return_statement.r { final Symbol _symbol_r = _symbols[offset + 1]; final ReturnStmt r = (ReturnStmt) _symbol_r.value; return r; } case 173: // statement_without_trailing_substatement = synchronized_statement.s { final Symbol _symbol_s = _symbols[offset + 1]; final SynchronizedStmt s = (SynchronizedStmt) _symbol_s.value; return s; } case 174: // statement_without_trailing_substatement = throw_statement.t { final Symbol _symbol_t = _symbols[offset + 1]; final ThrowStmt t = (ThrowStmt) _symbol_t.value; return t; } case 175: // statement_without_trailing_substatement = try_statement.t { final Symbol _symbol_t = _symbols[offset + 1]; final TryStmt t = (TryStmt) _symbol_t.value; return t; } case 176: // statement_without_trailing_substatement = assert_statement.a { final Symbol _symbol_a = _symbols[offset + 1]; final AssertStmt a = (AssertStmt) _symbol_a.value; return a; } case 177: // statement_no_short_if = statement_without_trailing_substatement.s { final Symbol _symbol_s = _symbols[offset + 1]; final Stmt s = (Stmt) _symbol_s.value; return s; } case 178: // statement_no_short_if = labeled_statement_no_short_if.l { final Symbol _symbol_l = _symbols[offset + 1]; final LabeledStmt l = (LabeledStmt) _symbol_l.value; return l; } case 179: // statement_no_short_if = if_then_else_statement_no_short_if.i { final Symbol _symbol_i = _symbols[offset + 1]; final IfStmt i = (IfStmt) _symbol_i.value; return i; } case 180: // statement_no_short_if = while_statement_no_short_if.w { final Symbol _symbol_w = _symbols[offset + 1]; final WhileStmt w = (WhileStmt) _symbol_w.value; return w; } case 181: // statement_no_short_if = for_statement_no_short_if.f { final Symbol _symbol_f = _symbols[offset + 1]; final ForStmt f = (ForStmt) _symbol_f.value; return f; } case 182: // if_then_statement = IF.IF LPAREN.LPAREN expression.e RPAREN.RPAREN statement.s { final Symbol IF = _symbols[offset + 1]; final Symbol LPAREN = _symbols[offset + 2]; final Symbol _symbol_e = _symbols[offset + 3]; final Expr e = (Expr) _symbol_e.value; final Symbol RPAREN = _symbols[offset + 4]; final Symbol _symbol_s = _symbols[offset + 5]; final Stmt s = (Stmt) _symbol_s.value; return new IfStmt(e, s, new Opt()); } case 183: // if_then_else_statement = IF.IF LPAREN.LPAREN expression.e RPAREN.RPAREN statement_no_short_if.t ELSE.ELSE statement.els { final Symbol IF = _symbols[offset + 1]; final Symbol LPAREN = _symbols[offset + 2]; final Symbol _symbol_e = _symbols[offset + 3]; final Expr e = (Expr) _symbol_e.value; final Symbol RPAREN = _symbols[offset + 4]; final Symbol _symbol_t = _symbols[offset + 5]; final Stmt t = (Stmt) _symbol_t.value; final Symbol ELSE = _symbols[offset + 6]; final Symbol _symbol_els = _symbols[offset + 7]; final Stmt els = (Stmt) _symbol_els.value; return new IfStmt(e, t, new Opt(els)); } case 184: // if_then_else_statement_no_short_if = IF.IF LPAREN.LPAREN expression.e RPAREN.RPAREN statement_no_short_if.t ELSE.ELSE statement_no_short_if.els { final Symbol IF = _symbols[offset + 1]; final Symbol LPAREN = _symbols[offset + 2]; final Symbol _symbol_e = _symbols[offset + 3]; final Expr e = (Expr) _symbol_e.value; final Symbol RPAREN = _symbols[offset + 4]; final Symbol _symbol_t = _symbols[offset + 5]; final Stmt t = (Stmt) _symbol_t.value; final Symbol ELSE = _symbols[offset + 6]; final Symbol _symbol_els = _symbols[offset + 7]; final Stmt els = (Stmt) _symbol_els.value; return new IfStmt(e, t, new Opt(els)); } case 185: // empty_statement = SEMICOLON.SEMICOLON { final Symbol SEMICOLON = _symbols[offset + 1]; return new EmptyStmt(); } case 186: // labeled_statement = IDENTIFIER.id COLON.COLON statement.s { final Symbol id = _symbols[offset + 1]; final Symbol COLON = _symbols[offset + 2]; final Symbol _symbol_s = _symbols[offset + 3]; final Stmt s = (Stmt) _symbol_s.value; return new LabeledStmt(((String)id.value), s); } case 187: // labeled_statement_no_short_if = IDENTIFIER.id COLON.COLON statement_no_short_if.s { final Symbol id = _symbols[offset + 1]; final Symbol COLON = _symbols[offset + 2]; final Symbol _symbol_s = _symbols[offset + 3]; final Stmt s = (Stmt) _symbol_s.value; return new LabeledStmt(((String)id.value), s); } case 188: // expression_statement = statement_expression.e SEMICOLON.SEMICOLON { final Symbol _symbol_e = _symbols[offset + 1]; final ExprStmt e = (ExprStmt) _symbol_e.value; final Symbol SEMICOLON = _symbols[offset + 2]; return e; } case 189: // statement_expression = assignment.a { final Symbol _symbol_a = _symbols[offset + 1]; final Expr a = (Expr) _symbol_a.value; return new ExprStmt(a); } case 190: // statement_expression = preincrement_expression.e { final Symbol _symbol_e = _symbols[offset + 1]; final Expr e = (Expr) _symbol_e.value; return new ExprStmt(e); } case 191: // statement_expression = predecrement_expression.e { final Symbol _symbol_e = _symbols[offset + 1]; final Expr e = (Expr) _symbol_e.value; return new ExprStmt(e); } case 192: // statement_expression = postincrement_expression.e { final Symbol _symbol_e = _symbols[offset + 1]; final Expr e = (Expr) _symbol_e.value; return new ExprStmt(e); } case 193: // statement_expression = postdecrement_expression.e { final Symbol _symbol_e = _symbols[offset + 1]; final Expr e = (Expr) _symbol_e.value; return new ExprStmt(e); } case 194: // statement_expression = method_invocation.i { final Symbol _symbol_i = _symbols[offset + 1]; final Access i = (Access) _symbol_i.value; return new ExprStmt(i); } case 195: // statement_expression = class_instance_creation_expression.e { final Symbol _symbol_e = _symbols[offset + 1]; final Expr e = (Expr) _symbol_e.value; return new ExprStmt(e); } case 196: // switch_statement = SWITCH.SWITCH LPAREN.LPAREN expression.e RPAREN.RPAREN switch_block.l { final Symbol SWITCH = _symbols[offset + 1]; final Symbol LPAREN = _symbols[offset + 2]; final Symbol _symbol_e = _symbols[offset + 3]; final Expr e = (Expr) _symbol_e.value; final Symbol RPAREN = _symbols[offset + 4]; final Symbol _symbol_l = _symbols[offset + 5]; final Block l = (Block) _symbol_l.value; return new SwitchStmt(e, l); } case 197: // switch_block = LBRACE.LBRACE switch_block_statement_groups.l switch_labels.s RBRACE.RBRACE { final Symbol LBRACE = _symbols[offset + 1]; final Symbol _symbol_l = _symbols[offset + 2]; final List l = (List) _symbol_l.value; final Symbol _symbol_s = _symbols[offset + 3]; final List s = (List) _symbol_s.value; final Symbol RBRACE = _symbols[offset + 4]; for(int ii = 0; ii < s.getNumChildNoTransform(); ii++) l.add(s.getChildNoTransform(ii)); return new Block(l); } case 198: // switch_block = LBRACE.LBRACE switch_block_statement_groups.l RBRACE.RBRACE { final Symbol LBRACE = _symbols[offset + 1]; final Symbol _symbol_l = _symbols[offset + 2]; final List l = (List) _symbol_l.value; final Symbol RBRACE = _symbols[offset + 3]; return new Block(l); } case 199: // switch_block = LBRACE.LBRACE switch_labels.l RBRACE.RBRACE { final Symbol LBRACE = _symbols[offset + 1]; final Symbol _symbol_l = _symbols[offset + 2]; final List l = (List) _symbol_l.value; final Symbol RBRACE = _symbols[offset + 3]; return new Block(l); } case 200: // switch_block = LBRACE.LBRACE RBRACE.RBRACE { final Symbol LBRACE = _symbols[offset + 1]; final Symbol RBRACE = _symbols[offset + 2]; return new Block(new List()); } case 201: // switch_block_statement_groups = switch_block_statement_group.g { final Symbol _symbol_g = _symbols[offset + 1]; final List g = (List) _symbol_g.value; return g; } case 202: // switch_block_statement_groups = switch_block_statement_groups.l switch_block_statement_group.g { final Symbol _symbol_l = _symbols[offset + 1]; final List l = (List) _symbol_l.value; final Symbol _symbol_g = _symbols[offset + 2]; final List g = (List) _symbol_g.value; for(int ii = 0; ii < g.getNumChildNoTransform(); ii++) l.add(g.getChildNoTransform(ii)); return l; } case 203: // switch_block_statement_group = switch_labels.l block_statements.bl { final Symbol _symbol_l = _symbols[offset + 1]; final List l = (List) _symbol_l.value; final Symbol _symbol_bl = _symbols[offset + 2]; final List bl = (List) _symbol_bl.value; for(int ii = 0; ii < bl.getNumChildNoTransform(); ii++) l.add(bl.getChildNoTransform(ii)); return l; } case 204: // switch_labels = switch_label.s { final Symbol _symbol_s = _symbols[offset + 1]; final Case s = (Case) _symbol_s.value; return new List().add(s); } case 205: // switch_labels = switch_labels.l switch_label.s { final Symbol _symbol_l = _symbols[offset + 1]; final List l = (List) _symbol_l.value; final Symbol _symbol_s = _symbols[offset + 2]; final Case s = (Case) _symbol_s.value; return l.add(s); } case 206: // switch_label = CASE.CASE constant_expression.e COLON.COLON { final Symbol CASE = _symbols[offset + 1]; final Symbol _symbol_e = _symbols[offset + 2]; final Expr e = (Expr) _symbol_e.value; final Symbol COLON = _symbols[offset + 3]; return new ConstCase(e); } case 207: // switch_label = DEFAULT.DEFAULT COLON.COLON { final Symbol DEFAULT = _symbols[offset + 1]; final Symbol COLON = _symbols[offset + 2]; return new DefaultCase(); } case 208: // while_statement = WHILE.WHILE LPAREN.LPAREN expression.e RPAREN.RPAREN statement.s { final Symbol WHILE = _symbols[offset + 1]; final Symbol LPAREN = _symbols[offset + 2]; final Symbol _symbol_e = _symbols[offset + 3]; final Expr e = (Expr) _symbol_e.value; final Symbol RPAREN = _symbols[offset + 4]; final Symbol _symbol_s = _symbols[offset + 5]; final Stmt s = (Stmt) _symbol_s.value; return new WhileStmt(e, s); } case 209: // while_statement_no_short_if = WHILE.WHILE LPAREN.LPAREN expression.e RPAREN.RPAREN statement_no_short_if.s { final Symbol WHILE = _symbols[offset + 1]; final Symbol LPAREN = _symbols[offset + 2]; final Symbol _symbol_e = _symbols[offset + 3]; final Expr e = (Expr) _symbol_e.value; final Symbol RPAREN = _symbols[offset + 4]; final Symbol _symbol_s = _symbols[offset + 5]; final Stmt s = (Stmt) _symbol_s.value; return new WhileStmt(e, s); } case 210: // do_statement = DO.DO statement.s WHILE.WHILE LPAREN.LPAREN expression.e RPAREN.RPAREN SEMICOLON.SEMICOLON { final Symbol DO = _symbols[offset + 1]; final Symbol _symbol_s = _symbols[offset + 2]; final Stmt s = (Stmt) _symbol_s.value; final Symbol WHILE = _symbols[offset + 3]; final Symbol LPAREN = _symbols[offset + 4]; final Symbol _symbol_e = _symbols[offset + 5]; final Expr e = (Expr) _symbol_e.value; final Symbol RPAREN = _symbols[offset + 6]; final Symbol SEMICOLON = _symbols[offset + 7]; return new DoStmt(s, e); } case 211: // for_statement = FOR.FOR LPAREN.LPAREN for_init_opt.i SEMICOLON.SEMICOLON expression_opt.e SEMICOLON.SEMICOLON_ for_update_opt.u RPAREN.RPAREN statement.s { final Symbol FOR = _symbols[offset + 1]; final Symbol LPAREN = _symbols[offset + 2]; final Symbol _symbol_i = _symbols[offset + 3]; final List i = (List) _symbol_i.value; final Symbol SEMICOLON = _symbols[offset + 4]; final Symbol _symbol_e = _symbols[offset + 5]; final Opt e = (Opt) _symbol_e.value; final Symbol SEMICOLON_ = _symbols[offset + 6]; final Symbol _symbol_u = _symbols[offset + 7]; final List u = (List) _symbol_u.value; final Symbol RPAREN = _symbols[offset + 8]; final Symbol _symbol_s = _symbols[offset + 9]; final Stmt s = (Stmt) _symbol_s.value; return new ForStmt(i, e, u, s); } case 212: // for_statement_no_short_if = FOR.FOR LPAREN.LPAREN for_init_opt.i SEMICOLON.SEMICOLON expression_opt.e SEMICOLON.SEMICOLON_ for_update_opt.u RPAREN.RPAREN statement_no_short_if.s { final Symbol FOR = _symbols[offset + 1]; final Symbol LPAREN = _symbols[offset + 2]; final Symbol _symbol_i = _symbols[offset + 3]; final List i = (List) _symbol_i.value; final Symbol SEMICOLON = _symbols[offset + 4]; final Symbol _symbol_e = _symbols[offset + 5]; final Opt e = (Opt) _symbol_e.value; final Symbol SEMICOLON_ = _symbols[offset + 6]; final Symbol _symbol_u = _symbols[offset + 7]; final List u = (List) _symbol_u.value; final Symbol RPAREN = _symbols[offset + 8]; final Symbol _symbol_s = _symbols[offset + 9]; final Stmt s = (Stmt) _symbol_s.value; return new ForStmt(i, e, u, s); } case 213: // for_init = statement_expression_list.l { final Symbol _symbol_l = _symbols[offset + 1]; final List l = (List) _symbol_l.value; return l; } case 214: // for_init = local_variable_declaration.d { final Symbol _symbol_d = _symbols[offset + 1]; final VarDeclStmt d = (VarDeclStmt) _symbol_d.value; return new List().add(d); } case 215: // for_update = statement_expression_list.l { final Symbol _symbol_l = _symbols[offset + 1]; final List l = (List) _symbol_l.value; return l; } case 216: // statement_expression_list = statement_expression.e { final Symbol _symbol_e = _symbols[offset + 1]; final ExprStmt e = (ExprStmt) _symbol_e.value; return new List().add(e); } case 217: // statement_expression_list = statement_expression_list.l COMMA.COMMA statement_expression.e { final Symbol _symbol_l = _symbols[offset + 1]; final List l = (List) _symbol_l.value; final Symbol COMMA = _symbols[offset + 2]; final Symbol _symbol_e = _symbols[offset + 3]; final ExprStmt e = (ExprStmt) _symbol_e.value; return l.add(e); } case 218: // break_statement = BREAK.BREAK IDENTIFIER.id SEMICOLON.SEMICOLON { final Symbol BREAK = _symbols[offset + 1]; final Symbol id = _symbols[offset + 2]; final Symbol SEMICOLON = _symbols[offset + 3]; return new BreakStmt(((String)id.value)); } case 219: // break_statement = BREAK.BREAK SEMICOLON.SEMICOLON { final Symbol BREAK = _symbols[offset + 1]; final Symbol SEMICOLON = _symbols[offset + 2]; return new BreakStmt(""); } case 220: // continue_statement = CONTINUE.CONTINUE IDENTIFIER.id SEMICOLON.SEMICOLON { final Symbol CONTINUE = _symbols[offset + 1]; final Symbol id = _symbols[offset + 2]; final Symbol SEMICOLON = _symbols[offset + 3]; return new ContinueStmt(((String)id.value)); } case 221: // continue_statement = CONTINUE.CONTINUE SEMICOLON.SEMICOLON { final Symbol CONTINUE = _symbols[offset + 1]; final Symbol SEMICOLON = _symbols[offset + 2]; return new ContinueStmt(""); } case 222: // return_statement = RETURN.RETURN expression_opt.e SEMICOLON.SEMICOLON { final Symbol RETURN = _symbols[offset + 1]; final Symbol _symbol_e = _symbols[offset + 2]; final Opt e = (Opt) _symbol_e.value; final Symbol SEMICOLON = _symbols[offset + 3]; return new ReturnStmt(e); } case 223: // throw_statement = THROW.THROW expression.e SEMICOLON.SEMICOLON { final Symbol THROW = _symbols[offset + 1]; final Symbol _symbol_e = _symbols[offset + 2]; final Expr e = (Expr) _symbol_e.value; final Symbol SEMICOLON = _symbols[offset + 3]; return new ThrowStmt(e); } case 224: // synchronized_statement = SYNCHRONIZED.SYNCHRONIZED LPAREN.LPAREN expression.e RPAREN.RPAREN block.b { final Symbol SYNCHRONIZED = _symbols[offset + 1]; final Symbol LPAREN = _symbols[offset + 2]; final Symbol _symbol_e = _symbols[offset + 3]; final Expr e = (Expr) _symbol_e.value; final Symbol RPAREN = _symbols[offset + 4]; final Symbol _symbol_b = _symbols[offset + 5]; final Block b = (Block) _symbol_b.value; return new SynchronizedStmt(e, b); } case 225: // try_statement = TRY.TRY block.b catches.c { final Symbol TRY = _symbols[offset + 1]; final Symbol _symbol_b = _symbols[offset + 2]; final Block b = (Block) _symbol_b.value; final Symbol _symbol_c = _symbols[offset + 3]; final List c = (List) _symbol_c.value; return new TryStmt(b, c, new Opt()); } case 226: // try_statement = TRY.TRY block.b finally.f { final Symbol TRY = _symbols[offset + 1]; final Symbol _symbol_b = _symbols[offset + 2]; final Block b = (Block) _symbol_b.value; final Symbol _symbol_f = _symbols[offset + 3]; final Block f = (Block) _symbol_f.value; return new TryStmt(b, new List(), new Opt(f)); } case 227: // try_statement = TRY.TRY block.b catches.c finally.f { final Symbol TRY = _symbols[offset + 1]; final Symbol _symbol_b = _symbols[offset + 2]; final Block b = (Block) _symbol_b.value; final Symbol _symbol_c = _symbols[offset + 3]; final List c = (List) _symbol_c.value; final Symbol _symbol_f = _symbols[offset + 4]; final Block f = (Block) _symbol_f.value; return new TryStmt(b, c, new Opt(f)); } case 228: // catches = catch_clause.c { final Symbol _symbol_c = _symbols[offset + 1]; final CatchClause c = (CatchClause) _symbol_c.value; return new List().add(c); } case 229: // catches = catches.l catch_clause.c { final Symbol _symbol_l = _symbols[offset + 1]; final List l = (List) _symbol_l.value; final Symbol _symbol_c = _symbols[offset + 2]; final CatchClause c = (CatchClause) _symbol_c.value; return l.add(c); } case 230: // catch_clause = CATCH.CATCH LPAREN.LPAREN formal_parameter.p RPAREN.RPAREN block.b { final Symbol CATCH = _symbols[offset + 1]; final Symbol LPAREN = _symbols[offset + 2]; final Symbol _symbol_p = _symbols[offset + 3]; final ParameterDeclaration p = (ParameterDeclaration) _symbol_p.value; final Symbol RPAREN = _symbols[offset + 4]; final Symbol _symbol_b = _symbols[offset + 5]; final Block b = (Block) _symbol_b.value; return new BasicCatch(p, b); } case 231: // finally = FINALLY.FINALLY block.b { final Symbol FINALLY = _symbols[offset + 1]; final Symbol _symbol_b = _symbols[offset + 2]; final Block b = (Block) _symbol_b.value; return b; } case 232: // assert_statement = ASSERT.ASSERT expression.e SEMICOLON.SEMICOLON { final Symbol ASSERT = _symbols[offset + 1]; final Symbol _symbol_e = _symbols[offset + 2]; final Expr e = (Expr) _symbol_e.value; final Symbol SEMICOLON = _symbols[offset + 3]; return new AssertStmt(e, new Opt()); } case 233: // assert_statement = ASSERT.ASSERT expression.e COLON.COLON expression.s SEMICOLON.SEMICOLON { final Symbol ASSERT = _symbols[offset + 1]; final Symbol _symbol_e = _symbols[offset + 2]; final Expr e = (Expr) _symbol_e.value; final Symbol COLON = _symbols[offset + 3]; final Symbol _symbol_s = _symbols[offset + 4]; final Expr s = (Expr) _symbol_s.value; final Symbol SEMICOLON = _symbols[offset + 5]; return new AssertStmt(e, new Opt(s)); } case 234: // primary = primary_no_new_array.p { final Symbol _symbol_p = _symbols[offset + 1]; final Expr p = (Expr) _symbol_p.value; return p; } case 235: // primary = array_creation_init.a { final Symbol _symbol_a = _symbols[offset + 1]; final Expr a = (Expr) _symbol_a.value; return a; } case 236: // primary = array_creation_uninit.a { final Symbol _symbol_a = _symbols[offset + 1]; final Expr a = (Expr) _symbol_a.value; return a; } case 237: // class_literal = CLASS.CLASS { final Symbol CLASS = _symbols[offset + 1]; return new ClassAccess(); } case 238: // subclass_body = class_body.b { final Symbol _symbol_b = _symbols[offset + 1]; final List b = (List) _symbol_b.value; return new Opt(new AnonymousDecl(new Modifiers(), "Anonymous", b)); } case 239: // argument_list = expression.e { final Symbol _symbol_e = _symbols[offset + 1]; final Expr e = (Expr) _symbol_e.value; return new List().add(e); } case 240: // argument_list = argument_list.l COMMA.COMMA expression.e { final Symbol _symbol_l = _symbols[offset + 1]; final List l = (List) _symbol_l.value; final Symbol COMMA = _symbols[offset + 2]; final Symbol _symbol_e = _symbols[offset + 3]; final Expr e = (Expr) _symbol_e.value; return l.add(e); } case 241: // array_creation_uninit = NEW.NEW primitive_type.t dim_exprs.d { final Symbol NEW = _symbols[offset + 1]; final Symbol _symbol_t = _symbols[offset + 2]; final Access t = (Access) _symbol_t.value; final Symbol _symbol_d = _symbols[offset + 3]; final List d = (List) _symbol_d.value; return new ArrayCreationExpr(t.addArrayDims(d), new Opt()); } case 242: // array_creation_uninit = NEW.NEW primitive_type.t dim_exprs.d dims.e { final Symbol NEW = _symbols[offset + 1]; final Symbol _symbol_t = _symbols[offset + 2]; final Access t = (Access) _symbol_t.value; final Symbol _symbol_d = _symbols[offset + 3]; final List d = (List) _symbol_d.value; final Symbol _symbol_e = _symbols[offset + 4]; final List e = (List) _symbol_e.value; return new ArrayCreationExpr(t.addArrayDims(d).addArrayDims(e), new Opt()); } case 243: // array_creation_uninit = NEW.NEW class_or_interface_type.t dim_exprs.d { final Symbol NEW = _symbols[offset + 1]; final Symbol _symbol_t = _symbols[offset + 2]; final Access t = (Access) _symbol_t.value; final Symbol _symbol_d = _symbols[offset + 3]; final List d = (List) _symbol_d.value; return new ArrayCreationExpr(t.addArrayDims(d), new Opt()); } case 244: // array_creation_uninit = NEW.NEW class_or_interface_type.t dim_exprs.d dims.e { final Symbol NEW = _symbols[offset + 1]; final Symbol _symbol_t = _symbols[offset + 2]; final Access t = (Access) _symbol_t.value; final Symbol _symbol_d = _symbols[offset + 3]; final List d = (List) _symbol_d.value; final Symbol _symbol_e = _symbols[offset + 4]; final List e = (List) _symbol_e.value; return new ArrayCreationExpr(t.addArrayDims(d).addArrayDims(e), new Opt()); } case 245: // array_creation_init = NEW.NEW primitive_type.t dims.d array_initializer.i { final Symbol NEW = _symbols[offset + 1]; final Symbol _symbol_t = _symbols[offset + 2]; final Access t = (Access) _symbol_t.value; final Symbol _symbol_d = _symbols[offset + 3]; final List d = (List) _symbol_d.value; final Symbol _symbol_i = _symbols[offset + 4]; final ArrayInit i = (ArrayInit) _symbol_i.value; return new ArrayCreationExpr(t.addArrayDims(d), new Opt(i)); } case 246: // array_creation_init = NEW.NEW class_or_interface_type.t dims.d array_initializer.i { final Symbol NEW = _symbols[offset + 1]; final Symbol _symbol_t = _symbols[offset + 2]; final Access t = (Access) _symbol_t.value; final Symbol _symbol_d = _symbols[offset + 3]; final List d = (List) _symbol_d.value; final Symbol _symbol_i = _symbols[offset + 4]; final ArrayInit i = (ArrayInit) _symbol_i.value; return new ArrayCreationExpr(t.addArrayDims(d), new Opt(i)); } case 247: // dim_exprs = dim_expr.e { final Symbol _symbol_e = _symbols[offset + 1]; final Dims e = (Dims) _symbol_e.value; return new List().add(e); } case 248: // dim_exprs = dim_exprs.l dim_expr.e { final Symbol _symbol_l = _symbols[offset + 1]; final List l = (List) _symbol_l.value; final Symbol _symbol_e = _symbols[offset + 2]; final Dims e = (Dims) _symbol_e.value; return l.add(e); } case 249: // dim_expr = LBRACK.LBRACK expression.e RBRACK.RBRACK { final Symbol LBRACK = _symbols[offset + 1]; final Symbol _symbol_e = _symbols[offset + 2]; final Expr e = (Expr) _symbol_e.value; final Symbol RBRACK = _symbols[offset + 3]; return new Dims(new Opt(e)); } case 250: // dims = LBRACK.LBRACK RBRACK.RBRACK { final Symbol LBRACK = _symbols[offset + 1]; final Symbol RBRACK = _symbols[offset + 2]; Dims d = new Dims(new Opt()); d.setStart(LBRACK.getStart()); d.setEnd(RBRACK.getEnd()); return new List().add(d); } case 251: // dims = dims.l LBRACK.LBRACK RBRACK.RBRACK { final Symbol _symbol_l = _symbols[offset + 1]; final List l = (List) _symbol_l.value; final Symbol LBRACK = _symbols[offset + 2]; final Symbol RBRACK = _symbols[offset + 3]; Dims d = new Dims(new Opt()); d.setStart(LBRACK.getStart()); d.setEnd(RBRACK.getEnd()); return l.add(d); } case 252: // field_access = primary.p DOT.DOT simple_name.id { final Symbol _symbol_p = _symbols[offset + 1]; final Expr p = (Expr) _symbol_p.value; final Symbol DOT = _symbols[offset + 2]; final Symbol _symbol_id = _symbols[offset + 3]; final Access id = (Access) _symbol_id.value; return p.qualifiesAccess(id); } case 253: // field_access = SUPER.SUPER DOT.DOT simple_name.id { final Symbol SUPER = _symbols[offset + 1]; final Symbol DOT = _symbols[offset + 2]; final Symbol _symbol_id = _symbols[offset + 3]; final Access id = (Access) _symbol_id.value; SuperAccess s = new SuperAccess("super"); s.setStart(SUPER.getStart()); s.setEnd(SUPER.getEnd()); return s.qualifiesAccess(id); } case 254: // field_access = name.n DOT.DOT SUPER.SUPER DOT.DOT_ simple_name.id { final Symbol _symbol_n = _symbols[offset + 1]; final Access n = (Access) _symbol_n.value; final Symbol DOT = _symbols[offset + 2]; final Symbol SUPER = _symbols[offset + 3]; final Symbol DOT_ = _symbols[offset + 4]; final Symbol _symbol_id = _symbols[offset + 5]; final Access id = (Access) _symbol_id.value; SuperAccess s = new SuperAccess("super"); s.setStart(SUPER.getStart()); s.setEnd(SUPER.getEnd()); return n.qualifiesAccess(s).qualifiesAccess(id); } case 255: // method_invocation = name.n LPAREN.LPAREN argument_list_opt.l RPAREN.RPAREN { final Symbol _symbol_n = _symbols[offset + 1]; final Access n = (Access) _symbol_n.value; final Symbol LPAREN = _symbols[offset + 2]; final Symbol _symbol_l = _symbols[offset + 3]; final List l = (List) _symbol_l.value; final Symbol RPAREN = _symbols[offset + 4]; if(n instanceof AbstractDot) { AbstractDot d = (AbstractDot)n; ParseName pn = (ParseName)d.extractLast(); MethodAccess m = new MethodAccess(pn.getID(), l); m.setStart(pn.getStart()); // add location information m.setEnd(RPAREN.getEnd()); // add location information m.IDstart = pn.getStart(); m.IDend = pn.getStart() + pn.getID().length() - 1; d.replaceLast(m); return d; } else { ParseName pn = (ParseName)n; MethodAccess m = new MethodAccess(pn.getID(), l); m.setStart(pn.getStart()); // add location information m.setEnd(RPAREN.getEnd()); // add location information m.IDstart = pn.getStart(); m.IDend = pn.getStart() + pn.getID().length() - 1; return m; } } case 256: // method_invocation = primary.p DOT.DOT IDENTIFIER.IDENTIFIER LPAREN.LPAREN argument_list_opt.l RPAREN.RPAREN { final Symbol _symbol_p = _symbols[offset + 1]; final Expr p = (Expr) _symbol_p.value; final Symbol DOT = _symbols[offset + 2]; final Symbol IDENTIFIER = _symbols[offset + 3]; final Symbol LPAREN = _symbols[offset + 4]; final Symbol _symbol_l = _symbols[offset + 5]; final List l = (List) _symbol_l.value; final Symbol RPAREN = _symbols[offset + 6]; MethodAccess m = new MethodAccess(IDENTIFIER, l); m.setStart(IDENTIFIER.getStart()); // add location information m.setEnd(RPAREN.getEnd()); // add location information return p.qualifiesAccess(m); } case 257: // method_invocation = SUPER.SUPER DOT.DOT IDENTIFIER.IDENTIFIER LPAREN.LPAREN argument_list_opt.l RPAREN.RPAREN { final Symbol SUPER = _symbols[offset + 1]; final Symbol DOT = _symbols[offset + 2]; final Symbol IDENTIFIER = _symbols[offset + 3]; final Symbol LPAREN = _symbols[offset + 4]; final Symbol _symbol_l = _symbols[offset + 5]; final List l = (List) _symbol_l.value; final Symbol RPAREN = _symbols[offset + 6]; SuperAccess s = new SuperAccess("super"); s.setStart(SUPER.getStart()); s.setEnd(SUPER.getEnd()); MethodAccess m = new MethodAccess(IDENTIFIER, l); m.setStart(IDENTIFIER.getStart()); m.setEnd(RPAREN.getEnd()); return s.qualifiesAccess(m); } case 258: // method_invocation = name.n DOT.DOT SUPER.SUPER DOT.DOT_ IDENTIFIER.IDENTIFIER LPAREN.LPAREN argument_list_opt.l RPAREN.RPAREN { final Symbol _symbol_n = _symbols[offset + 1]; final Access n = (Access) _symbol_n.value; final Symbol DOT = _symbols[offset + 2]; final Symbol SUPER = _symbols[offset + 3]; final Symbol DOT_ = _symbols[offset + 4]; final Symbol IDENTIFIER = _symbols[offset + 5]; final Symbol LPAREN = _symbols[offset + 6]; final Symbol _symbol_l = _symbols[offset + 7]; final List l = (List) _symbol_l.value; final Symbol RPAREN = _symbols[offset + 8]; SuperAccess s = new SuperAccess("super"); s.setStart(SUPER.getStart()); s.setEnd(SUPER.getEnd()); MethodAccess m = new MethodAccess(IDENTIFIER, l); m.setStart(IDENTIFIER.getStart()); m.setEnd(RPAREN.getEnd()); return n.qualifiesAccess(s).qualifiesAccess(m); } case 259: // array_access = name.n LBRACK.LBRACK expression.e RBRACK.RBRACK { final Symbol _symbol_n = _symbols[offset + 1]; final Access n = (Access) _symbol_n.value; final Symbol LBRACK = _symbols[offset + 2]; final Symbol _symbol_e = _symbols[offset + 3]; final Expr e = (Expr) _symbol_e.value; final Symbol RBRACK = _symbols[offset + 4]; ArrayAccess a = new ArrayAccess(e); a.setStart(LBRACK.getStart()); a.setEnd(RBRACK.getEnd()); return n.qualifiesAccess(a); } case 260: // array_access = primary_no_new_array.p LBRACK.LBRACK expression.e RBRACK.RBRACK { final Symbol _symbol_p = _symbols[offset + 1]; final Expr p = (Expr) _symbol_p.value; final Symbol LBRACK = _symbols[offset + 2]; final Symbol _symbol_e = _symbols[offset + 3]; final Expr e = (Expr) _symbol_e.value; final Symbol RBRACK = _symbols[offset + 4]; ArrayAccess a = new ArrayAccess(e); a.setStart(LBRACK.getStart()); a.setEnd(RBRACK.getEnd()); return p.qualifiesAccess(a); } case 261: // postfix_expression = primary.p { final Symbol _symbol_p = _symbols[offset + 1]; final Expr p = (Expr) _symbol_p.value; return p; } case 262: // postfix_expression = name.n { final Symbol _symbol_n = _symbols[offset + 1]; final Access n = (Access) _symbol_n.value; return n; } case 263: // postfix_expression = postincrement_expression.e { final Symbol _symbol_e = _symbols[offset + 1]; final Expr e = (Expr) _symbol_e.value; return e; } case 264: // postfix_expression = postdecrement_expression.e { final Symbol _symbol_e = _symbols[offset + 1]; final Expr e = (Expr) _symbol_e.value; return e; } case 265: // postincrement_expression = postfix_expression.e PLUSPLUS.PLUSPLUS { final Symbol _symbol_e = _symbols[offset + 1]; final Expr e = (Expr) _symbol_e.value; final Symbol PLUSPLUS = _symbols[offset + 2]; return new PostIncExpr(e); } case 266: // postdecrement_expression = postfix_expression.e MINUSMINUS.MINUSMINUS { final Symbol _symbol_e = _symbols[offset + 1]; final Expr e = (Expr) _symbol_e.value; final Symbol MINUSMINUS = _symbols[offset + 2]; return new PostDecExpr(e); } case 267: // unary_expression = preincrement_expression.e { final Symbol _symbol_e = _symbols[offset + 1]; final Expr e = (Expr) _symbol_e.value; return e; } case 268: // unary_expression = predecrement_expression.e { final Symbol _symbol_e = _symbols[offset + 1]; final Expr e = (Expr) _symbol_e.value; return e; } case 269: // unary_expression = PLUS.PLUS unary_expression.e { final Symbol PLUS = _symbols[offset + 1]; final Symbol _symbol_e = _symbols[offset + 2]; final Expr e = (Expr) _symbol_e.value; return new PlusExpr(e); } case 270: // unary_expression = MINUS.MINUS unary_expression.e { final Symbol MINUS = _symbols[offset + 1]; final Symbol _symbol_e = _symbols[offset + 2]; final Expr e = (Expr) _symbol_e.value; return new MinusExpr(e); } case 271: // unary_expression = unary_expression_not_plus_minus.e { final Symbol _symbol_e = _symbols[offset + 1]; final Expr e = (Expr) _symbol_e.value; return e; } case 272: // preincrement_expression = PLUSPLUS.PLUSPLUS unary_expression.e { final Symbol PLUSPLUS = _symbols[offset + 1]; final Symbol _symbol_e = _symbols[offset + 2]; final Expr e = (Expr) _symbol_e.value; return new PreIncExpr(e); } case 273: // predecrement_expression = MINUSMINUS.MINUSMINUS unary_expression.e { final Symbol MINUSMINUS = _symbols[offset + 1]; final Symbol _symbol_e = _symbols[offset + 2]; final Expr e = (Expr) _symbol_e.value; return new PreDecExpr(e); } case 274: // unary_expression_not_plus_minus = postfix_expression.e { final Symbol _symbol_e = _symbols[offset + 1]; final Expr e = (Expr) _symbol_e.value; return e; } case 275: // unary_expression_not_plus_minus = COMP.COMP unary_expression.e { final Symbol COMP = _symbols[offset + 1]; final Symbol _symbol_e = _symbols[offset + 2]; final Expr e = (Expr) _symbol_e.value; return new BitNotExpr(e); } case 276: // unary_expression_not_plus_minus = NOT.NOT unary_expression.e { final Symbol NOT = _symbols[offset + 1]; final Symbol _symbol_e = _symbols[offset + 2]; final Expr e = (Expr) _symbol_e.value; return new LogNotExpr(e); } case 277: // unary_expression_not_plus_minus = cast_expression.e { final Symbol _symbol_e = _symbols[offset + 1]; final Expr e = (Expr) _symbol_e.value; return e; } case 278: // cast_expression = LPAREN.LPAREN primitive_type.t RPAREN.RPAREN unary_expression.e { final Symbol LPAREN = _symbols[offset + 1]; final Symbol _symbol_t = _symbols[offset + 2]; final Access t = (Access) _symbol_t.value; final Symbol RPAREN = _symbols[offset + 3]; final Symbol _symbol_e = _symbols[offset + 4]; final Expr e = (Expr) _symbol_e.value; return new CastExpr(t.addArrayDims(new List()), e); } case 279: // cast_expression = LPAREN.LPAREN primitive_type.t dims.d RPAREN.RPAREN unary_expression.e { final Symbol LPAREN = _symbols[offset + 1]; final Symbol _symbol_t = _symbols[offset + 2]; final Access t = (Access) _symbol_t.value; final Symbol _symbol_d = _symbols[offset + 3]; final List d = (List) _symbol_d.value; final Symbol RPAREN = _symbols[offset + 4]; final Symbol _symbol_e = _symbols[offset + 5]; final Expr e = (Expr) _symbol_e.value; return new CastExpr(t.addArrayDims(d), e); } case 280: // cast_expression = LPAREN.LPAREN name.t RPAREN.RPAREN unary_expression_not_plus_minus.e { final Symbol LPAREN = _symbols[offset + 1]; final Symbol _symbol_t = _symbols[offset + 2]; final Access t = (Access) _symbol_t.value; final Symbol RPAREN = _symbols[offset + 3]; final Symbol _symbol_e = _symbols[offset + 4]; final Expr e = (Expr) _symbol_e.value; return new CastExpr(t.addArrayDims(new List()), e); } case 281: // cast_expression = LPAREN.LPAREN name.t dims.d RPAREN.RPAREN unary_expression_not_plus_minus.e { final Symbol LPAREN = _symbols[offset + 1]; final Symbol _symbol_t = _symbols[offset + 2]; final Access t = (Access) _symbol_t.value; final Symbol _symbol_d = _symbols[offset + 3]; final List d = (List) _symbol_d.value; final Symbol RPAREN = _symbols[offset + 4]; final Symbol _symbol_e = _symbols[offset + 5]; final Expr e = (Expr) _symbol_e.value; return new CastExpr(t.addArrayDims(d), e); } case 282: // multiplicative_expression = unary_expression.e { final Symbol _symbol_e = _symbols[offset + 1]; final Expr e = (Expr) _symbol_e.value; return e; } case 283: // multiplicative_expression = multiplicative_expression.e1 MULT.MULT unary_expression.e2 { final Symbol _symbol_e1 = _symbols[offset + 1]; final Expr e1 = (Expr) _symbol_e1.value; final Symbol MULT = _symbols[offset + 2]; final Symbol _symbol_e2 = _symbols[offset + 3]; final Expr e2 = (Expr) _symbol_e2.value; return new MulExpr(e1, e2); } case 284: // multiplicative_expression = multiplicative_expression.e1 DIV.DIV unary_expression.e2 { final Symbol _symbol_e1 = _symbols[offset + 1]; final Expr e1 = (Expr) _symbol_e1.value; final Symbol DIV = _symbols[offset + 2]; final Symbol _symbol_e2 = _symbols[offset + 3]; final Expr e2 = (Expr) _symbol_e2.value; return new DivExpr(e1, e2); } case 285: // multiplicative_expression = multiplicative_expression.e1 MOD.MOD unary_expression.e2 { final Symbol _symbol_e1 = _symbols[offset + 1]; final Expr e1 = (Expr) _symbol_e1.value; final Symbol MOD = _symbols[offset + 2]; final Symbol _symbol_e2 = _symbols[offset + 3]; final Expr e2 = (Expr) _symbol_e2.value; return new ModExpr(e1, e2); } case 286: // additive_expression = multiplicative_expression.e { final Symbol _symbol_e = _symbols[offset + 1]; final Expr e = (Expr) _symbol_e.value; return e; } case 287: // additive_expression = additive_expression.e1 PLUS.PLUS multiplicative_expression.e2 { final Symbol _symbol_e1 = _symbols[offset + 1]; final Expr e1 = (Expr) _symbol_e1.value; final Symbol PLUS = _symbols[offset + 2]; final Symbol _symbol_e2 = _symbols[offset + 3]; final Expr e2 = (Expr) _symbol_e2.value; return new AddExpr(e1, e2); } case 288: // additive_expression = additive_expression.e1 MINUS.MINUS multiplicative_expression.e2 { final Symbol _symbol_e1 = _symbols[offset + 1]; final Expr e1 = (Expr) _symbol_e1.value; final Symbol MINUS = _symbols[offset + 2]; final Symbol _symbol_e2 = _symbols[offset + 3]; final Expr e2 = (Expr) _symbol_e2.value; return new SubExpr(e1, e2); } case 289: // shift_expression = additive_expression.e { final Symbol _symbol_e = _symbols[offset + 1]; final Expr e = (Expr) _symbol_e.value; return e; } case 290: // shift_expression = shift_expression.e1 LSHIFT.LSHIFT additive_expression.e2 { final Symbol _symbol_e1 = _symbols[offset + 1]; final Expr e1 = (Expr) _symbol_e1.value; final Symbol LSHIFT = _symbols[offset + 2]; final Symbol _symbol_e2 = _symbols[offset + 3]; final Expr e2 = (Expr) _symbol_e2.value; return new LShiftExpr(e1, e2); } case 291: // shift_expression = shift_expression.e1 RSHIFT.RSHIFT additive_expression.e2 { final Symbol _symbol_e1 = _symbols[offset + 1]; final Expr e1 = (Expr) _symbol_e1.value; final Symbol RSHIFT = _symbols[offset + 2]; final Symbol _symbol_e2 = _symbols[offset + 3]; final Expr e2 = (Expr) _symbol_e2.value; return new RShiftExpr(e1, e2); } case 292: // shift_expression = shift_expression.e1 URSHIFT.URSHIFT additive_expression.e2 { final Symbol _symbol_e1 = _symbols[offset + 1]; final Expr e1 = (Expr) _symbol_e1.value; final Symbol URSHIFT = _symbols[offset + 2]; final Symbol _symbol_e2 = _symbols[offset + 3]; final Expr e2 = (Expr) _symbol_e2.value; return new URShiftExpr(e1, e2); } case 293: // relational_expression = shift_expression.e { final Symbol _symbol_e = _symbols[offset + 1]; final Expr e = (Expr) _symbol_e.value; return e; } case 294: // relational_expression = relational_expression.e1 LT.LT shift_expression.e2 { final Symbol _symbol_e1 = _symbols[offset + 1]; final Expr e1 = (Expr) _symbol_e1.value; final Symbol LT = _symbols[offset + 2]; final Symbol _symbol_e2 = _symbols[offset + 3]; final Expr e2 = (Expr) _symbol_e2.value; return new LTExpr(e1, e2); } case 295: // relational_expression = relational_expression.e1 GT.GT shift_expression.e2 { final Symbol _symbol_e1 = _symbols[offset + 1]; final Expr e1 = (Expr) _symbol_e1.value; final Symbol GT = _symbols[offset + 2]; final Symbol _symbol_e2 = _symbols[offset + 3]; final Expr e2 = (Expr) _symbol_e2.value; return new GTExpr(e1, e2); } case 296: // relational_expression = relational_expression.e1 LTEQ.LTEQ shift_expression.e2 { final Symbol _symbol_e1 = _symbols[offset + 1]; final Expr e1 = (Expr) _symbol_e1.value; final Symbol LTEQ = _symbols[offset + 2]; final Symbol _symbol_e2 = _symbols[offset + 3]; final Expr e2 = (Expr) _symbol_e2.value; return new LEExpr(e1, e2); } case 297: // relational_expression = relational_expression.e1 GTEQ.GTEQ shift_expression.e2 { final Symbol _symbol_e1 = _symbols[offset + 1]; final Expr e1 = (Expr) _symbol_e1.value; final Symbol GTEQ = _symbols[offset + 2]; final Symbol _symbol_e2 = _symbols[offset + 3]; final Expr e2 = (Expr) _symbol_e2.value; return new GEExpr(e1, e2); } case 298: // relational_expression = relational_expression.e INSTANCEOF.INSTANCEOF reference_type.t { final Symbol _symbol_e = _symbols[offset + 1]; final Expr e = (Expr) _symbol_e.value; final Symbol INSTANCEOF = _symbols[offset + 2]; final Symbol _symbol_t = _symbols[offset + 3]; final Access t = (Access) _symbol_t.value; return new InstanceOfExpr(e, t); } case 299: // equality_expression = relational_expression.e { final Symbol _symbol_e = _symbols[offset + 1]; final Expr e = (Expr) _symbol_e.value; return e; } case 300: // equality_expression = equality_expression.e1 EQEQ.EQEQ relational_expression.e2 { final Symbol _symbol_e1 = _symbols[offset + 1]; final Expr e1 = (Expr) _symbol_e1.value; final Symbol EQEQ = _symbols[offset + 2]; final Symbol _symbol_e2 = _symbols[offset + 3]; final Expr e2 = (Expr) _symbol_e2.value; return new EQExpr(e1, e2); } case 301: // equality_expression = equality_expression.e1 NOTEQ.NOTEQ relational_expression.e2 { final Symbol _symbol_e1 = _symbols[offset + 1]; final Expr e1 = (Expr) _symbol_e1.value; final Symbol NOTEQ = _symbols[offset + 2]; final Symbol _symbol_e2 = _symbols[offset + 3]; final Expr e2 = (Expr) _symbol_e2.value; return new NEExpr(e1, e2); } case 302: // and_expression = equality_expression.e { final Symbol _symbol_e = _symbols[offset + 1]; final Expr e = (Expr) _symbol_e.value; return e; } case 303: // and_expression = and_expression.e1 AND.AND equality_expression.e2 { final Symbol _symbol_e1 = _symbols[offset + 1]; final Expr e1 = (Expr) _symbol_e1.value; final Symbol AND = _symbols[offset + 2]; final Symbol _symbol_e2 = _symbols[offset + 3]; final Expr e2 = (Expr) _symbol_e2.value; return new AndBitwiseExpr(e1, e2); } case 304: // exclusive_or_expression = and_expression.e { final Symbol _symbol_e = _symbols[offset + 1]; final Expr e = (Expr) _symbol_e.value; return e; } case 305: // exclusive_or_expression = exclusive_or_expression.e1 XOR.XOR and_expression.e2 { final Symbol _symbol_e1 = _symbols[offset + 1]; final Expr e1 = (Expr) _symbol_e1.value; final Symbol XOR = _symbols[offset + 2]; final Symbol _symbol_e2 = _symbols[offset + 3]; final Expr e2 = (Expr) _symbol_e2.value; return new XorBitwiseExpr(e1, e2); } case 306: // inclusive_or_expression = exclusive_or_expression.e { final Symbol _symbol_e = _symbols[offset + 1]; final Expr e = (Expr) _symbol_e.value; return e; } case 307: // inclusive_or_expression = inclusive_or_expression.e1 OR.OR exclusive_or_expression.e2 { final Symbol _symbol_e1 = _symbols[offset + 1]; final Expr e1 = (Expr) _symbol_e1.value; final Symbol OR = _symbols[offset + 2]; final Symbol _symbol_e2 = _symbols[offset + 3]; final Expr e2 = (Expr) _symbol_e2.value; return new OrBitwiseExpr(e1, e2); } case 308: // conditional_and_expression = inclusive_or_expression.e { final Symbol _symbol_e = _symbols[offset + 1]; final Expr e = (Expr) _symbol_e.value; return e; } case 309: // conditional_and_expression = conditional_and_expression.e1 ANDAND.ANDAND inclusive_or_expression.e2 { final Symbol _symbol_e1 = _symbols[offset + 1]; final Expr e1 = (Expr) _symbol_e1.value; final Symbol ANDAND = _symbols[offset + 2]; final Symbol _symbol_e2 = _symbols[offset + 3]; final Expr e2 = (Expr) _symbol_e2.value; return new AndLogicalExpr(e1, e2); } case 310: // conditional_or_expression = conditional_and_expression.e { final Symbol _symbol_e = _symbols[offset + 1]; final Expr e = (Expr) _symbol_e.value; return e; } case 311: // conditional_or_expression = conditional_or_expression.e1 OROR.OROR conditional_and_expression.e2 { final Symbol _symbol_e1 = _symbols[offset + 1]; final Expr e1 = (Expr) _symbol_e1.value; final Symbol OROR = _symbols[offset + 2]; final Symbol _symbol_e2 = _symbols[offset + 3]; final Expr e2 = (Expr) _symbol_e2.value; return new OrLogicalExpr(e1, e2); } case 312: // conditional_expression = conditional_or_expression.c { final Symbol _symbol_c = _symbols[offset + 1]; final Expr c = (Expr) _symbol_c.value; return c; } case 313: // conditional_expression = conditional_or_expression.c QUESTION.QUESTION expression.e1 COLON.COLON conditional_expression.e2 { final Symbol _symbol_c = _symbols[offset + 1]; final Expr c = (Expr) _symbol_c.value; final Symbol QUESTION = _symbols[offset + 2]; final Symbol _symbol_e1 = _symbols[offset + 3]; final Expr e1 = (Expr) _symbol_e1.value; final Symbol COLON = _symbols[offset + 4]; final Symbol _symbol_e2 = _symbols[offset + 5]; final Expr e2 = (Expr) _symbol_e2.value; return new ConditionalExpr(c, e1, e2); } case 314: // assignment_expression = conditional_expression.c { final Symbol _symbol_c = _symbols[offset + 1]; final Expr c = (Expr) _symbol_c.value; return c; } case 315: // assignment_expression = assignment.a { final Symbol _symbol_a = _symbols[offset + 1]; final Expr a = (Expr) _symbol_a.value; return a; } case 316: // assignment = postfix_expression.dest EQ.EQ assignment_expression.source { final Symbol _symbol_dest = _symbols[offset + 1]; final Expr dest = (Expr) _symbol_dest.value; final Symbol EQ = _symbols[offset + 2]; final Symbol _symbol_source = _symbols[offset + 3]; final Expr source = (Expr) _symbol_source.value; return new AssignSimpleExpr(dest, source); } case 317: // assignment = postfix_expression.dest MULTEQ.MULTEQ assignment_expression.source { final Symbol _symbol_dest = _symbols[offset + 1]; final Expr dest = (Expr) _symbol_dest.value; final Symbol MULTEQ = _symbols[offset + 2]; final Symbol _symbol_source = _symbols[offset + 3]; final Expr source = (Expr) _symbol_source.value; return new AssignMulExpr(dest, source); } case 318: // assignment = postfix_expression.dest DIVEQ.DIVEQ assignment_expression.source { final Symbol _symbol_dest = _symbols[offset + 1]; final Expr dest = (Expr) _symbol_dest.value; final Symbol DIVEQ = _symbols[offset + 2]; final Symbol _symbol_source = _symbols[offset + 3]; final Expr source = (Expr) _symbol_source.value; return new AssignDivExpr(dest, source); } case 319: // assignment = postfix_expression.dest MODEQ.MODEQ assignment_expression.source { final Symbol _symbol_dest = _symbols[offset + 1]; final Expr dest = (Expr) _symbol_dest.value; final Symbol MODEQ = _symbols[offset + 2]; final Symbol _symbol_source = _symbols[offset + 3]; final Expr source = (Expr) _symbol_source.value; return new AssignModExpr(dest, source); } case 320: // assignment = postfix_expression.dest PLUSEQ.PLUSEQ assignment_expression.source { final Symbol _symbol_dest = _symbols[offset + 1]; final Expr dest = (Expr) _symbol_dest.value; final Symbol PLUSEQ = _symbols[offset + 2]; final Symbol _symbol_source = _symbols[offset + 3]; final Expr source = (Expr) _symbol_source.value; return new AssignPlusExpr(dest, source); } case 321: // assignment = postfix_expression.dest MINUSEQ.MINUSEQ assignment_expression.source { final Symbol _symbol_dest = _symbols[offset + 1]; final Expr dest = (Expr) _symbol_dest.value; final Symbol MINUSEQ = _symbols[offset + 2]; final Symbol _symbol_source = _symbols[offset + 3]; final Expr source = (Expr) _symbol_source.value; return new AssignMinusExpr(dest, source); } case 322: // assignment = postfix_expression.dest LSHIFTEQ.LSHIFTEQ assignment_expression.source { final Symbol _symbol_dest = _symbols[offset + 1]; final Expr dest = (Expr) _symbol_dest.value; final Symbol LSHIFTEQ = _symbols[offset + 2]; final Symbol _symbol_source = _symbols[offset + 3]; final Expr source = (Expr) _symbol_source.value; return new AssignLShiftExpr(dest, source); } case 323: // assignment = postfix_expression.dest RSHIFTEQ.RSHIFTEQ assignment_expression.source { final Symbol _symbol_dest = _symbols[offset + 1]; final Expr dest = (Expr) _symbol_dest.value; final Symbol RSHIFTEQ = _symbols[offset + 2]; final Symbol _symbol_source = _symbols[offset + 3]; final Expr source = (Expr) _symbol_source.value; return new AssignRShiftExpr(dest, source); } case 324: // assignment = postfix_expression.dest URSHIFTEQ.URSHIFTEQ assignment_expression.source { final Symbol _symbol_dest = _symbols[offset + 1]; final Expr dest = (Expr) _symbol_dest.value; final Symbol URSHIFTEQ = _symbols[offset + 2]; final Symbol _symbol_source = _symbols[offset + 3]; final Expr source = (Expr) _symbol_source.value; return new AssignURShiftExpr(dest, source); } case 325: // assignment = postfix_expression.dest ANDEQ.ANDEQ assignment_expression.source { final Symbol _symbol_dest = _symbols[offset + 1]; final Expr dest = (Expr) _symbol_dest.value; final Symbol ANDEQ = _symbols[offset + 2]; final Symbol _symbol_source = _symbols[offset + 3]; final Expr source = (Expr) _symbol_source.value; return new AssignAndExpr(dest, source); } case 326: // assignment = postfix_expression.dest XOREQ.XOREQ assignment_expression.source { final Symbol _symbol_dest = _symbols[offset + 1]; final Expr dest = (Expr) _symbol_dest.value; final Symbol XOREQ = _symbols[offset + 2]; final Symbol _symbol_source = _symbols[offset + 3]; final Expr source = (Expr) _symbol_source.value; return new AssignXorExpr(dest, source); } case 327: // assignment = postfix_expression.dest OREQ.OREQ assignment_expression.source { final Symbol _symbol_dest = _symbols[offset + 1]; final Expr dest = (Expr) _symbol_dest.value; final Symbol OREQ = _symbols[offset + 2]; final Symbol _symbol_source = _symbols[offset + 3]; final Expr source = (Expr) _symbol_source.value; return new AssignOrExpr(dest, source); } case 328: // expression = assignment_expression.a { final Symbol _symbol_a = _symbols[offset + 1]; final Expr a = (Expr) _symbol_a.value; return a; } case 329: // constant_expression = expression.e { final Symbol _symbol_e = _symbols[offset + 1]; final Expr e = (Expr) _symbol_e.value; return e; } case 330: // class_body_declaration = error.error SEMICOLON.SEMICOLON { final Symbol error = _symbols[offset + 1]; final Symbol SEMICOLON = _symbols[offset + 2]; return new InstanceInitializer(new Block()); } case 331: // class_body_declaration = error.error LBRACE.LBRACE { final Symbol error = _symbols[offset + 1]; final Symbol LBRACE = _symbols[offset + 2]; return new InstanceInitializer(new Block()); } case 332: // block = LBRACE.LBRACE error.error RBRACE.RBRACE { final Symbol LBRACE = _symbols[offset + 1]; final Symbol error = _symbols[offset + 2]; final Symbol RBRACE = _symbols[offset + 3]; return new Block(new List()); } case 333: // switch_block = LBRACE.LBRACE error.error RBRACE.RBRACE { final Symbol LBRACE = _symbols[offset + 1]; final Symbol error = _symbols[offset + 2]; final Symbol RBRACE = _symbols[offset + 3]; return new Block(new List()); } case 334: // statement = error.error SEMICOLON.SEMICOLON { final Symbol error = _symbols[offset + 1]; final Symbol SEMICOLON = _symbols[offset + 2]; return new EmptyStmt(); } case 335: // type_declaration = annotation_type_declaration.i { final Symbol _symbol_i = _symbols[offset + 1]; final AnnotationDecl i = (AnnotationDecl) _symbol_i.value; return i; } case 336: // interface_member_declaration = annotation_type_declaration.i { final Symbol _symbol_i = _symbols[offset + 1]; final AnnotationDecl i = (AnnotationDecl) _symbol_i.value; MemberInterfaceDecl mid = new MemberInterfaceDecl(i); mid.setStart(i.getStart()); mid.setEnd(i.getEnd()); return mid; } case 337: // class_member_declaration = annotation_type_declaration.i { final Symbol _symbol_i = _symbols[offset + 1]; final AnnotationDecl i = (AnnotationDecl) _symbol_i.value; MemberInterfaceDecl mid = new MemberInterfaceDecl(i); mid.setStart(i.getStart()); mid.setEnd(i.getEnd()); return mid; } case 338: // annotation_type_declaration = AT.AT INTERFACE.INTERFACE IDENTIFIER.IDENTIFIER annotation_type_body.b { final Symbol AT = _symbols[offset + 1]; final Symbol INTERFACE = _symbols[offset + 2]; final Symbol IDENTIFIER = _symbols[offset + 3]; final Symbol _symbol_b = _symbols[offset + 4]; final List b = (List) _symbol_b.value; AnnotationDecl a = new AnnotationDecl(new Modifiers(new List()), IDENTIFIER, b); a.setStart(new List().getStart()); a.setEnd(b.getEnd()); return a; } case 339: // annotation_type_declaration = modifiers.m AT.AT INTERFACE.INTERFACE IDENTIFIER.IDENTIFIER annotation_type_body.b { final Symbol _symbol_m = _symbols[offset + 1]; final List m = (List) _symbol_m.value; final Symbol AT = _symbols[offset + 2]; final Symbol INTERFACE = _symbols[offset + 3]; final Symbol IDENTIFIER = _symbols[offset + 4]; final Symbol _symbol_b = _symbols[offset + 5]; final List b = (List) _symbol_b.value; AnnotationDecl a = new AnnotationDecl(new Modifiers(m), IDENTIFIER, b); a.setStart(m.getStart()); a.setEnd(b.getEnd()); return a; } case 340: // annotation_type_body = LBRACE.LBRACE annotation_type_element_declarations_opt.i RBRACE.RBRACE { final Symbol LBRACE = _symbols[offset + 1]; final Symbol _symbol_i = _symbols[offset + 2]; final List i = (List) _symbol_i.value; final Symbol RBRACE = _symbols[offset + 3]; return i; } case 341: // annotation_type_element_declarations = annotation_type_element_declaration.i { final Symbol _symbol_i = _symbols[offset + 1]; final BodyDecl i = (BodyDecl) _symbol_i.value; return new List().add(i); } case 342: // annotation_type_element_declarations = annotation_type_element_declarations.l annotation_type_element_declaration.i { final Symbol _symbol_l = _symbols[offset + 1]; final List l = (List) _symbol_l.value; final Symbol _symbol_i = _symbols[offset + 2]; final BodyDecl i = (BodyDecl) _symbol_i.value; return l.add(i); } case 343: // annotation_type_element_declaration = type.t IDENTIFIER.IDENTIFIER LPAREN.LPAREN RPAREN.RPAREN default_value_opt.default_value SEMICOLON.SEMICOLON { final Symbol _symbol_t = _symbols[offset + 1]; final Access t = (Access) _symbol_t.value; final Symbol IDENTIFIER = _symbols[offset + 2]; final Symbol LPAREN = _symbols[offset + 3]; final Symbol RPAREN = _symbols[offset + 4]; final Symbol _symbol_default_value = _symbols[offset + 5]; final Opt default_value = (Opt) _symbol_default_value.value; final Symbol SEMICOLON = _symbols[offset + 6]; AnnotationMethodDecl a = new AnnotationMethodDecl(new Modifiers(new List()), t, IDENTIFIER, new List(), new List(), new Opt(), default_value); a.setStart(new List().getStart()); a.setEnd(SEMICOLON.getEnd()); return a; } case 344: // annotation_type_element_declaration = modifiers.m type.t IDENTIFIER.IDENTIFIER LPAREN.LPAREN RPAREN.RPAREN default_value_opt.default_value SEMICOLON.SEMICOLON { final Symbol _symbol_m = _symbols[offset + 1]; final List m = (List) _symbol_m.value; final Symbol _symbol_t = _symbols[offset + 2]; final Access t = (Access) _symbol_t.value; final Symbol IDENTIFIER = _symbols[offset + 3]; final Symbol LPAREN = _symbols[offset + 4]; final Symbol RPAREN = _symbols[offset + 5]; final Symbol _symbol_default_value = _symbols[offset + 6]; final Opt default_value = (Opt) _symbol_default_value.value; final Symbol SEMICOLON = _symbols[offset + 7]; AnnotationMethodDecl a = new AnnotationMethodDecl(new Modifiers(m), t, IDENTIFIER, new List(), new List(), new Opt(), default_value); a.setStart(m.getStart()); a.setEnd(SEMICOLON.getEnd()); return a; } case 346: // annotation_type_element_declaration = class_declaration.class_declaration { final Symbol _symbol_class_declaration = _symbols[offset + 1]; final ClassDecl class_declaration = (ClassDecl) _symbol_class_declaration.value; MemberClassDecl m = new MemberClassDecl(class_declaration); m.setStart(class_declaration.getStart()); m.setEnd(class_declaration.getEnd()); return m; } case 347: // annotation_type_element_declaration = interface_declaration.interface_declaration { final Symbol _symbol_interface_declaration = _symbols[offset + 1]; final InterfaceDecl interface_declaration = (InterfaceDecl) _symbol_interface_declaration.value; MemberInterfaceDecl m = new MemberInterfaceDecl(interface_declaration); m.setStart(interface_declaration.getStart()); m.setEnd(interface_declaration.getEnd()); return m; } case 348: // annotation_type_element_declaration = enum_declaration.enum_declaration { final Symbol _symbol_enum_declaration = _symbols[offset + 1]; final EnumDecl enum_declaration = (EnumDecl) _symbol_enum_declaration.value; MemberClassDecl m = new MemberClassDecl(enum_declaration); m.setStart(enum_declaration.getStart()); m.setEnd(enum_declaration.getEnd()); return m; } case 349: // annotation_type_element_declaration = annotation_type_declaration.annotation_type_declaration { final Symbol _symbol_annotation_type_declaration = _symbols[offset + 1]; final AnnotationDecl annotation_type_declaration = (AnnotationDecl) _symbol_annotation_type_declaration.value; MemberInterfaceDecl m = new MemberInterfaceDecl(annotation_type_declaration); m.setStart(annotation_type_declaration.getStart()); m.setEnd(annotation_type_declaration.getEnd()); return m; } case 350: // annotation_type_element_declaration = SEMICOLON.SEMICOLON { final Symbol SEMICOLON = _symbols[offset + 1]; return new StaticInitializer(new Block()); } case 351: // default_value = DEFAULT.DEFAULT element_value.element_value { final Symbol DEFAULT = _symbols[offset + 1]; final Symbol _symbol_element_value = _symbols[offset + 2]; final ElementValue element_value = (ElementValue) _symbol_element_value.value; return element_value; } case 356: // normal_annotation = AT.AT name.name LPAREN.LPAREN element_value_pairs_opt.element_value_pairs RPAREN.RPAREN { final Symbol AT = _symbols[offset + 1]; final Symbol _symbol_name = _symbols[offset + 2]; final Access name = (Access) _symbol_name.value; final Symbol LPAREN = _symbols[offset + 3]; final Symbol _symbol_element_value_pairs = _symbols[offset + 4]; final List element_value_pairs = (List) _symbol_element_value_pairs.value; final Symbol RPAREN = _symbols[offset + 5]; Annotation a = new Annotation("annotation", name, element_value_pairs); a.setStart(AT.getStart()); a.setEnd(RPAREN.getEnd()); return a; } case 357: // element_value_pairs = element_value_pair.element_value_pair { final Symbol _symbol_element_value_pair = _symbols[offset + 1]; final ElementValuePair element_value_pair = (ElementValuePair) _symbol_element_value_pair.value; return new List().add(element_value_pair); } case 358: // element_value_pairs = element_value_pairs.element_value_pairs COMMA.COMMA element_value_pair.element_value_pair { final Symbol _symbol_element_value_pairs = _symbols[offset + 1]; final List element_value_pairs = (List) _symbol_element_value_pairs.value; final Symbol COMMA = _symbols[offset + 2]; final Symbol _symbol_element_value_pair = _symbols[offset + 3]; final ElementValuePair element_value_pair = (ElementValuePair) _symbol_element_value_pair.value; return element_value_pairs.add(element_value_pair); } case 359: // element_value_pair = IDENTIFIER.IDENTIFIER EQ.EQ element_value.element_value { final Symbol IDENTIFIER = _symbols[offset + 1]; final Symbol EQ = _symbols[offset + 2]; final Symbol _symbol_element_value = _symbols[offset + 3]; final ElementValue element_value = (ElementValue) _symbol_element_value.value; ElementValuePair evp = new ElementValuePair(IDENTIFIER, element_value); evp.setStart(IDENTIFIER.getStart()); evp.setEnd(element_value.getEnd()); return evp; } case 360: // element_value = conditional_expression.conditional_expression { final Symbol _symbol_conditional_expression = _symbols[offset + 1]; final Expr conditional_expression = (Expr) _symbol_conditional_expression.value; ElementConstantValue e = new ElementConstantValue(conditional_expression); e.setStart(conditional_expression.getStart()); e.setEnd(conditional_expression.getEnd()); return e; } case 361: // element_value = annotation.annotation { final Symbol _symbol_annotation = _symbols[offset + 1]; final Annotation annotation = (Annotation) _symbol_annotation.value; return new ElementAnnotationValue(annotation); } case 362: // element_value = element_value_array_initializer.e { final Symbol _symbol_e = _symbols[offset + 1]; final ElementArrayValue e = (ElementArrayValue) _symbol_e.value; return e; } case 363: // element_value_array_initializer = LBRACE.LBRACE RBRACE.RBRACE { final Symbol LBRACE = _symbols[offset + 1]; final Symbol RBRACE = _symbols[offset + 2]; return new ElementArrayValue(new List()); } case 364: // element_value_array_initializer = LBRACE.LBRACE element_values.element_values RBRACE.RBRACE { final Symbol LBRACE = _symbols[offset + 1]; final Symbol _symbol_element_values = _symbols[offset + 2]; final List element_values = (List) _symbol_element_values.value; final Symbol RBRACE = _symbols[offset + 3]; return new ElementArrayValue(element_values); } case 365: // element_value_array_initializer = LBRACE.LBRACE COMMA.COMMA RBRACE.RBRACE { final Symbol LBRACE = _symbols[offset + 1]; final Symbol COMMA = _symbols[offset + 2]; final Symbol RBRACE = _symbols[offset + 3]; return new ElementArrayValue(new List()); } case 366: // element_value_array_initializer = LBRACE.LBRACE element_values.element_values COMMA.COMMA RBRACE.RBRACE { final Symbol LBRACE = _symbols[offset + 1]; final Symbol _symbol_element_values = _symbols[offset + 2]; final List element_values = (List) _symbol_element_values.value; final Symbol COMMA = _symbols[offset + 3]; final Symbol RBRACE = _symbols[offset + 4]; return new ElementArrayValue(element_values); } case 367: // element_values = element_value.element_value { final Symbol _symbol_element_value = _symbols[offset + 1]; final ElementValue element_value = (ElementValue) _symbol_element_value.value; return new List().add(element_value); } case 368: // element_values = element_values.element_values COMMA.COMMA element_value.element_value { final Symbol _symbol_element_values = _symbols[offset + 1]; final List element_values = (List) _symbol_element_values.value; final Symbol COMMA = _symbols[offset + 2]; final Symbol _symbol_element_value = _symbols[offset + 3]; final ElementValue element_value = (ElementValue) _symbol_element_value.value; return element_values.add(element_value); } case 369: // marker_annotation = AT.AT name.name { final Symbol AT = _symbols[offset + 1]; final Symbol _symbol_name = _symbols[offset + 2]; final Access name = (Access) _symbol_name.value; return new Annotation("annotation", name, new List()); } case 370: // single_element_annotation = AT.AT name.name LPAREN.LPAREN element_value.element_value RPAREN.RPAREN { final Symbol AT = _symbols[offset + 1]; final Symbol _symbol_name = _symbols[offset + 2]; final Access name = (Access) _symbol_name.value; final Symbol LPAREN = _symbols[offset + 3]; final Symbol _symbol_element_value = _symbols[offset + 4]; final ElementValue element_value = (ElementValue) _symbol_element_value.value; final Symbol RPAREN = _symbols[offset + 5]; Annotation a = new Annotation("annotation", name, new List().add(new ElementValuePair("value", element_value))); a.setStart(AT.getStart()); a.setEnd(RPAREN.getEnd()); return a; } case 371: // compilation_unit = modifiers.a package_declaration.p { final Symbol _symbol_a = _symbols[offset + 1]; final List a = (List) _symbol_a.value; final Symbol _symbol_p = _symbols[offset + 2]; final IdUse p = (IdUse) _symbol_p.value; return new AnnotatedCompilationUnit(p.getID(), new List(), new List(), new Modifiers(a)); } case 372: // compilation_unit = modifiers.a package_declaration.p import_declarations.i { final Symbol _symbol_a = _symbols[offset + 1]; final List a = (List) _symbol_a.value; final Symbol _symbol_p = _symbols[offset + 2]; final IdUse p = (IdUse) _symbol_p.value; final Symbol _symbol_i = _symbols[offset + 3]; final List i = (List) _symbol_i.value; return new AnnotatedCompilationUnit(p.getID(), i, new List(), new Modifiers(a)); } case 373: // compilation_unit = modifiers.a package_declaration.p type_declarations.t { final Symbol _symbol_a = _symbols[offset + 1]; final List a = (List) _symbol_a.value; final Symbol _symbol_p = _symbols[offset + 2]; final IdUse p = (IdUse) _symbol_p.value; final Symbol _symbol_t = _symbols[offset + 3]; final List t = (List) _symbol_t.value; return new AnnotatedCompilationUnit(p.getID(), new List(), t, new Modifiers(a)); } case 374: // compilation_unit = modifiers.a package_declaration.p import_declarations.i type_declarations.t { final Symbol _symbol_a = _symbols[offset + 1]; final List a = (List) _symbol_a.value; final Symbol _symbol_p = _symbols[offset + 2]; final IdUse p = (IdUse) _symbol_p.value; final Symbol _symbol_i = _symbols[offset + 3]; final List i = (List) _symbol_i.value; final Symbol _symbol_t = _symbols[offset + 4]; final List t = (List) _symbol_t.value; return new AnnotatedCompilationUnit(p.getID(), i, t, new Modifiers(a)); } case 375: // statement = enhanced_for_statement.f { final Symbol _symbol_f = _symbols[offset + 1]; final Stmt f = (Stmt) _symbol_f.value; return f; } case 376: // statement_no_short_if = enhanced_for_statement_no_short_if.f { final Symbol _symbol_f = _symbols[offset + 1]; final Stmt f = (Stmt) _symbol_f.value; return f; } case 377: // enhanced_for_statement = FOR.FOR LPAREN.LPAREN enhanced_for_parameter.p COLON.COLON expression.e RPAREN.RPAREN statement.s { final Symbol FOR = _symbols[offset + 1]; final Symbol LPAREN = _symbols[offset + 2]; final Symbol _symbol_p = _symbols[offset + 3]; final VariableDeclaration p = (VariableDeclaration) _symbol_p.value; final Symbol COLON = _symbols[offset + 4]; final Symbol _symbol_e = _symbols[offset + 5]; final Expr e = (Expr) _symbol_e.value; final Symbol RPAREN = _symbols[offset + 6]; final Symbol _symbol_s = _symbols[offset + 7]; final Stmt s = (Stmt) _symbol_s.value; return new EnhancedForStmt(p, e, s); } case 378: // enhanced_for_statement_no_short_if = FOR.FOR LPAREN.LPAREN enhanced_for_parameter.p COLON.COLON expression.e RPAREN.RPAREN statement_no_short_if.s { final Symbol FOR = _symbols[offset + 1]; final Symbol LPAREN = _symbols[offset + 2]; final Symbol _symbol_p = _symbols[offset + 3]; final VariableDeclaration p = (VariableDeclaration) _symbol_p.value; final Symbol COLON = _symbols[offset + 4]; final Symbol _symbol_e = _symbols[offset + 5]; final Expr e = (Expr) _symbol_e.value; final Symbol RPAREN = _symbols[offset + 6]; final Symbol _symbol_s = _symbols[offset + 7]; final Stmt s = (Stmt) _symbol_s.value; return new EnhancedForStmt(p, e, s); } case 379: // enhanced_for_parameter = type.t IDENTIFIER.IDENTIFIER dims_opt.d { final Symbol _symbol_t = _symbols[offset + 1]; final Access t = (Access) _symbol_t.value; final Symbol IDENTIFIER = _symbols[offset + 2]; final Symbol _symbol_d = _symbols[offset + 3]; final List d = (List) _symbol_d.value; return new VariableDeclaration(new Modifiers(new List()), t.addArrayDims(d), IDENTIFIER, new Opt()); } case 380: // enhanced_for_parameter = modifiers.m type.t IDENTIFIER.IDENTIFIER dims_opt.d { final Symbol _symbol_m = _symbols[offset + 1]; final List m = (List) _symbol_m.value; final Symbol _symbol_t = _symbols[offset + 2]; final Access t = (Access) _symbol_t.value; final Symbol IDENTIFIER = _symbols[offset + 3]; final Symbol _symbol_d = _symbols[offset + 4]; final List d = (List) _symbol_d.value; return new VariableDeclaration(new Modifiers(m), t.addArrayDims(d), IDENTIFIER, new Opt()); } case 381: // type_declaration = enum_declaration.i { final Symbol _symbol_i = _symbols[offset + 1]; final EnumDecl i = (EnumDecl) _symbol_i.value; return i; } case 382: // interface_member_declaration = enum_declaration.i { final Symbol _symbol_i = _symbols[offset + 1]; final EnumDecl i = (EnumDecl) _symbol_i.value; return new MemberClassDecl(i); } case 383: // class_member_declaration = enum_declaration.i { final Symbol _symbol_i = _symbols[offset + 1]; final EnumDecl i = (EnumDecl) _symbol_i.value; return new MemberClassDecl(i); } case 384: // enum_declaration = ENUM.ENUM IDENTIFIER.id enum_body.b { final Symbol ENUM = _symbols[offset + 1]; final Symbol id = _symbols[offset + 2]; final Symbol _symbol_b = _symbols[offset + 3]; final List b = (List) _symbol_b.value; return new EnumDecl(new Modifiers(new List()), ((String)id.value), new List(), b); } case 385: // enum_declaration = modifiers.m ENUM.ENUM IDENTIFIER.id enum_body.b { final Symbol _symbol_m = _symbols[offset + 1]; final List m = (List) _symbol_m.value; final Symbol ENUM = _symbols[offset + 2]; final Symbol id = _symbols[offset + 3]; final Symbol _symbol_b = _symbols[offset + 4]; final List b = (List) _symbol_b.value; return new EnumDecl(new Modifiers(m), ((String)id.value), new List(), b); } case 386: // enum_declaration = ENUM.ENUM IDENTIFIER.id interfaces.i enum_body.b { final Symbol ENUM = _symbols[offset + 1]; final Symbol id = _symbols[offset + 2]; final Symbol _symbol_i = _symbols[offset + 3]; final List i = (List) _symbol_i.value; final Symbol _symbol_b = _symbols[offset + 4]; final List b = (List) _symbol_b.value; return new EnumDecl(new Modifiers(new List()), ((String)id.value), i, b); } case 387: // enum_declaration = modifiers.m ENUM.ENUM IDENTIFIER.id interfaces.i enum_body.b { final Symbol _symbol_m = _symbols[offset + 1]; final List m = (List) _symbol_m.value; final Symbol ENUM = _symbols[offset + 2]; final Symbol id = _symbols[offset + 3]; final Symbol _symbol_i = _symbols[offset + 4]; final List i = (List) _symbol_i.value; final Symbol _symbol_b = _symbols[offset + 5]; final List b = (List) _symbol_b.value; return new EnumDecl(new Modifiers(m), ((String)id.value), i, b); } case 388: // enum_body = LBRACE.LBRACE RBRACE.RBRACE { final Symbol LBRACE = _symbols[offset + 1]; final Symbol RBRACE = _symbols[offset + 2]; return new List(); } case 389: // enum_body = LBRACE.LBRACE enum_constants.enum_constants RBRACE.RBRACE { final Symbol LBRACE = _symbols[offset + 1]; final Symbol _symbol_enum_constants = _symbols[offset + 2]; final List enum_constants = (List) _symbol_enum_constants.value; final Symbol RBRACE = _symbols[offset + 3]; return enum_constants; } case 390: // enum_body = LBRACE.LBRACE COMMA.COMMA RBRACE.RBRACE { final Symbol LBRACE = _symbols[offset + 1]; final Symbol COMMA = _symbols[offset + 2]; final Symbol RBRACE = _symbols[offset + 3]; return new List(); } case 391: // enum_body = LBRACE.LBRACE enum_constants.enum_constants COMMA.COMMA RBRACE.RBRACE { final Symbol LBRACE = _symbols[offset + 1]; final Symbol _symbol_enum_constants = _symbols[offset + 2]; final List enum_constants = (List) _symbol_enum_constants.value; final Symbol COMMA = _symbols[offset + 3]; final Symbol RBRACE = _symbols[offset + 4]; return enum_constants; } case 392: // enum_body = LBRACE.LBRACE enum_body_declarations.enum_body_declarations RBRACE.RBRACE { final Symbol LBRACE = _symbols[offset + 1]; final Symbol _symbol_enum_body_declarations = _symbols[offset + 2]; final List enum_body_declarations = (List) _symbol_enum_body_declarations.value; final Symbol RBRACE = _symbols[offset + 3]; return enum_body_declarations; } case 393: // enum_body = LBRACE.LBRACE enum_constants.c enum_body_declarations.d RBRACE.RBRACE { final Symbol LBRACE = _symbols[offset + 1]; final Symbol _symbol_c = _symbols[offset + 2]; final List c = (List) _symbol_c.value; final Symbol _symbol_d = _symbols[offset + 3]; final List d = (List) _symbol_d.value; final Symbol RBRACE = _symbols[offset + 4]; for(int i = 0; i < d.getNumChildNoTransform(); i++) c.add(d.getChildNoTransform(i)); return c; } case 394: // enum_body = LBRACE.LBRACE COMMA.COMMA enum_body_declarations.enum_body_declarations RBRACE.RBRACE { final Symbol LBRACE = _symbols[offset + 1]; final Symbol COMMA = _symbols[offset + 2]; final Symbol _symbol_enum_body_declarations = _symbols[offset + 3]; final List enum_body_declarations = (List) _symbol_enum_body_declarations.value; final Symbol RBRACE = _symbols[offset + 4]; return enum_body_declarations; } case 395: // enum_body = LBRACE.LBRACE enum_constants.c COMMA.COMMA enum_body_declarations.d RBRACE.RBRACE { final Symbol LBRACE = _symbols[offset + 1]; final Symbol _symbol_c = _symbols[offset + 2]; final List c = (List) _symbol_c.value; final Symbol COMMA = _symbols[offset + 3]; final Symbol _symbol_d = _symbols[offset + 4]; final List d = (List) _symbol_d.value; final Symbol RBRACE = _symbols[offset + 5]; for(int i = 0; i < d.getNumChildNoTransform(); i++) c.add(d.getChildNoTransform(i)); return c; } case 396: // enum_constants = enum_constant.enum_constant { final Symbol _symbol_enum_constant = _symbols[offset + 1]; final BodyDecl enum_constant = (BodyDecl) _symbol_enum_constant.value; return new List().add(enum_constant); } case 397: // enum_constants = enum_constants.enum_constants COMMA.COMMA enum_constant.enum_constant { final Symbol _symbol_enum_constants = _symbols[offset + 1]; final List enum_constants = (List) _symbol_enum_constants.value; final Symbol COMMA = _symbols[offset + 2]; final Symbol _symbol_enum_constant = _symbols[offset + 3]; final BodyDecl enum_constant = (BodyDecl) _symbol_enum_constant.value; return enum_constants.add(enum_constant); } case 398: // enum_constant = IDENTIFIER.id { final Symbol id = _symbols[offset + 1]; return new EnumConstant(new Modifiers(new List()), ((String)id.value), new List(), new List()); } case 399: // enum_constant = annotations.annotations IDENTIFIER.id { final Symbol _symbol_annotations = _symbols[offset + 1]; final List annotations = (List) _symbol_annotations.value; final Symbol id = _symbols[offset + 2]; return new EnumConstant(new Modifiers(annotations), ((String)id.value), new List(), new List()); } case 400: // enum_constant = IDENTIFIER.id arguments.arguments { final Symbol id = _symbols[offset + 1]; final Symbol _symbol_arguments = _symbols[offset + 2]; final List arguments = (List) _symbol_arguments.value; return new EnumConstant(new Modifiers(new List()), ((String)id.value), arguments, new List()); } case 401: // enum_constant = annotations.annotations IDENTIFIER.id arguments.arguments { final Symbol _symbol_annotations = _symbols[offset + 1]; final List annotations = (List) _symbol_annotations.value; final Symbol id = _symbols[offset + 2]; final Symbol _symbol_arguments = _symbols[offset + 3]; final List arguments = (List) _symbol_arguments.value; return new EnumConstant(new Modifiers(annotations), ((String)id.value), arguments, new List()); } case 402: // enum_constant = IDENTIFIER.id class_body.class_body { final Symbol id = _symbols[offset + 1]; final Symbol _symbol_class_body = _symbols[offset + 2]; final List class_body = (List) _symbol_class_body.value; return new EnumConstant(new Modifiers(new List()), ((String)id.value), new List(), class_body); } case 403: // enum_constant = annotations.annotations IDENTIFIER.id class_body.class_body { final Symbol _symbol_annotations = _symbols[offset + 1]; final List annotations = (List) _symbol_annotations.value; final Symbol id = _symbols[offset + 2]; final Symbol _symbol_class_body = _symbols[offset + 3]; final List class_body = (List) _symbol_class_body.value; return new EnumConstant(new Modifiers(annotations), ((String)id.value), new List(), class_body); } case 404: // enum_constant = IDENTIFIER.id arguments.arguments class_body.class_body { final Symbol id = _symbols[offset + 1]; final Symbol _symbol_arguments = _symbols[offset + 2]; final List arguments = (List) _symbol_arguments.value; final Symbol _symbol_class_body = _symbols[offset + 3]; final List class_body = (List) _symbol_class_body.value; return new EnumConstant(new Modifiers(new List()), ((String)id.value), arguments, class_body); } case 405: // enum_constant = annotations.annotations IDENTIFIER.id arguments.arguments class_body.class_body { final Symbol _symbol_annotations = _symbols[offset + 1]; final List annotations = (List) _symbol_annotations.value; final Symbol id = _symbols[offset + 2]; final Symbol _symbol_arguments = _symbols[offset + 3]; final List arguments = (List) _symbol_arguments.value; final Symbol _symbol_class_body = _symbols[offset + 4]; final List class_body = (List) _symbol_class_body.value; return new EnumConstant(new Modifiers(annotations), ((String)id.value), arguments, class_body); } case 406: // arguments = LPAREN.LPAREN argument_list.argument_list RPAREN.RPAREN { final Symbol LPAREN = _symbols[offset + 1]; final Symbol _symbol_argument_list = _symbols[offset + 2]; final List argument_list = (List) _symbol_argument_list.value; final Symbol RPAREN = _symbols[offset + 3]; return argument_list; } case 407: // annotations = annotation.annotation { final Symbol _symbol_annotation = _symbols[offset + 1]; final Annotation annotation = (Annotation) _symbol_annotation.value; return new List().add(annotation); } case 408: // annotations = annotations.annotations annotation.annotation { final Symbol _symbol_annotations = _symbols[offset + 1]; final List annotations = (List) _symbol_annotations.value; final Symbol _symbol_annotation = _symbols[offset + 2]; final Annotation annotation = (Annotation) _symbol_annotation.value; return annotations.add(annotation); } case 409: // enum_body_declarations = SEMICOLON.SEMICOLON class_body_declarations_opt.class_body_declarations { final Symbol SEMICOLON = _symbols[offset + 1]; final Symbol _symbol_class_body_declarations = _symbols[offset + 2]; final List class_body_declarations = (List) _symbol_class_body_declarations.value; return class_body_declarations; } case 410: // explicit_constructor_invocation = type_arguments.a THIS.THIS LPAREN.LPAREN argument_list_opt.l RPAREN.RPAREN SEMICOLON.SEMICOLON { final Symbol _symbol_a = _symbols[offset + 1]; final List a = (List) _symbol_a.value; final Symbol THIS = _symbols[offset + 2]; final Symbol LPAREN = _symbols[offset + 3]; final Symbol _symbol_l = _symbols[offset + 4]; final List l = (List) _symbol_l.value; final Symbol RPAREN = _symbols[offset + 5]; final Symbol SEMICOLON = _symbols[offset + 6]; return new ExprStmt(new ParConstructorAccess("this", l, a)); } case 411: // explicit_constructor_invocation = type_arguments.a SUPER.SUPER LPAREN.LPAREN argument_list_opt.l RPAREN.RPAREN SEMICOLON.SEMICOLON { final Symbol _symbol_a = _symbols[offset + 1]; final List a = (List) _symbol_a.value; final Symbol SUPER = _symbols[offset + 2]; final Symbol LPAREN = _symbols[offset + 3]; final Symbol _symbol_l = _symbols[offset + 4]; final List l = (List) _symbol_l.value; final Symbol RPAREN = _symbols[offset + 5]; final Symbol SEMICOLON = _symbols[offset + 6]; return new ExprStmt(new ParSuperConstructorAccess("super", l, a)); } case 412: // explicit_constructor_invocation = primary.p DOT.DOT type_arguments.a SUPER.SUPER LPAREN.LPAREN argument_list_opt.l RPAREN.RPAREN SEMICOLON.SEMICOLON { final Symbol _symbol_p = _symbols[offset + 1]; final Expr p = (Expr) _symbol_p.value; final Symbol DOT = _symbols[offset + 2]; final Symbol _symbol_a = _symbols[offset + 3]; final List a = (List) _symbol_a.value; final Symbol SUPER = _symbols[offset + 4]; final Symbol LPAREN = _symbols[offset + 5]; final Symbol _symbol_l = _symbols[offset + 6]; final List l = (List) _symbol_l.value; final Symbol RPAREN = _symbols[offset + 7]; final Symbol SEMICOLON = _symbols[offset + 8]; return new ExprStmt(p.qualifiesAccess(new ParSuperConstructorAccess("super", l, a))); } case 413: // explicit_constructor_invocation = name.n DOT.DOT type_arguments.a SUPER.SUPER LPAREN.LPAREN argument_list_opt.l RPAREN.RPAREN SEMICOLON.SEMICOLON { final Symbol _symbol_n = _symbols[offset + 1]; final Access n = (Access) _symbol_n.value; final Symbol DOT = _symbols[offset + 2]; final Symbol _symbol_a = _symbols[offset + 3]; final List a = (List) _symbol_a.value; final Symbol SUPER = _symbols[offset + 4]; final Symbol LPAREN = _symbols[offset + 5]; final Symbol _symbol_l = _symbols[offset + 6]; final List l = (List) _symbol_l.value; final Symbol RPAREN = _symbols[offset + 7]; final Symbol SEMICOLON = _symbols[offset + 8]; return new ExprStmt(n.qualifiesAccess(new ParSuperConstructorAccess("super", l, a))); } case 414: // method_invocation = primary.p DOT.DOT type_arguments.a IDENTIFIER.IDENTIFIER LPAREN.LPAREN argument_list_opt.l RPAREN.RPAREN { final Symbol _symbol_p = _symbols[offset + 1]; final Expr p = (Expr) _symbol_p.value; final Symbol DOT = _symbols[offset + 2]; final Symbol _symbol_a = _symbols[offset + 3]; final List a = (List) _symbol_a.value; final Symbol IDENTIFIER = _symbols[offset + 4]; final Symbol LPAREN = _symbols[offset + 5]; final Symbol _symbol_l = _symbols[offset + 6]; final List l = (List) _symbol_l.value; final Symbol RPAREN = _symbols[offset + 7]; return p.qualifiesAccess(new ParMethodAccess(IDENTIFIER, l, a)); } case 415: // method_invocation = name.n DOT.DOT type_arguments.a IDENTIFIER.IDENTIFIER LPAREN.LPAREN argument_list_opt.l RPAREN.RPAREN { final Symbol _symbol_n = _symbols[offset + 1]; final Access n = (Access) _symbol_n.value; final Symbol DOT = _symbols[offset + 2]; final Symbol _symbol_a = _symbols[offset + 3]; final List a = (List) _symbol_a.value; final Symbol IDENTIFIER = _symbols[offset + 4]; final Symbol LPAREN = _symbols[offset + 5]; final Symbol _symbol_l = _symbols[offset + 6]; final List l = (List) _symbol_l.value; final Symbol RPAREN = _symbols[offset + 7]; return n.qualifiesAccess(new ParMethodAccess(IDENTIFIER, l, a)); } case 416: // method_invocation = SUPER.SUPER DOT.DOT type_arguments.a IDENTIFIER.IDENTIFIER LPAREN.LPAREN argument_list_opt.l RPAREN.RPAREN { final Symbol SUPER = _symbols[offset + 1]; final Symbol DOT = _symbols[offset + 2]; final Symbol _symbol_a = _symbols[offset + 3]; final List a = (List) _symbol_a.value; final Symbol IDENTIFIER = _symbols[offset + 4]; final Symbol LPAREN = _symbols[offset + 5]; final Symbol _symbol_l = _symbols[offset + 6]; final List l = (List) _symbol_l.value; final Symbol RPAREN = _symbols[offset + 7]; return new SuperAccess("super").qualifiesAccess( new ParMethodAccess(IDENTIFIER, l, a)); } case 417: // method_invocation = name.n DOT.d1 SUPER.SUPER DOT.d2 type_arguments.a IDENTIFIER.IDENTIFIER LPAREN.LPAREN argument_list_opt.l RPAREN.RPAREN { final Symbol _symbol_n = _symbols[offset + 1]; final Access n = (Access) _symbol_n.value; final Symbol d1 = _symbols[offset + 2]; final Symbol SUPER = _symbols[offset + 3]; final Symbol d2 = _symbols[offset + 4]; final Symbol _symbol_a = _symbols[offset + 5]; final List a = (List) _symbol_a.value; final Symbol IDENTIFIER = _symbols[offset + 6]; final Symbol LPAREN = _symbols[offset + 7]; final Symbol _symbol_l = _symbols[offset + 8]; final List l = (List) _symbol_l.value; final Symbol RPAREN = _symbols[offset + 9]; return n.qualifiesAccess(new SuperAccess("super")).qualifiesAccess( new ParMethodAccess(IDENTIFIER, l, a)); } case 418: // method_header = LT.LT type_parameter_list_1.l type.t IDENTIFIER.IDENTIFIER LPAREN.LPAREN formal_parameter_list_opt.p RPAREN.RPAREN { final Symbol LT = _symbols[offset + 1]; final Symbol _symbol_l = _symbols[offset + 2]; final List l = (List) _symbol_l.value; final Symbol _symbol_t = _symbols[offset + 3]; final Access t = (Access) _symbol_t.value; final Symbol IDENTIFIER = _symbols[offset + 4]; final Symbol LPAREN = _symbols[offset + 5]; final Symbol _symbol_p = _symbols[offset + 6]; final List p = (List) _symbol_p.value; final Symbol RPAREN = _symbols[offset + 7]; return new GenericMethodDecl(new Modifiers(new List()), t.addArrayDims(new List()), IDENTIFIER, p, new List(), new Opt(), l); } case 419: // method_header = modifiers.m LT.LT type_parameter_list_1.l type.t IDENTIFIER.IDENTIFIER LPAREN.LPAREN formal_parameter_list_opt.p RPAREN.RPAREN { final Symbol _symbol_m = _symbols[offset + 1]; final List m = (List) _symbol_m.value; final Symbol LT = _symbols[offset + 2]; final Symbol _symbol_l = _symbols[offset + 3]; final List l = (List) _symbol_l.value; final Symbol _symbol_t = _symbols[offset + 4]; final Access t = (Access) _symbol_t.value; final Symbol IDENTIFIER = _symbols[offset + 5]; final Symbol LPAREN = _symbols[offset + 6]; final Symbol _symbol_p = _symbols[offset + 7]; final List p = (List) _symbol_p.value; final Symbol RPAREN = _symbols[offset + 8]; return new GenericMethodDecl(new Modifiers(m), t.addArrayDims(new List()), IDENTIFIER, p, new List(), new Opt(), l); } case 420: // method_header = LT.LT type_parameter_list_1.l type.t IDENTIFIER.IDENTIFIER LPAREN.LPAREN formal_parameter_list_opt.p RPAREN.RPAREN dims.d { final Symbol LT = _symbols[offset + 1]; final Symbol _symbol_l = _symbols[offset + 2]; final List l = (List) _symbol_l.value; final Symbol _symbol_t = _symbols[offset + 3]; final Access t = (Access) _symbol_t.value; final Symbol IDENTIFIER = _symbols[offset + 4]; final Symbol LPAREN = _symbols[offset + 5]; final Symbol _symbol_p = _symbols[offset + 6]; final List p = (List) _symbol_p.value; final Symbol RPAREN = _symbols[offset + 7]; final Symbol _symbol_d = _symbols[offset + 8]; final List d = (List) _symbol_d.value; return new GenericMethodDecl(new Modifiers(new List()), t.addArrayDims(d), IDENTIFIER, p, new List(), new Opt(), l); } case 421: // method_header = modifiers.m LT.LT type_parameter_list_1.l type.t IDENTIFIER.IDENTIFIER LPAREN.LPAREN formal_parameter_list_opt.p RPAREN.RPAREN dims.d { final Symbol _symbol_m = _symbols[offset + 1]; final List m = (List) _symbol_m.value; final Symbol LT = _symbols[offset + 2]; final Symbol _symbol_l = _symbols[offset + 3]; final List l = (List) _symbol_l.value; final Symbol _symbol_t = _symbols[offset + 4]; final Access t = (Access) _symbol_t.value; final Symbol IDENTIFIER = _symbols[offset + 5]; final Symbol LPAREN = _symbols[offset + 6]; final Symbol _symbol_p = _symbols[offset + 7]; final List p = (List) _symbol_p.value; final Symbol RPAREN = _symbols[offset + 8]; final Symbol _symbol_d = _symbols[offset + 9]; final List d = (List) _symbol_d.value; return new GenericMethodDecl(new Modifiers(m), t.addArrayDims(d), IDENTIFIER, p, new List(), new Opt(), l); } case 422: // method_header = LT.LT type_parameter_list_1.l type.t IDENTIFIER.IDENTIFIER LPAREN.LPAREN formal_parameter_list_opt.p RPAREN.RPAREN throws.tl { final Symbol LT = _symbols[offset + 1]; final Symbol _symbol_l = _symbols[offset + 2]; final List l = (List) _symbol_l.value; final Symbol _symbol_t = _symbols[offset + 3]; final Access t = (Access) _symbol_t.value; final Symbol IDENTIFIER = _symbols[offset + 4]; final Symbol LPAREN = _symbols[offset + 5]; final Symbol _symbol_p = _symbols[offset + 6]; final List p = (List) _symbol_p.value; final Symbol RPAREN = _symbols[offset + 7]; final Symbol _symbol_tl = _symbols[offset + 8]; final List tl = (List) _symbol_tl.value; return new GenericMethodDecl(new Modifiers(new List()), t.addArrayDims(new List()), IDENTIFIER, p, tl, new Opt(), l); } case 423: // method_header = modifiers.m LT.LT type_parameter_list_1.l type.t IDENTIFIER.IDENTIFIER LPAREN.LPAREN formal_parameter_list_opt.p RPAREN.RPAREN throws.tl { final Symbol _symbol_m = _symbols[offset + 1]; final List m = (List) _symbol_m.value; final Symbol LT = _symbols[offset + 2]; final Symbol _symbol_l = _symbols[offset + 3]; final List l = (List) _symbol_l.value; final Symbol _symbol_t = _symbols[offset + 4]; final Access t = (Access) _symbol_t.value; final Symbol IDENTIFIER = _symbols[offset + 5]; final Symbol LPAREN = _symbols[offset + 6]; final Symbol _symbol_p = _symbols[offset + 7]; final List p = (List) _symbol_p.value; final Symbol RPAREN = _symbols[offset + 8]; final Symbol _symbol_tl = _symbols[offset + 9]; final List tl = (List) _symbol_tl.value; return new GenericMethodDecl(new Modifiers(m), t.addArrayDims(new List()), IDENTIFIER, p, tl, new Opt(), l); } case 424: // method_header = LT.LT type_parameter_list_1.l type.t IDENTIFIER.IDENTIFIER LPAREN.LPAREN formal_parameter_list_opt.p RPAREN.RPAREN dims.d throws.tl { final Symbol LT = _symbols[offset + 1]; final Symbol _symbol_l = _symbols[offset + 2]; final List l = (List) _symbol_l.value; final Symbol _symbol_t = _symbols[offset + 3]; final Access t = (Access) _symbol_t.value; final Symbol IDENTIFIER = _symbols[offset + 4]; final Symbol LPAREN = _symbols[offset + 5]; final Symbol _symbol_p = _symbols[offset + 6]; final List p = (List) _symbol_p.value; final Symbol RPAREN = _symbols[offset + 7]; final Symbol _symbol_d = _symbols[offset + 8]; final List d = (List) _symbol_d.value; final Symbol _symbol_tl = _symbols[offset + 9]; final List tl = (List) _symbol_tl.value; return new GenericMethodDecl(new Modifiers(new List()), t.addArrayDims(d), IDENTIFIER, p, tl, new Opt(), l); } case 425: // method_header = modifiers.m LT.LT type_parameter_list_1.l type.t IDENTIFIER.IDENTIFIER LPAREN.LPAREN formal_parameter_list_opt.p RPAREN.RPAREN dims.d throws.tl { final Symbol _symbol_m = _symbols[offset + 1]; final List m = (List) _symbol_m.value; final Symbol LT = _symbols[offset + 2]; final Symbol _symbol_l = _symbols[offset + 3]; final List l = (List) _symbol_l.value; final Symbol _symbol_t = _symbols[offset + 4]; final Access t = (Access) _symbol_t.value; final Symbol IDENTIFIER = _symbols[offset + 5]; final Symbol LPAREN = _symbols[offset + 6]; final Symbol _symbol_p = _symbols[offset + 7]; final List p = (List) _symbol_p.value; final Symbol RPAREN = _symbols[offset + 8]; final Symbol _symbol_d = _symbols[offset + 9]; final List d = (List) _symbol_d.value; final Symbol _symbol_tl = _symbols[offset + 10]; final List tl = (List) _symbol_tl.value; return new GenericMethodDecl(new Modifiers(m), t.addArrayDims(d), IDENTIFIER, p, tl, new Opt(), l); } case 426: // method_header = LT.LT type_parameter_list_1.l VOID.VOID IDENTIFIER.IDENTIFIER LPAREN.LPAREN formal_parameter_list_opt.p RPAREN.RPAREN throws_opt.tl { final Symbol LT = _symbols[offset + 1]; final Symbol _symbol_l = _symbols[offset + 2]; final List l = (List) _symbol_l.value; final Symbol VOID = _symbols[offset + 3]; final Symbol IDENTIFIER = _symbols[offset + 4]; final Symbol LPAREN = _symbols[offset + 5]; final Symbol _symbol_p = _symbols[offset + 6]; final List p = (List) _symbol_p.value; final Symbol RPAREN = _symbols[offset + 7]; final Symbol _symbol_tl = _symbols[offset + 8]; final List tl = (List) _symbol_tl.value; return new GenericMethodDecl(new Modifiers(new List()), new PrimitiveTypeAccess("void"), IDENTIFIER, p, tl, new Opt(), l); } case 427: // method_header = modifiers.m LT.LT type_parameter_list_1.l VOID.VOID IDENTIFIER.IDENTIFIER LPAREN.LPAREN formal_parameter_list_opt.p RPAREN.RPAREN throws_opt.tl { final Symbol _symbol_m = _symbols[offset + 1]; final List m = (List) _symbol_m.value; final Symbol LT = _symbols[offset + 2]; final Symbol _symbol_l = _symbols[offset + 3]; final List l = (List) _symbol_l.value; final Symbol VOID = _symbols[offset + 4]; final Symbol IDENTIFIER = _symbols[offset + 5]; final Symbol LPAREN = _symbols[offset + 6]; final Symbol _symbol_p = _symbols[offset + 7]; final List p = (List) _symbol_p.value; final Symbol RPAREN = _symbols[offset + 8]; final Symbol _symbol_tl = _symbols[offset + 9]; final List tl = (List) _symbol_tl.value; return new GenericMethodDecl(new Modifiers(m), new PrimitiveTypeAccess("void"), IDENTIFIER, p, tl, new Opt(), l); } case 428: // constructor_declaration = LT.LT type_parameter_list_1.l IDENTIFIER.IDENTIFIER LPAREN.LPAREN formal_parameter_list_opt.pl RPAREN.RPAREN throws_opt.tl LBRACE.LBRACE RBRACE.RBRACE { final Symbol LT = _symbols[offset + 1]; final Symbol _symbol_l = _symbols[offset + 2]; final List l = (List) _symbol_l.value; final Symbol IDENTIFIER = _symbols[offset + 3]; final Symbol LPAREN = _symbols[offset + 4]; final Symbol _symbol_pl = _symbols[offset + 5]; final List pl = (List) _symbol_pl.value; final Symbol RPAREN = _symbols[offset + 6]; final Symbol _symbol_tl = _symbols[offset + 7]; final List tl = (List) _symbol_tl.value; final Symbol LBRACE = _symbols[offset + 8]; final Symbol RBRACE = _symbols[offset + 9]; return new GenericConstructorDecl(new Modifiers(new List()), IDENTIFIER, pl, tl, new Opt(), new Block(new List()), l); } case 429: // constructor_declaration = modifiers.m LT.LT type_parameter_list_1.l IDENTIFIER.IDENTIFIER LPAREN.LPAREN formal_parameter_list_opt.pl RPAREN.RPAREN throws_opt.tl LBRACE.LBRACE RBRACE.RBRACE { final Symbol _symbol_m = _symbols[offset + 1]; final List m = (List) _symbol_m.value; final Symbol LT = _symbols[offset + 2]; final Symbol _symbol_l = _symbols[offset + 3]; final List l = (List) _symbol_l.value; final Symbol IDENTIFIER = _symbols[offset + 4]; final Symbol LPAREN = _symbols[offset + 5]; final Symbol _symbol_pl = _symbols[offset + 6]; final List pl = (List) _symbol_pl.value; final Symbol RPAREN = _symbols[offset + 7]; final Symbol _symbol_tl = _symbols[offset + 8]; final List tl = (List) _symbol_tl.value; final Symbol LBRACE = _symbols[offset + 9]; final Symbol RBRACE = _symbols[offset + 10]; return new GenericConstructorDecl(new Modifiers(m), IDENTIFIER, pl, tl, new Opt(), new Block(new List()), l); } case 430: // constructor_declaration = LT.LT type_parameter_list_1.l IDENTIFIER.IDENTIFIER LPAREN.LPAREN formal_parameter_list_opt.pl RPAREN.RPAREN throws_opt.tl LBRACE.LBRACE explicit_constructor_invocation.c RBRACE.RBRACE { final Symbol LT = _symbols[offset + 1]; final Symbol _symbol_l = _symbols[offset + 2]; final List l = (List) _symbol_l.value; final Symbol IDENTIFIER = _symbols[offset + 3]; final Symbol LPAREN = _symbols[offset + 4]; final Symbol _symbol_pl = _symbols[offset + 5]; final List pl = (List) _symbol_pl.value; final Symbol RPAREN = _symbols[offset + 6]; final Symbol _symbol_tl = _symbols[offset + 7]; final List tl = (List) _symbol_tl.value; final Symbol LBRACE = _symbols[offset + 8]; final Symbol _symbol_c = _symbols[offset + 9]; final ExprStmt c = (ExprStmt) _symbol_c.value; final Symbol RBRACE = _symbols[offset + 10]; return new GenericConstructorDecl(new Modifiers(new List()), IDENTIFIER, pl, tl, new Opt(c), new Block(new List()), l); } case 431: // constructor_declaration = modifiers.m LT.LT type_parameter_list_1.l IDENTIFIER.IDENTIFIER LPAREN.LPAREN formal_parameter_list_opt.pl RPAREN.RPAREN throws_opt.tl LBRACE.LBRACE explicit_constructor_invocation.c RBRACE.RBRACE { final Symbol _symbol_m = _symbols[offset + 1]; final List m = (List) _symbol_m.value; final Symbol LT = _symbols[offset + 2]; final Symbol _symbol_l = _symbols[offset + 3]; final List l = (List) _symbol_l.value; final Symbol IDENTIFIER = _symbols[offset + 4]; final Symbol LPAREN = _symbols[offset + 5]; final Symbol _symbol_pl = _symbols[offset + 6]; final List pl = (List) _symbol_pl.value; final Symbol RPAREN = _symbols[offset + 7]; final Symbol _symbol_tl = _symbols[offset + 8]; final List tl = (List) _symbol_tl.value; final Symbol LBRACE = _symbols[offset + 9]; final Symbol _symbol_c = _symbols[offset + 10]; final ExprStmt c = (ExprStmt) _symbol_c.value; final Symbol RBRACE = _symbols[offset + 11]; return new GenericConstructorDecl(new Modifiers(m), IDENTIFIER, pl, tl, new Opt(c), new Block(new List()), l); } case 432: // constructor_declaration = LT.LT type_parameter_list_1.l IDENTIFIER.IDENTIFIER LPAREN.LPAREN formal_parameter_list_opt.pl RPAREN.RPAREN throws_opt.tl LBRACE.LBRACE block_statements.bl RBRACE.RBRACE { final Symbol LT = _symbols[offset + 1]; final Symbol _symbol_l = _symbols[offset + 2]; final List l = (List) _symbol_l.value; final Symbol IDENTIFIER = _symbols[offset + 3]; final Symbol LPAREN = _symbols[offset + 4]; final Symbol _symbol_pl = _symbols[offset + 5]; final List pl = (List) _symbol_pl.value; final Symbol RPAREN = _symbols[offset + 6]; final Symbol _symbol_tl = _symbols[offset + 7]; final List tl = (List) _symbol_tl.value; final Symbol LBRACE = _symbols[offset + 8]; final Symbol _symbol_bl = _symbols[offset + 9]; final List bl = (List) _symbol_bl.value; final Symbol RBRACE = _symbols[offset + 10]; return new GenericConstructorDecl(new Modifiers(new List()), IDENTIFIER, pl, tl, new Opt(), new Block(bl), l); } case 433: // constructor_declaration = modifiers.m LT.LT type_parameter_list_1.l IDENTIFIER.IDENTIFIER LPAREN.LPAREN formal_parameter_list_opt.pl RPAREN.RPAREN throws_opt.tl LBRACE.LBRACE block_statements.bl RBRACE.RBRACE { final Symbol _symbol_m = _symbols[offset + 1]; final List m = (List) _symbol_m.value; final Symbol LT = _symbols[offset + 2]; final Symbol _symbol_l = _symbols[offset + 3]; final List l = (List) _symbol_l.value; final Symbol IDENTIFIER = _symbols[offset + 4]; final Symbol LPAREN = _symbols[offset + 5]; final Symbol _symbol_pl = _symbols[offset + 6]; final List pl = (List) _symbol_pl.value; final Symbol RPAREN = _symbols[offset + 7]; final Symbol _symbol_tl = _symbols[offset + 8]; final List tl = (List) _symbol_tl.value; final Symbol LBRACE = _symbols[offset + 9]; final Symbol _symbol_bl = _symbols[offset + 10]; final List bl = (List) _symbol_bl.value; final Symbol RBRACE = _symbols[offset + 11]; return new GenericConstructorDecl(new Modifiers(m), IDENTIFIER, pl, tl, new Opt(), new Block(bl), l); } case 434: // constructor_declaration = LT.LT type_parameter_list_1.l IDENTIFIER.IDENTIFIER LPAREN.LPAREN formal_parameter_list_opt.pl RPAREN.RPAREN throws_opt.tl LBRACE.LBRACE explicit_constructor_invocation.c block_statements.bl RBRACE.RBRACE { final Symbol LT = _symbols[offset + 1]; final Symbol _symbol_l = _symbols[offset + 2]; final List l = (List) _symbol_l.value; final Symbol IDENTIFIER = _symbols[offset + 3]; final Symbol LPAREN = _symbols[offset + 4]; final Symbol _symbol_pl = _symbols[offset + 5]; final List pl = (List) _symbol_pl.value; final Symbol RPAREN = _symbols[offset + 6]; final Symbol _symbol_tl = _symbols[offset + 7]; final List tl = (List) _symbol_tl.value; final Symbol LBRACE = _symbols[offset + 8]; final Symbol _symbol_c = _symbols[offset + 9]; final ExprStmt c = (ExprStmt) _symbol_c.value; final Symbol _symbol_bl = _symbols[offset + 10]; final List bl = (List) _symbol_bl.value; final Symbol RBRACE = _symbols[offset + 11]; return new GenericConstructorDecl(new Modifiers(new List()), IDENTIFIER, pl, tl, new Opt(c), new Block(bl), l); } case 435: // constructor_declaration = modifiers.m LT.LT type_parameter_list_1.l IDENTIFIER.IDENTIFIER LPAREN.LPAREN formal_parameter_list_opt.pl RPAREN.RPAREN throws_opt.tl LBRACE.LBRACE explicit_constructor_invocation.c block_statements.bl RBRACE.RBRACE { final Symbol _symbol_m = _symbols[offset + 1]; final List m = (List) _symbol_m.value; final Symbol LT = _symbols[offset + 2]; final Symbol _symbol_l = _symbols[offset + 3]; final List l = (List) _symbol_l.value; final Symbol IDENTIFIER = _symbols[offset + 4]; final Symbol LPAREN = _symbols[offset + 5]; final Symbol _symbol_pl = _symbols[offset + 6]; final List pl = (List) _symbol_pl.value; final Symbol RPAREN = _symbols[offset + 7]; final Symbol _symbol_tl = _symbols[offset + 8]; final List tl = (List) _symbol_tl.value; final Symbol LBRACE = _symbols[offset + 9]; final Symbol _symbol_c = _symbols[offset + 10]; final ExprStmt c = (ExprStmt) _symbol_c.value; final Symbol _symbol_bl = _symbols[offset + 11]; final List bl = (List) _symbol_bl.value; final Symbol RBRACE = _symbols[offset + 12]; return new GenericConstructorDecl(new Modifiers(m), IDENTIFIER, pl, tl, new Opt(c), new Block(bl), l); } case 436: // class_declaration = CLASS.CLASS IDENTIFIER.IDENTIFIER type_parameters.p class_body.b { final Symbol CLASS = _symbols[offset + 1]; final Symbol IDENTIFIER = _symbols[offset + 2]; final Symbol _symbol_p = _symbols[offset + 3]; final List p = (List) _symbol_p.value; final Symbol _symbol_b = _symbols[offset + 4]; final List b = (List) _symbol_b.value; return new GenericClassDecl(new Modifiers(new List()), IDENTIFIER, new Opt(), new List(), b, p); } case 437: // class_declaration = modifiers.m CLASS.CLASS IDENTIFIER.IDENTIFIER type_parameters.p class_body.b { final Symbol _symbol_m = _symbols[offset + 1]; final List m = (List) _symbol_m.value; final Symbol CLASS = _symbols[offset + 2]; final Symbol IDENTIFIER = _symbols[offset + 3]; final Symbol _symbol_p = _symbols[offset + 4]; final List p = (List) _symbol_p.value; final Symbol _symbol_b = _symbols[offset + 5]; final List b = (List) _symbol_b.value; return new GenericClassDecl(new Modifiers(m), IDENTIFIER, new Opt(), new List(), b, p); } case 438: // class_declaration = CLASS.CLASS IDENTIFIER.IDENTIFIER type_parameters.p super.s class_body.b { final Symbol CLASS = _symbols[offset + 1]; final Symbol IDENTIFIER = _symbols[offset + 2]; final Symbol _symbol_p = _symbols[offset + 3]; final List p = (List) _symbol_p.value; final Symbol _symbol_s = _symbols[offset + 4]; final Opt s = (Opt) _symbol_s.value; final Symbol _symbol_b = _symbols[offset + 5]; final List b = (List) _symbol_b.value; return new GenericClassDecl(new Modifiers(new List()), IDENTIFIER, s, new List(), b, p); } case 439: // class_declaration = modifiers.m CLASS.CLASS IDENTIFIER.IDENTIFIER type_parameters.p super.s class_body.b { final Symbol _symbol_m = _symbols[offset + 1]; final List m = (List) _symbol_m.value; final Symbol CLASS = _symbols[offset + 2]; final Symbol IDENTIFIER = _symbols[offset + 3]; final Symbol _symbol_p = _symbols[offset + 4]; final List p = (List) _symbol_p.value; final Symbol _symbol_s = _symbols[offset + 5]; final Opt s = (Opt) _symbol_s.value; final Symbol _symbol_b = _symbols[offset + 6]; final List b = (List) _symbol_b.value; return new GenericClassDecl(new Modifiers(m), IDENTIFIER, s, new List(), b, p); } case 440: // class_declaration = CLASS.CLASS IDENTIFIER.IDENTIFIER type_parameters.p interfaces.i class_body.b { final Symbol CLASS = _symbols[offset + 1]; final Symbol IDENTIFIER = _symbols[offset + 2]; final Symbol _symbol_p = _symbols[offset + 3]; final List p = (List) _symbol_p.value; final Symbol _symbol_i = _symbols[offset + 4]; final List i = (List) _symbol_i.value; final Symbol _symbol_b = _symbols[offset + 5]; final List b = (List) _symbol_b.value; return new GenericClassDecl(new Modifiers(new List()), IDENTIFIER, new Opt(), i, b, p); } case 441: // class_declaration = modifiers.m CLASS.CLASS IDENTIFIER.IDENTIFIER type_parameters.p interfaces.i class_body.b { final Symbol _symbol_m = _symbols[offset + 1]; final List m = (List) _symbol_m.value; final Symbol CLASS = _symbols[offset + 2]; final Symbol IDENTIFIER = _symbols[offset + 3]; final Symbol _symbol_p = _symbols[offset + 4]; final List p = (List) _symbol_p.value; final Symbol _symbol_i = _symbols[offset + 5]; final List i = (List) _symbol_i.value; final Symbol _symbol_b = _symbols[offset + 6]; final List b = (List) _symbol_b.value; return new GenericClassDecl(new Modifiers(m), IDENTIFIER, new Opt(), i, b, p); } case 442: // class_declaration = CLASS.CLASS IDENTIFIER.IDENTIFIER type_parameters.p super.s interfaces.i class_body.b { final Symbol CLASS = _symbols[offset + 1]; final Symbol IDENTIFIER = _symbols[offset + 2]; final Symbol _symbol_p = _symbols[offset + 3]; final List p = (List) _symbol_p.value; final Symbol _symbol_s = _symbols[offset + 4]; final Opt s = (Opt) _symbol_s.value; final Symbol _symbol_i = _symbols[offset + 5]; final List i = (List) _symbol_i.value; final Symbol _symbol_b = _symbols[offset + 6]; final List b = (List) _symbol_b.value; return new GenericClassDecl(new Modifiers(new List()), IDENTIFIER, s, i, b, p); } case 443: // class_declaration = modifiers.m CLASS.CLASS IDENTIFIER.IDENTIFIER type_parameters.p super.s interfaces.i class_body.b { final Symbol _symbol_m = _symbols[offset + 1]; final List m = (List) _symbol_m.value; final Symbol CLASS = _symbols[offset + 2]; final Symbol IDENTIFIER = _symbols[offset + 3]; final Symbol _symbol_p = _symbols[offset + 4]; final List p = (List) _symbol_p.value; final Symbol _symbol_s = _symbols[offset + 5]; final Opt s = (Opt) _symbol_s.value; final Symbol _symbol_i = _symbols[offset + 6]; final List i = (List) _symbol_i.value; final Symbol _symbol_b = _symbols[offset + 7]; final List b = (List) _symbol_b.value; return new GenericClassDecl(new Modifiers(m), IDENTIFIER, s, i, b, p); } case 444: // interface_declaration = INTERFACE.INTERFACE IDENTIFIER.IDENTIFIER type_parameters.p interface_body.b { final Symbol INTERFACE = _symbols[offset + 1]; final Symbol IDENTIFIER = _symbols[offset + 2]; final Symbol _symbol_p = _symbols[offset + 3]; final List p = (List) _symbol_p.value; final Symbol _symbol_b = _symbols[offset + 4]; final List b = (List) _symbol_b.value; return new GenericInterfaceDecl(new Modifiers(new List()), IDENTIFIER, new List(), b, p); } case 445: // interface_declaration = modifiers.m INTERFACE.INTERFACE IDENTIFIER.IDENTIFIER type_parameters.p interface_body.b { final Symbol _symbol_m = _symbols[offset + 1]; final List m = (List) _symbol_m.value; final Symbol INTERFACE = _symbols[offset + 2]; final Symbol IDENTIFIER = _symbols[offset + 3]; final Symbol _symbol_p = _symbols[offset + 4]; final List p = (List) _symbol_p.value; final Symbol _symbol_b = _symbols[offset + 5]; final List b = (List) _symbol_b.value; return new GenericInterfaceDecl(new Modifiers(m), IDENTIFIER, new List(), b, p); } case 446: // interface_declaration = INTERFACE.INTERFACE IDENTIFIER.IDENTIFIER type_parameters.p extends_interfaces.i interface_body.b { final Symbol INTERFACE = _symbols[offset + 1]; final Symbol IDENTIFIER = _symbols[offset + 2]; final Symbol _symbol_p = _symbols[offset + 3]; final List p = (List) _symbol_p.value; final Symbol _symbol_i = _symbols[offset + 4]; final List i = (List) _symbol_i.value; final Symbol _symbol_b = _symbols[offset + 5]; final List b = (List) _symbol_b.value; return new GenericInterfaceDecl(new Modifiers(new List()), IDENTIFIER, i, b, p); } case 447: // interface_declaration = modifiers.m INTERFACE.INTERFACE IDENTIFIER.IDENTIFIER type_parameters.p extends_interfaces.i interface_body.b { final Symbol _symbol_m = _symbols[offset + 1]; final List m = (List) _symbol_m.value; final Symbol INTERFACE = _symbols[offset + 2]; final Symbol IDENTIFIER = _symbols[offset + 3]; final Symbol _symbol_p = _symbols[offset + 4]; final List p = (List) _symbol_p.value; final Symbol _symbol_i = _symbols[offset + 5]; final List i = (List) _symbol_i.value; final Symbol _symbol_b = _symbols[offset + 6]; final List b = (List) _symbol_b.value; return new GenericInterfaceDecl(new Modifiers(m), IDENTIFIER, i, b, p); } case 448: // class_or_interface = name.n { final Symbol _symbol_n = _symbols[offset + 1]; final Access n = (Access) _symbol_n.value; return n; } case 449: // class_or_interface = class_or_interface.n LT.LT type_argument_list_1.l DOT.DOT name.end { final Symbol _symbol_n = _symbols[offset + 1]; final Access n = (Access) _symbol_n.value; final Symbol LT = _symbols[offset + 2]; final Symbol _symbol_l = _symbols[offset + 3]; final List l = (List) _symbol_l.value; final Symbol DOT = _symbols[offset + 4]; final Symbol _symbol_end = _symbols[offset + 5]; final Access end = (Access) _symbol_end.value; return new ParTypeAccess(n, l).qualifiesAccess(end); } case 450: // class_or_interface_type = class_or_interface.n { final Symbol _symbol_n = _symbols[offset + 1]; final Access n = (Access) _symbol_n.value; return n; } case 451: // class_or_interface_type = class_or_interface.n LT.LT type_argument_list_1.l { final Symbol _symbol_n = _symbols[offset + 1]; final Access n = (Access) _symbol_n.value; final Symbol LT = _symbols[offset + 2]; final Symbol _symbol_l = _symbols[offset + 3]; final List l = (List) _symbol_l.value; return new ParTypeAccess(n, l); } case 452: // array_type = class_or_interface.t LT.LT type_argument_list_1.l DOT.DOT name.n dims.d { final Symbol _symbol_t = _symbols[offset + 1]; final Access t = (Access) _symbol_t.value; final Symbol LT = _symbols[offset + 2]; final Symbol _symbol_l = _symbols[offset + 3]; final List l = (List) _symbol_l.value; final Symbol DOT = _symbols[offset + 4]; final Symbol _symbol_n = _symbols[offset + 5]; final Access n = (Access) _symbol_n.value; final Symbol _symbol_d = _symbols[offset + 6]; final List d = (List) _symbol_d.value; return new ParTypeAccess(t, l).qualifiesAccess(n).addArrayDims(d); } case 453: // array_type = class_or_interface.t LT.LT type_argument_list_1.l dims.d { final Symbol _symbol_t = _symbols[offset + 1]; final Access t = (Access) _symbol_t.value; final Symbol LT = _symbols[offset + 2]; final Symbol _symbol_l = _symbols[offset + 3]; final List l = (List) _symbol_l.value; final Symbol _symbol_d = _symbols[offset + 4]; final List d = (List) _symbol_d.value; return new ParTypeAccess(t, l).addArrayDims(d); } case 454: // type_arguments = LT.LT type_argument_list_1.l { final Symbol LT = _symbols[offset + 1]; final Symbol _symbol_l = _symbols[offset + 2]; final List l = (List) _symbol_l.value; return l; } case 455: // wildcard = QUESTION.QUESTION { final Symbol QUESTION = _symbols[offset + 1]; return new Wildcard(); } case 456: // wildcard = QUESTION.QUESTION EXTENDS.EXTENDS reference_type.t { final Symbol QUESTION = _symbols[offset + 1]; final Symbol EXTENDS = _symbols[offset + 2]; final Symbol _symbol_t = _symbols[offset + 3]; final Access t = (Access) _symbol_t.value; return new WildcardExtends(t); } case 457: // wildcard = QUESTION.QUESTION SUPER.SUPER reference_type.t { final Symbol QUESTION = _symbols[offset + 1]; final Symbol SUPER = _symbols[offset + 2]; final Symbol _symbol_t = _symbols[offset + 3]; final Access t = (Access) _symbol_t.value; return new WildcardSuper(t); } case 458: // wildcard_1 = QUESTION.QUESTION GT.GT { final Symbol QUESTION = _symbols[offset + 1]; final Symbol GT = _symbols[offset + 2]; return new Wildcard(); } case 459: // wildcard_1 = QUESTION.QUESTION EXTENDS.EXTENDS reference_type_1.t { final Symbol QUESTION = _symbols[offset + 1]; final Symbol EXTENDS = _symbols[offset + 2]; final Symbol _symbol_t = _symbols[offset + 3]; final Access t = (Access) _symbol_t.value; return new WildcardExtends(t); } case 460: // wildcard_1 = QUESTION.QUESTION SUPER.SUPER reference_type_1.t { final Symbol QUESTION = _symbols[offset + 1]; final Symbol SUPER = _symbols[offset + 2]; final Symbol _symbol_t = _symbols[offset + 3]; final Access t = (Access) _symbol_t.value; return new WildcardSuper(t); } case 461: // wildcard_2 = QUESTION.QUESTION RSHIFT.RSHIFT { final Symbol QUESTION = _symbols[offset + 1]; final Symbol RSHIFT = _symbols[offset + 2]; return new Wildcard(); } case 462: // wildcard_2 = QUESTION.QUESTION EXTENDS.EXTENDS reference_type_2.t { final Symbol QUESTION = _symbols[offset + 1]; final Symbol EXTENDS = _symbols[offset + 2]; final Symbol _symbol_t = _symbols[offset + 3]; final Access t = (Access) _symbol_t.value; return new WildcardExtends(t); } case 463: // wildcard_2 = QUESTION.QUESTION SUPER.SUPER reference_type_2.t { final Symbol QUESTION = _symbols[offset + 1]; final Symbol SUPER = _symbols[offset + 2]; final Symbol _symbol_t = _symbols[offset + 3]; final Access t = (Access) _symbol_t.value; return new WildcardSuper(t); } case 464: // wildcard_3 = QUESTION.QUESTION URSHIFT.URSHIFT { final Symbol QUESTION = _symbols[offset + 1]; final Symbol URSHIFT = _symbols[offset + 2]; return new Wildcard(); } case 465: // wildcard_3 = QUESTION.QUESTION EXTENDS.EXTENDS reference_type_3.t { final Symbol QUESTION = _symbols[offset + 1]; final Symbol EXTENDS = _symbols[offset + 2]; final Symbol _symbol_t = _symbols[offset + 3]; final Access t = (Access) _symbol_t.value; return new WildcardExtends(t); } case 466: // wildcard_3 = QUESTION.QUESTION SUPER.SUPER reference_type_3.t { final Symbol QUESTION = _symbols[offset + 1]; final Symbol SUPER = _symbols[offset + 2]; final Symbol _symbol_t = _symbols[offset + 3]; final Access t = (Access) _symbol_t.value; return new WildcardSuper(t); } case 467: // class_instance_creation_expression = NEW.NEW class_or_interface_type.t LPAREN.LPAREN argument_list_opt.l RPAREN.RPAREN subclass_body_opt.b { final Symbol NEW = _symbols[offset + 1]; final Symbol _symbol_t = _symbols[offset + 2]; final Access t = (Access) _symbol_t.value; final Symbol LPAREN = _symbols[offset + 3]; final Symbol _symbol_l = _symbols[offset + 4]; final List l = (List) _symbol_l.value; final Symbol RPAREN = _symbols[offset + 5]; final Symbol _symbol_b = _symbols[offset + 6]; final Opt b = (Opt) _symbol_b.value; return new ClassInstanceExpr(t, l, b); } case 468: // class_instance_creation_expression = NEW.NEW type_arguments.a class_or_interface_type.t LPAREN.LPAREN argument_list_opt.l RPAREN.RPAREN subclass_body_opt.b { final Symbol NEW = _symbols[offset + 1]; final Symbol _symbol_a = _symbols[offset + 2]; final List a = (List) _symbol_a.value; final Symbol _symbol_t = _symbols[offset + 3]; final Access t = (Access) _symbol_t.value; final Symbol LPAREN = _symbols[offset + 4]; final Symbol _symbol_l = _symbols[offset + 5]; final List l = (List) _symbol_l.value; final Symbol RPAREN = _symbols[offset + 6]; final Symbol _symbol_b = _symbols[offset + 7]; final Opt b = (Opt) _symbol_b.value; return new ParClassInstanceExpr(t, l, b, a); } case 469: // class_instance_creation_expression = primary.n DOT.DOT NEW.NEW simple_name.id LPAREN.LPAREN argument_list_opt.l RPAREN.RPAREN subclass_body_opt.b { final Symbol _symbol_n = _symbols[offset + 1]; final Expr n = (Expr) _symbol_n.value; final Symbol DOT = _symbols[offset + 2]; final Symbol NEW = _symbols[offset + 3]; final Symbol _symbol_id = _symbols[offset + 4]; final Access id = (Access) _symbol_id.value; final Symbol LPAREN = _symbols[offset + 5]; final Symbol _symbol_l = _symbols[offset + 6]; final List l = (List) _symbol_l.value; final Symbol RPAREN = _symbols[offset + 7]; final Symbol _symbol_b = _symbols[offset + 8]; final Opt b = (Opt) _symbol_b.value; ClassInstanceExpr e = new ClassInstanceExpr(id, l, b); e.setStart(NEW.getStart()); e.setEnd(RPAREN.getEnd()); return n.qualifiesAccess(e); } case 470: // class_instance_creation_expression = primary.n DOT.DOT NEW.NEW simple_name.id type_arguments.a LPAREN.LPAREN argument_list_opt.l RPAREN.RPAREN subclass_body_opt.b { final Symbol _symbol_n = _symbols[offset + 1]; final Expr n = (Expr) _symbol_n.value; final Symbol DOT = _symbols[offset + 2]; final Symbol NEW = _symbols[offset + 3]; final Symbol _symbol_id = _symbols[offset + 4]; final Access id = (Access) _symbol_id.value; final Symbol _symbol_a = _symbols[offset + 5]; final List a = (List) _symbol_a.value; final Symbol LPAREN = _symbols[offset + 6]; final Symbol _symbol_l = _symbols[offset + 7]; final List l = (List) _symbol_l.value; final Symbol RPAREN = _symbols[offset + 8]; final Symbol _symbol_b = _symbols[offset + 9]; final Opt b = (Opt) _symbol_b.value; ClassInstanceExpr e = new ClassInstanceExpr(new ParTypeAccess(id, a), l, b); e.setStart(NEW.getStart()); e.setEnd(RPAREN.getEnd()); return n.qualifiesAccess(e); } case 471: // class_instance_creation_expression = primary.n DOT.DOT NEW.NEW type_arguments.ca simple_name.id LPAREN.LPAREN argument_list_opt.l RPAREN.RPAREN subclass_body_opt.b { final Symbol _symbol_n = _symbols[offset + 1]; final Expr n = (Expr) _symbol_n.value; final Symbol DOT = _symbols[offset + 2]; final Symbol NEW = _symbols[offset + 3]; final Symbol _symbol_ca = _symbols[offset + 4]; final List ca = (List) _symbol_ca.value; final Symbol _symbol_id = _symbols[offset + 5]; final Access id = (Access) _symbol_id.value; final Symbol LPAREN = _symbols[offset + 6]; final Symbol _symbol_l = _symbols[offset + 7]; final List l = (List) _symbol_l.value; final Symbol RPAREN = _symbols[offset + 8]; final Symbol _symbol_b = _symbols[offset + 9]; final Opt b = (Opt) _symbol_b.value; return n.qualifiesAccess(new ParClassInstanceExpr(id, l, b, ca)); } case 472: // class_instance_creation_expression = primary.n DOT.DOT NEW.NEW type_arguments.ca simple_name.id type_arguments.ta LPAREN.LPAREN argument_list_opt.l RPAREN.RPAREN subclass_body_opt.b { final Symbol _symbol_n = _symbols[offset + 1]; final Expr n = (Expr) _symbol_n.value; final Symbol DOT = _symbols[offset + 2]; final Symbol NEW = _symbols[offset + 3]; final Symbol _symbol_ca = _symbols[offset + 4]; final List ca = (List) _symbol_ca.value; final Symbol _symbol_id = _symbols[offset + 5]; final Access id = (Access) _symbol_id.value; final Symbol _symbol_ta = _symbols[offset + 6]; final List ta = (List) _symbol_ta.value; final Symbol LPAREN = _symbols[offset + 7]; final Symbol _symbol_l = _symbols[offset + 8]; final List l = (List) _symbol_l.value; final Symbol RPAREN = _symbols[offset + 9]; final Symbol _symbol_b = _symbols[offset + 10]; final Opt b = (Opt) _symbol_b.value; return n.qualifiesAccess(new ParClassInstanceExpr(new ParTypeAccess(id, ta), l, b, ca)); } case 473: // class_instance_creation_expression = name.n DOT.DOT NEW.NEW simple_name.id LPAREN.LPAREN argument_list_opt.l RPAREN.RPAREN subclass_body_opt.b { final Symbol _symbol_n = _symbols[offset + 1]; final Access n = (Access) _symbol_n.value; final Symbol DOT = _symbols[offset + 2]; final Symbol NEW = _symbols[offset + 3]; final Symbol _symbol_id = _symbols[offset + 4]; final Access id = (Access) _symbol_id.value; final Symbol LPAREN = _symbols[offset + 5]; final Symbol _symbol_l = _symbols[offset + 6]; final List l = (List) _symbol_l.value; final Symbol RPAREN = _symbols[offset + 7]; final Symbol _symbol_b = _symbols[offset + 8]; final Opt b = (Opt) _symbol_b.value; ClassInstanceExpr e = new ClassInstanceExpr(id, l, b); e.setStart(NEW.getStart()); e.setEnd(RPAREN.getEnd()); return n.qualifiesAccess(e); } case 474: // class_instance_creation_expression = name.n DOT.DOT NEW.NEW simple_name.id type_arguments.a LPAREN.LPAREN argument_list_opt.l RPAREN.RPAREN subclass_body_opt.b { final Symbol _symbol_n = _symbols[offset + 1]; final Access n = (Access) _symbol_n.value; final Symbol DOT = _symbols[offset + 2]; final Symbol NEW = _symbols[offset + 3]; final Symbol _symbol_id = _symbols[offset + 4]; final Access id = (Access) _symbol_id.value; final Symbol _symbol_a = _symbols[offset + 5]; final List a = (List) _symbol_a.value; final Symbol LPAREN = _symbols[offset + 6]; final Symbol _symbol_l = _symbols[offset + 7]; final List l = (List) _symbol_l.value; final Symbol RPAREN = _symbols[offset + 8]; final Symbol _symbol_b = _symbols[offset + 9]; final Opt b = (Opt) _symbol_b.value; ClassInstanceExpr e = new ClassInstanceExpr(new ParTypeAccess(id, a), l, b); e.setStart(NEW.getStart()); e.setEnd(RPAREN.getEnd()); return n.qualifiesAccess(e); } case 475: // class_instance_creation_expression = name.n DOT.DOT NEW.NEW type_arguments.ca simple_name.id LPAREN.LPAREN argument_list_opt.l RPAREN.RPAREN subclass_body_opt.b { final Symbol _symbol_n = _symbols[offset + 1]; final Access n = (Access) _symbol_n.value; final Symbol DOT = _symbols[offset + 2]; final Symbol NEW = _symbols[offset + 3]; final Symbol _symbol_ca = _symbols[offset + 4]; final List ca = (List) _symbol_ca.value; final Symbol _symbol_id = _symbols[offset + 5]; final Access id = (Access) _symbol_id.value; final Symbol LPAREN = _symbols[offset + 6]; final Symbol _symbol_l = _symbols[offset + 7]; final List l = (List) _symbol_l.value; final Symbol RPAREN = _symbols[offset + 8]; final Symbol _symbol_b = _symbols[offset + 9]; final Opt b = (Opt) _symbol_b.value; return n.qualifiesAccess(new ParClassInstanceExpr(id, l, b, ca)); } case 476: // class_instance_creation_expression = name.n DOT.DOT NEW.NEW type_arguments.ca simple_name.id type_arguments.ta LPAREN.LPAREN argument_list_opt.l RPAREN.RPAREN subclass_body_opt.b { final Symbol _symbol_n = _symbols[offset + 1]; final Access n = (Access) _symbol_n.value; final Symbol DOT = _symbols[offset + 2]; final Symbol NEW = _symbols[offset + 3]; final Symbol _symbol_ca = _symbols[offset + 4]; final List ca = (List) _symbol_ca.value; final Symbol _symbol_id = _symbols[offset + 5]; final Access id = (Access) _symbol_id.value; final Symbol _symbol_ta = _symbols[offset + 6]; final List ta = (List) _symbol_ta.value; final Symbol LPAREN = _symbols[offset + 7]; final Symbol _symbol_l = _symbols[offset + 8]; final List l = (List) _symbol_l.value; final Symbol RPAREN = _symbols[offset + 9]; final Symbol _symbol_b = _symbols[offset + 10]; final Opt b = (Opt) _symbol_b.value; return n.qualifiesAccess(new ParClassInstanceExpr(new ParTypeAccess(id, ta), l, b, ca)); } case 477: // type_argument_list = type_argument.a { final Symbol _symbol_a = _symbols[offset + 1]; final Access a = (Access) _symbol_a.value; return new List().add(a); } case 478: // type_argument_list = type_argument_list.l COMMA.COMMA type_argument.a { final Symbol _symbol_l = _symbols[offset + 1]; final List l = (List) _symbol_l.value; final Symbol COMMA = _symbols[offset + 2]; final Symbol _symbol_a = _symbols[offset + 3]; final Access a = (Access) _symbol_a.value; return l.add(a); } case 479: // type_argument_list_1 = type_argument_1.a { final Symbol _symbol_a = _symbols[offset + 1]; final Access a = (Access) _symbol_a.value; return new List().add(a); } case 480: // type_argument_list_1 = type_argument_list.l COMMA.COMMA type_argument_1.a { final Symbol _symbol_l = _symbols[offset + 1]; final List l = (List) _symbol_l.value; final Symbol COMMA = _symbols[offset + 2]; final Symbol _symbol_a = _symbols[offset + 3]; final Access a = (Access) _symbol_a.value; return l.add(a); } case 481: // type_argument_list_2 = type_argument_2.a { final Symbol _symbol_a = _symbols[offset + 1]; final Access a = (Access) _symbol_a.value; return new List().add(a); } case 482: // type_argument_list_2 = type_argument_list.l COMMA.COMMA type_argument_2.a { final Symbol _symbol_l = _symbols[offset + 1]; final List l = (List) _symbol_l.value; final Symbol COMMA = _symbols[offset + 2]; final Symbol _symbol_a = _symbols[offset + 3]; final Access a = (Access) _symbol_a.value; return l.add(a); } case 483: // type_argument_list_3 = type_argument_3.a { final Symbol _symbol_a = _symbols[offset + 1]; final Access a = (Access) _symbol_a.value; return new List().add(a); } case 484: // type_argument_list_3 = type_argument_list.l COMMA.COMMA type_argument_3.a { final Symbol _symbol_l = _symbols[offset + 1]; final List l = (List) _symbol_l.value; final Symbol COMMA = _symbols[offset + 2]; final Symbol _symbol_a = _symbols[offset + 3]; final Access a = (Access) _symbol_a.value; return l.add(a); } case 485: // type_argument = reference_type.t { final Symbol _symbol_t = _symbols[offset + 1]; final Access t = (Access) _symbol_t.value; return t; } case 486: // type_argument = wildcard.w { final Symbol _symbol_w = _symbols[offset + 1]; final Access w = (Access) _symbol_w.value; return w; } case 487: // type_argument_1 = reference_type_1.t { final Symbol _symbol_t = _symbols[offset + 1]; final Access t = (Access) _symbol_t.value; return t; } case 488: // type_argument_1 = wildcard_1.w { final Symbol _symbol_w = _symbols[offset + 1]; final Access w = (Access) _symbol_w.value; return w; } case 489: // type_argument_2 = reference_type_2.t { final Symbol _symbol_t = _symbols[offset + 1]; final Access t = (Access) _symbol_t.value; return t; } case 490: // type_argument_2 = wildcard_2.w { final Symbol _symbol_w = _symbols[offset + 1]; final Access w = (Access) _symbol_w.value; return w; } case 491: // type_argument_3 = reference_type_3.t { final Symbol _symbol_t = _symbols[offset + 1]; final Access t = (Access) _symbol_t.value; return t; } case 492: // type_argument_3 = wildcard_3.w { final Symbol _symbol_w = _symbols[offset + 1]; final Access w = (Access) _symbol_w.value; return w; } case 493: // reference_type_1 = reference_type.t GT.GT { final Symbol _symbol_t = _symbols[offset + 1]; final Access t = (Access) _symbol_t.value; final Symbol GT = _symbols[offset + 2]; return t; } case 494: // reference_type_1 = class_or_interface.t LT.LT type_argument_list_2.l { final Symbol _symbol_t = _symbols[offset + 1]; final Access t = (Access) _symbol_t.value; final Symbol LT = _symbols[offset + 2]; final Symbol _symbol_l = _symbols[offset + 3]; final List l = (List) _symbol_l.value; return new ParTypeAccess(t, l); } case 495: // reference_type_2 = reference_type.t RSHIFT.RSHIFT { final Symbol _symbol_t = _symbols[offset + 1]; final Access t = (Access) _symbol_t.value; final Symbol RSHIFT = _symbols[offset + 2]; return t; } case 496: // reference_type_2 = class_or_interface.t LT.LT type_argument_list_3.l { final Symbol _symbol_t = _symbols[offset + 1]; final Access t = (Access) _symbol_t.value; final Symbol LT = _symbols[offset + 2]; final Symbol _symbol_l = _symbols[offset + 3]; final List l = (List) _symbol_l.value; return new ParTypeAccess(t, l); } case 497: // reference_type_3 = reference_type.t URSHIFT.URSHIFT { final Symbol _symbol_t = _symbols[offset + 1]; final Access t = (Access) _symbol_t.value; final Symbol URSHIFT = _symbols[offset + 2]; return t; } case 498: // cast_expression = LPAREN.LPAREN name.n LT.LT type_argument_list_1.a RPAREN.RPAREN unary_expression_not_plus_minus.e { final Symbol LPAREN = _symbols[offset + 1]; final Symbol _symbol_n = _symbols[offset + 2]; final Access n = (Access) _symbol_n.value; final Symbol LT = _symbols[offset + 3]; final Symbol _symbol_a = _symbols[offset + 4]; final List a = (List) _symbol_a.value; final Symbol RPAREN = _symbols[offset + 5]; final Symbol _symbol_e = _symbols[offset + 6]; final Expr e = (Expr) _symbol_e.value; return new CastExpr(new ParTypeAccess(n, a).addArrayDims(new List()), e); } case 499: // cast_expression = LPAREN.LPAREN name.n LT.LT type_argument_list_1.a dims.d RPAREN.RPAREN unary_expression_not_plus_minus.e { final Symbol LPAREN = _symbols[offset + 1]; final Symbol _symbol_n = _symbols[offset + 2]; final Access n = (Access) _symbol_n.value; final Symbol LT = _symbols[offset + 3]; final Symbol _symbol_a = _symbols[offset + 4]; final List a = (List) _symbol_a.value; final Symbol _symbol_d = _symbols[offset + 5]; final List d = (List) _symbol_d.value; final Symbol RPAREN = _symbols[offset + 6]; final Symbol _symbol_e = _symbols[offset + 7]; final Expr e = (Expr) _symbol_e.value; return new CastExpr(new ParTypeAccess(n, a).addArrayDims(d), e); } case 500: // cast_expression = LPAREN.LPAREN name.n LT.LT type_argument_list_1.a DOT.DOT class_or_interface_type.t RPAREN.RPAREN unary_expression_not_plus_minus.e { final Symbol LPAREN = _symbols[offset + 1]; final Symbol _symbol_n = _symbols[offset + 2]; final Access n = (Access) _symbol_n.value; final Symbol LT = _symbols[offset + 3]; final Symbol _symbol_a = _symbols[offset + 4]; final List a = (List) _symbol_a.value; final Symbol DOT = _symbols[offset + 5]; final Symbol _symbol_t = _symbols[offset + 6]; final Access t = (Access) _symbol_t.value; final Symbol RPAREN = _symbols[offset + 7]; final Symbol _symbol_e = _symbols[offset + 8]; final Expr e = (Expr) _symbol_e.value; return new CastExpr(new ParTypeAccess(n, a).qualifiesAccess(t).addArrayDims(new List()), e); } case 501: // cast_expression = LPAREN.LPAREN name.n LT.LT type_argument_list_1.a DOT.DOT class_or_interface_type.t dims.d RPAREN.RPAREN unary_expression_not_plus_minus.e { final Symbol LPAREN = _symbols[offset + 1]; final Symbol _symbol_n = _symbols[offset + 2]; final Access n = (Access) _symbol_n.value; final Symbol LT = _symbols[offset + 3]; final Symbol _symbol_a = _symbols[offset + 4]; final List a = (List) _symbol_a.value; final Symbol DOT = _symbols[offset + 5]; final Symbol _symbol_t = _symbols[offset + 6]; final Access t = (Access) _symbol_t.value; final Symbol _symbol_d = _symbols[offset + 7]; final List d = (List) _symbol_d.value; final Symbol RPAREN = _symbols[offset + 8]; final Symbol _symbol_e = _symbols[offset + 9]; final Expr e = (Expr) _symbol_e.value; return new CastExpr(new ParTypeAccess(n, a).qualifiesAccess(t).addArrayDims(d), e); } case 502: // type_parameters = LT.LT type_parameter_list_1.l { final Symbol LT = _symbols[offset + 1]; final Symbol _symbol_l = _symbols[offset + 2]; final List l = (List) _symbol_l.value; return l; } case 503: // type_parameter_list = type_parameter_list.l COMMA.COMMA type_parameter.p { final Symbol _symbol_l = _symbols[offset + 1]; final List l = (List) _symbol_l.value; final Symbol COMMA = _symbols[offset + 2]; final Symbol _symbol_p = _symbols[offset + 3]; final TypeVariable p = (TypeVariable) _symbol_p.value; return l.add(p); } case 504: // type_parameter_list = type_parameter.p { final Symbol _symbol_p = _symbols[offset + 1]; final TypeVariable p = (TypeVariable) _symbol_p.value; return new List().add(p); } case 505: // type_parameter_list_1 = type_parameter_1.p { final Symbol _symbol_p = _symbols[offset + 1]; final TypeVariable p = (TypeVariable) _symbol_p.value; return new List().add(p); } case 506: // type_parameter_list_1 = type_parameter_list.l COMMA.COMMA type_parameter_1.p { final Symbol _symbol_l = _symbols[offset + 1]; final List l = (List) _symbol_l.value; final Symbol COMMA = _symbols[offset + 2]; final Symbol _symbol_p = _symbols[offset + 3]; final TypeVariable p = (TypeVariable) _symbol_p.value; return l.add(p); } case 507: // type_parameter = IDENTIFIER.IDENTIFIER { final Symbol IDENTIFIER = _symbols[offset + 1]; return new TypeVariable(new Modifiers(), IDENTIFIER, new List(), new List()); } case 508: // type_parameter = IDENTIFIER.IDENTIFIER type_bound.l { final Symbol IDENTIFIER = _symbols[offset + 1]; final Symbol _symbol_l = _symbols[offset + 2]; final List l = (List) _symbol_l.value; return new TypeVariable(new Modifiers(), IDENTIFIER, new List(), l); } case 509: // type_parameter_1 = IDENTIFIER.IDENTIFIER GT.GT { final Symbol IDENTIFIER = _symbols[offset + 1]; final Symbol GT = _symbols[offset + 2]; return new TypeVariable(new Modifiers(), IDENTIFIER, new List(), new List()); } case 510: // type_parameter_1 = IDENTIFIER.IDENTIFIER type_bound_1.l { final Symbol IDENTIFIER = _symbols[offset + 1]; final Symbol _symbol_l = _symbols[offset + 2]; final List l = (List) _symbol_l.value; return new TypeVariable(new Modifiers(), IDENTIFIER, new List(), l); } case 511: // type_bound = EXTENDS.EXTENDS reference_type.t { final Symbol EXTENDS = _symbols[offset + 1]; final Symbol _symbol_t = _symbols[offset + 2]; final Access t = (Access) _symbol_t.value; return new List().add(t); } case 512: // type_bound = EXTENDS.EXTENDS reference_type.t additional_bound_list.l { final Symbol EXTENDS = _symbols[offset + 1]; final Symbol _symbol_t = _symbols[offset + 2]; final Access t = (Access) _symbol_t.value; final Symbol _symbol_l = _symbols[offset + 3]; final List l = (List) _symbol_l.value; l.insertChild(t,0); return l; } case 513: // type_bound_1 = EXTENDS.EXTENDS reference_type_1.t { final Symbol EXTENDS = _symbols[offset + 1]; final Symbol _symbol_t = _symbols[offset + 2]; final Access t = (Access) _symbol_t.value; return new List().add(t); } case 514: // type_bound_1 = EXTENDS.EXTENDS reference_type.t additional_bound_list_1.l { final Symbol EXTENDS = _symbols[offset + 1]; final Symbol _symbol_t = _symbols[offset + 2]; final Access t = (Access) _symbol_t.value; final Symbol _symbol_l = _symbols[offset + 3]; final List l = (List) _symbol_l.value; l.insertChild(t,0); return l; } case 515: // additional_bound_list = additional_bound.b additional_bound_list.l { final Symbol _symbol_b = _symbols[offset + 1]; final Access b = (Access) _symbol_b.value; final Symbol _symbol_l = _symbols[offset + 2]; final List l = (List) _symbol_l.value; l.insertChild(b,0); return l; } case 516: // additional_bound_list = additional_bound.b { final Symbol _symbol_b = _symbols[offset + 1]; final Access b = (Access) _symbol_b.value; return new List().add(b); } case 517: // additional_bound_list_1 = additional_bound.b additional_bound_list_1.l { final Symbol _symbol_b = _symbols[offset + 1]; final Access b = (Access) _symbol_b.value; final Symbol _symbol_l = _symbols[offset + 2]; final List l = (List) _symbol_l.value; l.insertChild(b,0); return l; } case 518: // additional_bound_list_1 = additional_bound_1.b { final Symbol _symbol_b = _symbols[offset + 1]; final Access b = (Access) _symbol_b.value; return new List().add(b); } case 519: // additional_bound = AND.AND interface_type.t { final Symbol AND = _symbols[offset + 1]; final Symbol _symbol_t = _symbols[offset + 2]; final Access t = (Access) _symbol_t.value; return t; } case 520: // additional_bound_1 = AND.AND reference_type_1.t { final Symbol AND = _symbols[offset + 1]; final Symbol _symbol_t = _symbols[offset + 2]; final Access t = (Access) _symbol_t.value; return t; } case 521: // import_declaration = single_static_import_declaration.s { final Symbol _symbol_s = _symbols[offset + 1]; final ImportDecl s = (ImportDecl) _symbol_s.value; return s; } case 522: // import_declaration = static_import_on_demand_declaration.t { final Symbol _symbol_t = _symbols[offset + 1]; final ImportDecl t = (ImportDecl) _symbol_t.value; return t; } case 523: // single_static_import_declaration = IMPORT.IMPORT STATIC.STATIC name.n DOT.DOT IDENTIFIER.IDENTIFIER SEMICOLON.SEMICOLON { final Symbol IMPORT = _symbols[offset + 1]; final Symbol STATIC = _symbols[offset + 2]; final Symbol _symbol_n = _symbols[offset + 3]; final Access n = (Access) _symbol_n.value; final Symbol DOT = _symbols[offset + 4]; final Symbol IDENTIFIER = _symbols[offset + 5]; final Symbol SEMICOLON = _symbols[offset + 6]; return new SingleStaticImportDecl(n, IDENTIFIER); } case 524: // static_import_on_demand_declaration = IMPORT.IMPORT STATIC.STATIC name.n DOT.DOT MULT.MULT SEMICOLON.SEMICOLON { final Symbol IMPORT = _symbols[offset + 1]; final Symbol STATIC = _symbols[offset + 2]; final Symbol _symbol_n = _symbols[offset + 3]; final Access n = (Access) _symbol_n.value; final Symbol DOT = _symbols[offset + 4]; final Symbol MULT = _symbols[offset + 5]; final Symbol SEMICOLON = _symbols[offset + 6]; return new StaticImportOnDemandDecl(n); } case 525: // formal_parameter = type.t ELLIPSIS.ELLIPSIS IDENTIFIER.IDENTIFIER dims_opt.d { final Symbol _symbol_t = _symbols[offset + 1]; final Access t = (Access) _symbol_t.value; final Symbol ELLIPSIS = _symbols[offset + 2]; final Symbol IDENTIFIER = _symbols[offset + 3]; final Symbol _symbol_d = _symbols[offset + 4]; final List d = (List) _symbol_d.value; return new VariableArityParameterDeclaration(new Modifiers(new List()), t.addArrayDims(d), IDENTIFIER); } case 526: // formal_parameter = modifiers.m type.t ELLIPSIS.ELLIPSIS IDENTIFIER.IDENTIFIER dims_opt.d { final Symbol _symbol_m = _symbols[offset + 1]; final List m = (List) _symbol_m.value; final Symbol _symbol_t = _symbols[offset + 2]; final Access t = (Access) _symbol_t.value; final Symbol ELLIPSIS = _symbols[offset + 3]; final Symbol IDENTIFIER = _symbols[offset + 4]; final Symbol _symbol_d = _symbols[offset + 5]; final List d = (List) _symbol_d.value; return new VariableArityParameterDeclaration(new Modifiers(m), t.addArrayDims(d), IDENTIFIER); } case 527: // primary_no_new_array = literal.l { final Symbol _symbol_l = _symbols[offset + 1]; final Expr l = (Expr) _symbol_l.value; return l; } case 528: // primary_no_new_array = primitive_type.n DOT.DOT class_literal.c { final Symbol _symbol_n = _symbols[offset + 1]; final Access n = (Access) _symbol_n.value; final Symbol DOT = _symbols[offset + 2]; final Symbol _symbol_c = _symbols[offset + 3]; final ClassAccess c = (ClassAccess) _symbol_c.value; return n.addArrayDims(new List()).qualifiesAccess(c); } case 529: // primary_no_new_array = primitive_type.n dims.d DOT.DOT class_literal.c { final Symbol _symbol_n = _symbols[offset + 1]; final Access n = (Access) _symbol_n.value; final Symbol _symbol_d = _symbols[offset + 2]; final List d = (List) _symbol_d.value; final Symbol DOT = _symbols[offset + 3]; final Symbol _symbol_c = _symbols[offset + 4]; final ClassAccess c = (ClassAccess) _symbol_c.value; return n.addArrayDims(d).qualifiesAccess(c); } case 530: // primary_no_new_array = name.n DOT.DOT class_literal.c { final Symbol _symbol_n = _symbols[offset + 1]; final Access n = (Access) _symbol_n.value; final Symbol DOT = _symbols[offset + 2]; final Symbol _symbol_c = _symbols[offset + 3]; final ClassAccess c = (ClassAccess) _symbol_c.value; return n.addArrayDims(new List()).qualifiesAccess(c); } case 531: // primary_no_new_array = name.n dims.d DOT.DOT class_literal.c { final Symbol _symbol_n = _symbols[offset + 1]; final Access n = (Access) _symbol_n.value; final Symbol _symbol_d = _symbols[offset + 2]; final List d = (List) _symbol_d.value; final Symbol DOT = _symbols[offset + 3]; final Symbol _symbol_c = _symbols[offset + 4]; final ClassAccess c = (ClassAccess) _symbol_c.value; return n.addArrayDims(d).qualifiesAccess(c); } case 532: // primary_no_new_array = VOID.VOID DOT.DOT class_literal.c { final Symbol VOID = _symbols[offset + 1]; final Symbol DOT = _symbols[offset + 2]; final Symbol _symbol_c = _symbols[offset + 3]; final ClassAccess c = (ClassAccess) _symbol_c.value; PrimitiveTypeAccess v = new PrimitiveTypeAccess("void"); v.setStart(VOID.getStart()); v.setEnd(VOID.getEnd()); return v.qualifiesAccess(c); } case 533: // primary_no_new_array = THIS.THIS { final Symbol THIS = _symbols[offset + 1]; return new ThisAccess("this"); } case 534: // primary_no_new_array = name.n DOT.DOT THIS.THIS { final Symbol _symbol_n = _symbols[offset + 1]; final Access n = (Access) _symbol_n.value; final Symbol DOT = _symbols[offset + 2]; final Symbol THIS = _symbols[offset + 3]; ThisAccess t = new ThisAccess("this"); t.setStart(THIS.getStart()); t.setEnd(THIS.getEnd()); return n.qualifiesAccess(t); } case 535: // primary_no_new_array = LPAREN.LPAREN expression_nn.e RPAREN.RPAREN { final Symbol LPAREN = _symbols[offset + 1]; final Symbol _symbol_e = _symbols[offset + 2]; final Expr e = (Expr) _symbol_e.value; final Symbol RPAREN = _symbols[offset + 3]; return new ParExpr(e); } case 536: // primary_no_new_array = LPAREN.LPAREN name.n RPAREN.RPAREN { final Symbol LPAREN = _symbols[offset + 1]; final Symbol _symbol_n = _symbols[offset + 2]; final Access n = (Access) _symbol_n.value; final Symbol RPAREN = _symbols[offset + 3]; return new ParExpr(n); } case 537: // primary_no_new_array = class_instance_creation_expression.c { final Symbol _symbol_c = _symbols[offset + 1]; final Expr c = (Expr) _symbol_c.value; return c; } case 538: // primary_no_new_array = field_access.f { final Symbol _symbol_f = _symbols[offset + 1]; final Access f = (Access) _symbol_f.value; return f; } case 539: // primary_no_new_array = method_invocation.m { final Symbol _symbol_m = _symbols[offset + 1]; final Access m = (Access) _symbol_m.value; return m; } case 540: // primary_no_new_array = array_access.a { final Symbol _symbol_a = _symbols[offset + 1]; final Access a = (Access) _symbol_a.value; return a; } case 541: // postfix_expression_nn = primary.p { final Symbol _symbol_p = _symbols[offset + 1]; final Expr p = (Expr) _symbol_p.value; return p; } case 542: // postfix_expression_nn = postincrement_expression.e { final Symbol _symbol_e = _symbols[offset + 1]; final Expr e = (Expr) _symbol_e.value; return e; } case 543: // postfix_expression_nn = postdecrement_expression.e { final Symbol _symbol_e = _symbols[offset + 1]; final Expr e = (Expr) _symbol_e.value; return e; } case 544: // unary_expression_nn = preincrement_expression.e { final Symbol _symbol_e = _symbols[offset + 1]; final Expr e = (Expr) _symbol_e.value; return e; } case 545: // unary_expression_nn = predecrement_expression.e { final Symbol _symbol_e = _symbols[offset + 1]; final Expr e = (Expr) _symbol_e.value; return e; } case 546: // unary_expression_nn = PLUS.PLUS unary_expression.e { final Symbol PLUS = _symbols[offset + 1]; final Symbol _symbol_e = _symbols[offset + 2]; final Expr e = (Expr) _symbol_e.value; return new PlusExpr(e); } case 547: // unary_expression_nn = MINUS.MINUS unary_expression.e { final Symbol MINUS = _symbols[offset + 1]; final Symbol _symbol_e = _symbols[offset + 2]; final Expr e = (Expr) _symbol_e.value; return new MinusExpr(e); } case 548: // unary_expression_nn = unary_expression_not_plus_minus_nn.e { final Symbol _symbol_e = _symbols[offset + 1]; final Expr e = (Expr) _symbol_e.value; return e; } case 549: // unary_expression_not_plus_minus_nn = postfix_expression_nn.e { final Symbol _symbol_e = _symbols[offset + 1]; final Expr e = (Expr) _symbol_e.value; return e; } case 550: // unary_expression_not_plus_minus_nn = COMP.COMP unary_expression.e { final Symbol COMP = _symbols[offset + 1]; final Symbol _symbol_e = _symbols[offset + 2]; final Expr e = (Expr) _symbol_e.value; return new BitNotExpr(e); } case 551: // unary_expression_not_plus_minus_nn = NOT.NOT unary_expression.e { final Symbol NOT = _symbols[offset + 1]; final Symbol _symbol_e = _symbols[offset + 2]; final Expr e = (Expr) _symbol_e.value; return new LogNotExpr(e); } case 552: // unary_expression_not_plus_minus_nn = cast_expression.e { final Symbol _symbol_e = _symbols[offset + 1]; final Expr e = (Expr) _symbol_e.value; return e; } case 553: // multiplicative_expression_nn = unary_expression_nn.e { final Symbol _symbol_e = _symbols[offset + 1]; final Expr e = (Expr) _symbol_e.value; return e; } case 554: // multiplicative_expression_nn = name.e1 MULT.MULT unary_expression.e2 { final Symbol _symbol_e1 = _symbols[offset + 1]; final Access e1 = (Access) _symbol_e1.value; final Symbol MULT = _symbols[offset + 2]; final Symbol _symbol_e2 = _symbols[offset + 3]; final Expr e2 = (Expr) _symbol_e2.value; return new MulExpr(e1, e2); } case 555: // multiplicative_expression_nn = multiplicative_expression_nn.e1 MULT.MULT unary_expression.e2 { final Symbol _symbol_e1 = _symbols[offset + 1]; final Expr e1 = (Expr) _symbol_e1.value; final Symbol MULT = _symbols[offset + 2]; final Symbol _symbol_e2 = _symbols[offset + 3]; final Expr e2 = (Expr) _symbol_e2.value; return new MulExpr(e1, e2); } case 556: // multiplicative_expression_nn = name.e1 DIV.DIV unary_expression.e2 { final Symbol _symbol_e1 = _symbols[offset + 1]; final Access e1 = (Access) _symbol_e1.value; final Symbol DIV = _symbols[offset + 2]; final Symbol _symbol_e2 = _symbols[offset + 3]; final Expr e2 = (Expr) _symbol_e2.value; return new DivExpr(e1, e2); } case 557: // multiplicative_expression_nn = multiplicative_expression_nn.e1 DIV.DIV unary_expression.e2 { final Symbol _symbol_e1 = _symbols[offset + 1]; final Expr e1 = (Expr) _symbol_e1.value; final Symbol DIV = _symbols[offset + 2]; final Symbol _symbol_e2 = _symbols[offset + 3]; final Expr e2 = (Expr) _symbol_e2.value; return new DivExpr(e1, e2); } case 558: // multiplicative_expression_nn = name.e1 MOD.MOD unary_expression.e2 { final Symbol _symbol_e1 = _symbols[offset + 1]; final Access e1 = (Access) _symbol_e1.value; final Symbol MOD = _symbols[offset + 2]; final Symbol _symbol_e2 = _symbols[offset + 3]; final Expr e2 = (Expr) _symbol_e2.value; return new ModExpr(e1, e2); } case 559: // multiplicative_expression_nn = multiplicative_expression_nn.e1 MOD.MOD unary_expression.e2 { final Symbol _symbol_e1 = _symbols[offset + 1]; final Expr e1 = (Expr) _symbol_e1.value; final Symbol MOD = _symbols[offset + 2]; final Symbol _symbol_e2 = _symbols[offset + 3]; final Expr e2 = (Expr) _symbol_e2.value; return new ModExpr(e1, e2); } case 560: // additive_expression_nn = multiplicative_expression_nn.e { final Symbol _symbol_e = _symbols[offset + 1]; final Expr e = (Expr) _symbol_e.value; return e; } case 561: // additive_expression_nn = name.e1 PLUS.PLUS multiplicative_expression.e2 { final Symbol _symbol_e1 = _symbols[offset + 1]; final Access e1 = (Access) _symbol_e1.value; final Symbol PLUS = _symbols[offset + 2]; final Symbol _symbol_e2 = _symbols[offset + 3]; final Expr e2 = (Expr) _symbol_e2.value; return new AddExpr(e1, e2); } case 562: // additive_expression_nn = additive_expression_nn.e1 PLUS.PLUS multiplicative_expression.e2 { final Symbol _symbol_e1 = _symbols[offset + 1]; final Expr e1 = (Expr) _symbol_e1.value; final Symbol PLUS = _symbols[offset + 2]; final Symbol _symbol_e2 = _symbols[offset + 3]; final Expr e2 = (Expr) _symbol_e2.value; return new AddExpr(e1, e2); } case 563: // additive_expression_nn = name.e1 MINUS.MINUS multiplicative_expression.e2 { final Symbol _symbol_e1 = _symbols[offset + 1]; final Access e1 = (Access) _symbol_e1.value; final Symbol MINUS = _symbols[offset + 2]; final Symbol _symbol_e2 = _symbols[offset + 3]; final Expr e2 = (Expr) _symbol_e2.value; return new SubExpr(e1, e2); } case 564: // additive_expression_nn = additive_expression_nn.e1 MINUS.MINUS multiplicative_expression.e2 { final Symbol _symbol_e1 = _symbols[offset + 1]; final Expr e1 = (Expr) _symbol_e1.value; final Symbol MINUS = _symbols[offset + 2]; final Symbol _symbol_e2 = _symbols[offset + 3]; final Expr e2 = (Expr) _symbol_e2.value; return new SubExpr(e1, e2); } case 565: // shift_expression_nn = additive_expression_nn.e { final Symbol _symbol_e = _symbols[offset + 1]; final Expr e = (Expr) _symbol_e.value; return e; } case 566: // shift_expression_nn = name.e1 LSHIFT.LSHIFT additive_expression.e2 { final Symbol _symbol_e1 = _symbols[offset + 1]; final Access e1 = (Access) _symbol_e1.value; final Symbol LSHIFT = _symbols[offset + 2]; final Symbol _symbol_e2 = _symbols[offset + 3]; final Expr e2 = (Expr) _symbol_e2.value; return new LShiftExpr(e1, e2); } case 567: // shift_expression_nn = shift_expression_nn.e1 LSHIFT.LSHIFT additive_expression.e2 { final Symbol _symbol_e1 = _symbols[offset + 1]; final Expr e1 = (Expr) _symbol_e1.value; final Symbol LSHIFT = _symbols[offset + 2]; final Symbol _symbol_e2 = _symbols[offset + 3]; final Expr e2 = (Expr) _symbol_e2.value; return new LShiftExpr(e1, e2); } case 568: // shift_expression_nn = name.e1 RSHIFT.RSHIFT additive_expression.e2 { final Symbol _symbol_e1 = _symbols[offset + 1]; final Access e1 = (Access) _symbol_e1.value; final Symbol RSHIFT = _symbols[offset + 2]; final Symbol _symbol_e2 = _symbols[offset + 3]; final Expr e2 = (Expr) _symbol_e2.value; return new RShiftExpr(e1, e2); } case 569: // shift_expression_nn = shift_expression_nn.e1 RSHIFT.RSHIFT additive_expression.e2 { final Symbol _symbol_e1 = _symbols[offset + 1]; final Expr e1 = (Expr) _symbol_e1.value; final Symbol RSHIFT = _symbols[offset + 2]; final Symbol _symbol_e2 = _symbols[offset + 3]; final Expr e2 = (Expr) _symbol_e2.value; return new RShiftExpr(e1, e2); } case 570: // shift_expression_nn = name.e1 URSHIFT.URSHIFT additive_expression.e2 { final Symbol _symbol_e1 = _symbols[offset + 1]; final Access e1 = (Access) _symbol_e1.value; final Symbol URSHIFT = _symbols[offset + 2]; final Symbol _symbol_e2 = _symbols[offset + 3]; final Expr e2 = (Expr) _symbol_e2.value; return new URShiftExpr(e1, e2); } case 571: // shift_expression_nn = shift_expression_nn.e1 URSHIFT.URSHIFT additive_expression.e2 { final Symbol _symbol_e1 = _symbols[offset + 1]; final Expr e1 = (Expr) _symbol_e1.value; final Symbol URSHIFT = _symbols[offset + 2]; final Symbol _symbol_e2 = _symbols[offset + 3]; final Expr e2 = (Expr) _symbol_e2.value; return new URShiftExpr(e1, e2); } case 572: // relational_expression_nn = shift_expression_nn.e { final Symbol _symbol_e = _symbols[offset + 1]; final Expr e = (Expr) _symbol_e.value; return e; } case 573: // relational_expression_nn = name.e1 LT.LT shift_expression.e2 { final Symbol _symbol_e1 = _symbols[offset + 1]; final Access e1 = (Access) _symbol_e1.value; final Symbol LT = _symbols[offset + 2]; final Symbol _symbol_e2 = _symbols[offset + 3]; final Expr e2 = (Expr) _symbol_e2.value; return new LTExpr(e1, e2); } case 574: // relational_expression_nn = shift_expression_nn.e1 LT.LT shift_expression.e2 { final Symbol _symbol_e1 = _symbols[offset + 1]; final Expr e1 = (Expr) _symbol_e1.value; final Symbol LT = _symbols[offset + 2]; final Symbol _symbol_e2 = _symbols[offset + 3]; final Expr e2 = (Expr) _symbol_e2.value; return new LTExpr(e1, e2); } case 575: // relational_expression_nn = name.e1 GT.GT shift_expression.e2 { final Symbol _symbol_e1 = _symbols[offset + 1]; final Access e1 = (Access) _symbol_e1.value; final Symbol GT = _symbols[offset + 2]; final Symbol _symbol_e2 = _symbols[offset + 3]; final Expr e2 = (Expr) _symbol_e2.value; return new GTExpr(e1, e2); } case 576: // relational_expression_nn = shift_expression_nn.e1 GT.GT shift_expression.e2 { final Symbol _symbol_e1 = _symbols[offset + 1]; final Expr e1 = (Expr) _symbol_e1.value; final Symbol GT = _symbols[offset + 2]; final Symbol _symbol_e2 = _symbols[offset + 3]; final Expr e2 = (Expr) _symbol_e2.value; return new GTExpr(e1, e2); } case 577: // relational_expression_nn = name.e1 LTEQ.LTEQ shift_expression.e2 { final Symbol _symbol_e1 = _symbols[offset + 1]; final Access e1 = (Access) _symbol_e1.value; final Symbol LTEQ = _symbols[offset + 2]; final Symbol _symbol_e2 = _symbols[offset + 3]; final Expr e2 = (Expr) _symbol_e2.value; return new LEExpr(e1, e2); } case 578: // relational_expression_nn = relational_expression_nn.e1 LTEQ.LTEQ shift_expression.e2 { final Symbol _symbol_e1 = _symbols[offset + 1]; final Expr e1 = (Expr) _symbol_e1.value; final Symbol LTEQ = _symbols[offset + 2]; final Symbol _symbol_e2 = _symbols[offset + 3]; final Expr e2 = (Expr) _symbol_e2.value; return new LEExpr(e1, e2); } case 579: // relational_expression_nn = name.e1 GTEQ.GTEQ shift_expression.e2 { final Symbol _symbol_e1 = _symbols[offset + 1]; final Access e1 = (Access) _symbol_e1.value; final Symbol GTEQ = _symbols[offset + 2]; final Symbol _symbol_e2 = _symbols[offset + 3]; final Expr e2 = (Expr) _symbol_e2.value; return new GEExpr(e1, e2); } case 580: // relational_expression_nn = relational_expression_nn.e1 GTEQ.GTEQ shift_expression.e2 { final Symbol _symbol_e1 = _symbols[offset + 1]; final Expr e1 = (Expr) _symbol_e1.value; final Symbol GTEQ = _symbols[offset + 2]; final Symbol _symbol_e2 = _symbols[offset + 3]; final Expr e2 = (Expr) _symbol_e2.value; return new GEExpr(e1, e2); } case 581: // relational_expression_nn = name.e INSTANCEOF.INSTANCEOF reference_type.t { final Symbol _symbol_e = _symbols[offset + 1]; final Access e = (Access) _symbol_e.value; final Symbol INSTANCEOF = _symbols[offset + 2]; final Symbol _symbol_t = _symbols[offset + 3]; final Access t = (Access) _symbol_t.value; return new InstanceOfExpr(e, t); } case 582: // relational_expression_nn = relational_expression_nn.e INSTANCEOF.INSTANCEOF reference_type.t { final Symbol _symbol_e = _symbols[offset + 1]; final Expr e = (Expr) _symbol_e.value; final Symbol INSTANCEOF = _symbols[offset + 2]; final Symbol _symbol_t = _symbols[offset + 3]; final Access t = (Access) _symbol_t.value; return new InstanceOfExpr(e, t); } case 583: // equality_expression_nn = relational_expression_nn.e { final Symbol _symbol_e = _symbols[offset + 1]; final Expr e = (Expr) _symbol_e.value; return e; } case 584: // equality_expression_nn = name.e1 EQEQ.EQEQ relational_expression.e2 { final Symbol _symbol_e1 = _symbols[offset + 1]; final Access e1 = (Access) _symbol_e1.value; final Symbol EQEQ = _symbols[offset + 2]; final Symbol _symbol_e2 = _symbols[offset + 3]; final Expr e2 = (Expr) _symbol_e2.value; return new EQExpr(e1, e2); } case 585: // equality_expression_nn = equality_expression_nn.e1 EQEQ.EQEQ relational_expression.e2 { final Symbol _symbol_e1 = _symbols[offset + 1]; final Expr e1 = (Expr) _symbol_e1.value; final Symbol EQEQ = _symbols[offset + 2]; final Symbol _symbol_e2 = _symbols[offset + 3]; final Expr e2 = (Expr) _symbol_e2.value; return new EQExpr(e1, e2); } case 586: // equality_expression_nn = name.e1 NOTEQ.NOTEQ relational_expression.e2 { final Symbol _symbol_e1 = _symbols[offset + 1]; final Access e1 = (Access) _symbol_e1.value; final Symbol NOTEQ = _symbols[offset + 2]; final Symbol _symbol_e2 = _symbols[offset + 3]; final Expr e2 = (Expr) _symbol_e2.value; return new NEExpr(e1, e2); } case 587: // equality_expression_nn = equality_expression_nn.e1 NOTEQ.NOTEQ relational_expression.e2 { final Symbol _symbol_e1 = _symbols[offset + 1]; final Expr e1 = (Expr) _symbol_e1.value; final Symbol NOTEQ = _symbols[offset + 2]; final Symbol _symbol_e2 = _symbols[offset + 3]; final Expr e2 = (Expr) _symbol_e2.value; return new NEExpr(e1, e2); } case 588: // and_expression_nn = equality_expression_nn.e { final Symbol _symbol_e = _symbols[offset + 1]; final Expr e = (Expr) _symbol_e.value; return e; } case 589: // and_expression_nn = name.e1 AND.AND equality_expression.e2 { final Symbol _symbol_e1 = _symbols[offset + 1]; final Access e1 = (Access) _symbol_e1.value; final Symbol AND = _symbols[offset + 2]; final Symbol _symbol_e2 = _symbols[offset + 3]; final Expr e2 = (Expr) _symbol_e2.value; return new AndBitwiseExpr(e1, e2); } case 590: // and_expression_nn = and_expression_nn.e1 AND.AND equality_expression.e2 { final Symbol _symbol_e1 = _symbols[offset + 1]; final Expr e1 = (Expr) _symbol_e1.value; final Symbol AND = _symbols[offset + 2]; final Symbol _symbol_e2 = _symbols[offset + 3]; final Expr e2 = (Expr) _symbol_e2.value; return new AndBitwiseExpr(e1, e2); } case 591: // exclusive_or_expression_nn = and_expression_nn.e { final Symbol _symbol_e = _symbols[offset + 1]; final Expr e = (Expr) _symbol_e.value; return e; } case 592: // exclusive_or_expression_nn = name.e1 XOR.XOR and_expression.e2 { final Symbol _symbol_e1 = _symbols[offset + 1]; final Access e1 = (Access) _symbol_e1.value; final Symbol XOR = _symbols[offset + 2]; final Symbol _symbol_e2 = _symbols[offset + 3]; final Expr e2 = (Expr) _symbol_e2.value; return new XorBitwiseExpr(e1, e2); } case 593: // exclusive_or_expression_nn = exclusive_or_expression_nn.e1 XOR.XOR and_expression.e2 { final Symbol _symbol_e1 = _symbols[offset + 1]; final Expr e1 = (Expr) _symbol_e1.value; final Symbol XOR = _symbols[offset + 2]; final Symbol _symbol_e2 = _symbols[offset + 3]; final Expr e2 = (Expr) _symbol_e2.value; return new XorBitwiseExpr(e1, e2); } case 594: // inclusive_or_expression_nn = exclusive_or_expression_nn.e { final Symbol _symbol_e = _symbols[offset + 1]; final Expr e = (Expr) _symbol_e.value; return e; } case 595: // inclusive_or_expression_nn = name.e1 OR.OR exclusive_or_expression.e2 { final Symbol _symbol_e1 = _symbols[offset + 1]; final Access e1 = (Access) _symbol_e1.value; final Symbol OR = _symbols[offset + 2]; final Symbol _symbol_e2 = _symbols[offset + 3]; final Expr e2 = (Expr) _symbol_e2.value; return new OrBitwiseExpr(e1, e2); } case 596: // inclusive_or_expression_nn = inclusive_or_expression_nn.e1 OR.OR exclusive_or_expression.e2 { final Symbol _symbol_e1 = _symbols[offset + 1]; final Expr e1 = (Expr) _symbol_e1.value; final Symbol OR = _symbols[offset + 2]; final Symbol _symbol_e2 = _symbols[offset + 3]; final Expr e2 = (Expr) _symbol_e2.value; return new OrBitwiseExpr(e1, e2); } case 597: // conditional_and_expression_nn = inclusive_or_expression_nn.e { final Symbol _symbol_e = _symbols[offset + 1]; final Expr e = (Expr) _symbol_e.value; return e; } case 598: // conditional_and_expression_nn = name.e1 ANDAND.ANDAND inclusive_or_expression.e2 { final Symbol _symbol_e1 = _symbols[offset + 1]; final Access e1 = (Access) _symbol_e1.value; final Symbol ANDAND = _symbols[offset + 2]; final Symbol _symbol_e2 = _symbols[offset + 3]; final Expr e2 = (Expr) _symbol_e2.value; return new AndLogicalExpr(e1, e2); } case 599: // conditional_and_expression_nn = conditional_and_expression_nn.e1 ANDAND.ANDAND inclusive_or_expression.e2 { final Symbol _symbol_e1 = _symbols[offset + 1]; final Expr e1 = (Expr) _symbol_e1.value; final Symbol ANDAND = _symbols[offset + 2]; final Symbol _symbol_e2 = _symbols[offset + 3]; final Expr e2 = (Expr) _symbol_e2.value; return new AndLogicalExpr(e1, e2); } case 600: // conditional_or_expression_nn = conditional_and_expression_nn.e { final Symbol _symbol_e = _symbols[offset + 1]; final Expr e = (Expr) _symbol_e.value; return e; } case 601: // conditional_or_expression_nn = name.e1 OROR.OROR conditional_and_expression.e2 { final Symbol _symbol_e1 = _symbols[offset + 1]; final Access e1 = (Access) _symbol_e1.value; final Symbol OROR = _symbols[offset + 2]; final Symbol _symbol_e2 = _symbols[offset + 3]; final Expr e2 = (Expr) _symbol_e2.value; return new OrLogicalExpr(e1, e2); } case 602: // conditional_or_expression_nn = conditional_or_expression_nn.e1 OROR.OROR conditional_and_expression.e2 { final Symbol _symbol_e1 = _symbols[offset + 1]; final Expr e1 = (Expr) _symbol_e1.value; final Symbol OROR = _symbols[offset + 2]; final Symbol _symbol_e2 = _symbols[offset + 3]; final Expr e2 = (Expr) _symbol_e2.value; return new OrLogicalExpr(e1, e2); } case 603: // conditional_expression_nn = conditional_or_expression_nn.c { final Symbol _symbol_c = _symbols[offset + 1]; final Expr c = (Expr) _symbol_c.value; return c; } case 604: // conditional_expression_nn = name.c QUESTION.QUESTION expression.e1 COLON.COLON conditional_expression.e2 { final Symbol _symbol_c = _symbols[offset + 1]; final Access c = (Access) _symbol_c.value; final Symbol QUESTION = _symbols[offset + 2]; final Symbol _symbol_e1 = _symbols[offset + 3]; final Expr e1 = (Expr) _symbol_e1.value; final Symbol COLON = _symbols[offset + 4]; final Symbol _symbol_e2 = _symbols[offset + 5]; final Expr e2 = (Expr) _symbol_e2.value; return new ConditionalExpr(c, e1, e2); } case 605: // conditional_expression_nn = conditional_or_expression_nn.c QUESTION.QUESTION expression.e1 COLON.COLON conditional_expression.e2 { final Symbol _symbol_c = _symbols[offset + 1]; final Expr c = (Expr) _symbol_c.value; final Symbol QUESTION = _symbols[offset + 2]; final Symbol _symbol_e1 = _symbols[offset + 3]; final Expr e1 = (Expr) _symbol_e1.value; final Symbol COLON = _symbols[offset + 4]; final Symbol _symbol_e2 = _symbols[offset + 5]; final Expr e2 = (Expr) _symbol_e2.value; return new ConditionalExpr(c, e1, e2); } case 606: // assignment_expression_nn = conditional_expression_nn.c { final Symbol _symbol_c = _symbols[offset + 1]; final Expr c = (Expr) _symbol_c.value; return c; } case 607: // assignment_expression_nn = assignment.a { final Symbol _symbol_a = _symbols[offset + 1]; final Expr a = (Expr) _symbol_a.value; return a; } case 609: // literal = NUMERIC_LITERAL.NUMERIC_LITERAL { final Symbol NUMERIC_LITERAL = _symbols[offset + 1]; return new NumericLiteral(NUMERIC_LITERAL); } case 610: // literal = BOOLEAN_LITERAL.BOOLEAN_LITERAL { final Symbol BOOLEAN_LITERAL = _symbols[offset + 1]; return new BooleanLiteral(BOOLEAN_LITERAL); } case 611: // literal = CHARACTER_LITERAL.CHARACTER_LITERAL { final Symbol CHARACTER_LITERAL = _symbols[offset + 1]; return new CharacterLiteral(CHARACTER_LITERAL); } case 612: // literal = STRING_LITERAL.STRING_LITERAL { final Symbol STRING_LITERAL = _symbols[offset + 1]; return new StringLiteral(STRING_LITERAL); } case 613: // literal = NULL_LITERAL.NULL_LITERAL { final Symbol NULL_LITERAL = _symbols[offset + 1]; return new NullLiteral(NULL_LITERAL); } case 614: // annotation_type_element_declarations_opt = { return new List(); } case 615: // annotation_type_element_declarations_opt = annotation_type_element_declarations.n { final Symbol _symbol_n = _symbols[offset + 1]; final List n = (List) _symbol_n.value; return n; } case 616: // default_value_opt = { return new Opt(); } case 617: // default_value_opt = default_value.n { final Symbol _symbol_n = _symbols[offset + 1]; final ElementValue n = (ElementValue) _symbol_n.value; return new Opt(n); } case 618: // block_statements_opt = { return new List(); } case 619: // block_statements_opt = block_statements.n { final Symbol _symbol_n = _symbols[offset + 1]; final List n = (List) _symbol_n.value; return n; } case 620: // expression_opt = { return new Opt(); } case 621: // expression_opt = expression.n { final Symbol _symbol_n = _symbols[offset + 1]; final Expr n = (Expr) _symbol_n.value; return new Opt(n); } case 622: // interface_member_declarations_opt = { return new List(); } case 623: // interface_member_declarations_opt = interface_member_declarations.n { final Symbol _symbol_n = _symbols[offset + 1]; final List n = (List) _symbol_n.value; return n; } case 624: // argument_list_opt = { return new List(); } case 625: // argument_list_opt = argument_list.n { final Symbol _symbol_n = _symbols[offset + 1]; final List n = (List) _symbol_n.value; return n; } case 626: // subclass_body_opt = { return new Opt(); } case 627: // subclass_body_opt = subclass_body.n { final Symbol _symbol_n = _symbols[offset + 1]; final Opt n = (Opt) _symbol_n.value; return n; } case 628: // dims_opt = { return new List(); } case 629: // dims_opt = dims.n { final Symbol _symbol_n = _symbols[offset + 1]; final List n = (List) _symbol_n.value; return n; } case 630: // class_body_declarations_opt = { return new List(); } case 631: // class_body_declarations_opt = class_body_declarations.n { final Symbol _symbol_n = _symbols[offset + 1]; final List n = (List) _symbol_n.value; return n; } case 632: // element_value_pairs_opt = { return new List(); } case 633: // element_value_pairs_opt = element_value_pairs.n { final Symbol _symbol_n = _symbols[offset + 1]; final List n = (List) _symbol_n.value; return n; } case 634: // throws_opt = { return new List(); } case 635: // throws_opt = throws.n { final Symbol _symbol_n = _symbols[offset + 1]; final List n = (List) _symbol_n.value; return n; } case 636: // for_init_opt = { return new List(); } case 637: // for_init_opt = for_init.n { final Symbol _symbol_n = _symbols[offset + 1]; final List n = (List) _symbol_n.value; return n; } case 638: // formal_parameter_list_opt = { return new List(); } case 639: // formal_parameter_list_opt = formal_parameter_list.n { final Symbol _symbol_n = _symbols[offset + 1]; final List n = (List) _symbol_n.value; return n; } case 640: // for_update_opt = { return new List(); } case 641: // for_update_opt = for_update.n { final Symbol _symbol_n = _symbols[offset + 1]; final List n = (List) _symbol_n.value; return n; } case 345: // annotation_type_element_declaration = constant_declaration.constant_declaration case 352: // modifier = annotation.annotation case 353: // annotation = normal_annotation.normal_annotation case 354: // annotation = marker_annotation.marker_annotation case 355: // annotation = single_element_annotation.single_element_annotation case 608: // expression_nn = assignment_expression_nn.assignment_expression_nn { return _symbols[offset + 1]; } default: throw new IllegalArgumentException("unknown production #" + rule_num); } } }
284,085
44.287103
258
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/JavaParser.java
package soot.JastAddJ; import java.util.HashSet; 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; /** * @ast interface * */ public interface JavaParser { CompilationUnit parse(InputStream is, String fileName) throws IOException, beaver.Parser.Exception; }
645
21.275862
103
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/JavaScanner.java
/* The following code was generated by JFlex 1.4 on 1/18/13 11:47 AM */ package soot.JastAddJ; import beaver.Symbol; import beaver.Scanner; import soot.JastAddJ.JastAddJavaParser.Terminals; import java.io.*; /** * This class is a scanner generated by * <a href="http://www.jflex.de/">JFlex</a> 1.4 * on 1/18/13 11:47 AM from the specification file * <tt>/Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/SootJastAddJ/soot/JastAddJ/JavaScanner.flex</tt> */ public final class JavaScanner extends Scanner { /** This character denotes the end of file */ public static final int YYEOF = -1; /** initial size of the lookahead buffer */ private static final int ZZ_BUFFERSIZE = 16384; /** lexical states */ public static final int STRING = 1; public static final int YYINITIAL = 0; /** * Translates characters to character classes */ private static final String ZZ_CMAP_PACKED = "\11\101\1\3\1\1\1\0\1\3\1\2\14\101\1\102\1\101\4\0"+ "\1\3\1\66\1\20\1\0\1\100\1\76\1\72\1\17\1\53\1\54"+ "\1\5\1\74\1\62\1\13\1\11\1\4\1\6\3\6\4\22\2\10"+ "\1\71\1\61\1\65\1\63\1\64\1\70\1\77\4\16\1\12\1\16"+ "\5\100\1\7\3\100\1\15\7\100\1\14\2\100\1\57\1\21\1\60"+ "\1\75\1\16\1\0\1\23\1\30\1\31\1\42\1\25\1\43\1\45"+ "\1\37\1\40\1\100\1\35\1\33\1\46\1\34\1\32\1\47\1\100"+ "\1\26\1\24\1\27\1\41\1\50\1\51\1\44\1\36\1\52\1\55"+ "\1\73\1\56\1\67\41\101\2\0\4\100\4\0\1\100\2\0\1\101"+ "\7\0\1\100\4\0\1\100\5\0\27\100\1\0\37\100\1\0\u013f\100"+ "\31\0\162\100\4\0\14\100\16\0\5\100\11\0\1\100\21\0\130\101"+ "\5\0\23\101\12\0\1\100\13\0\1\100\1\0\3\100\1\0\1\100"+ "\1\0\24\100\1\0\54\100\1\0\46\100\1\0\5\100\4\0\202\100"+ "\1\0\4\101\3\0\105\100\1\0\46\100\2\0\2\100\6\0\20\100"+ "\41\0\46\100\2\0\1\100\7\0\47\100\11\0\21\101\1\0\27\101"+ "\1\0\3\101\1\0\1\101\1\0\2\101\1\0\1\101\13\0\33\100"+ "\5\0\3\100\15\0\4\101\14\0\6\101\13\0\32\100\5\0\13\100"+ "\16\101\7\0\12\101\4\0\2\100\1\101\143\100\1\0\1\100\10\101"+ "\1\0\6\101\2\100\2\101\1\0\4\101\2\100\12\101\3\100\2\0"+ "\1\100\17\0\1\101\1\100\1\101\36\100\33\101\2\0\3\100\60\0"+ "\46\100\13\101\1\100\u014f\0\3\101\66\100\2\0\1\101\1\100\20\101"+ "\2\0\1\100\4\101\3\0\12\100\2\101\2\0\12\101\21\0\3\101"+ "\1\0\10\100\2\0\2\100\2\0\26\100\1\0\7\100\1\0\1\100"+ "\3\0\4\100\2\0\1\101\1\100\7\101\2\0\2\101\2\0\3\101"+ "\11\0\1\101\4\0\2\100\1\0\3\100\2\101\2\0\12\101\4\100"+ "\15\0\3\101\1\0\6\100\4\0\2\100\2\0\26\100\1\0\7\100"+ "\1\0\2\100\1\0\2\100\1\0\2\100\2\0\1\101\1\0\5\101"+ "\4\0\2\101\2\0\3\101\13\0\4\100\1\0\1\100\7\0\14\101"+ "\3\100\14\0\3\101\1\0\11\100\1\0\3\100\1\0\26\100\1\0"+ "\7\100\1\0\2\100\1\0\5\100\2\0\1\101\1\100\10\101\1\0"+ "\3\101\1\0\3\101\2\0\1\100\17\0\2\100\2\101\2\0\12\101"+ "\1\0\1\100\17\0\3\101\1\0\10\100\2\0\2\100\2\0\26\100"+ "\1\0\7\100\1\0\2\100\1\0\5\100\2\0\1\101\1\100\6\101"+ "\3\0\2\101\2\0\3\101\10\0\2\101\4\0\2\100\1\0\3\100"+ "\4\0\12\101\1\0\1\100\20\0\1\101\1\100\1\0\6\100\3\0"+ "\3\100\1\0\4\100\3\0\2\100\1\0\1\100\1\0\2\100\3\0"+ "\2\100\3\0\3\100\3\0\10\100\1\0\3\100\4\0\5\101\3\0"+ "\3\101\1\0\4\101\11\0\1\101\17\0\11\101\11\0\1\100\7\0"+ "\3\101\1\0\10\100\1\0\3\100\1\0\27\100\1\0\12\100\1\0"+ "\5\100\4\0\7\101\1\0\3\101\1\0\4\101\7\0\2\101\11\0"+ "\2\100\4\0\12\101\22\0\2\101\1\0\10\100\1\0\3\100\1\0"+ "\27\100\1\0\12\100\1\0\5\100\2\0\1\101\1\100\7\101\1\0"+ "\3\101\1\0\4\101\7\0\2\101\7\0\1\100\1\0\2\100\4\0"+ "\12\101\22\0\2\101\1\0\10\100\1\0\3\100\1\0\27\100\1\0"+ "\20\100\4\0\6\101\2\0\3\101\1\0\4\101\11\0\1\101\10\0"+ "\2\100\4\0\12\101\22\0\2\101\1\0\22\100\3\0\30\100\1\0"+ "\11\100\1\0\1\100\2\0\7\100\3\0\1\101\4\0\6\101\1\0"+ "\1\101\1\0\10\101\22\0\2\101\15\0\60\100\1\101\2\100\7\101"+ "\4\0\10\100\10\101\1\0\12\101\47\0\2\100\1\0\1\100\2\0"+ "\2\100\1\0\1\100\2\0\1\100\6\0\4\100\1\0\7\100\1\0"+ "\3\100\1\0\1\100\1\0\1\100\2\0\2\100\1\0\4\100\1\101"+ "\2\100\6\101\1\0\2\101\1\100\2\0\5\100\1\0\1\100\1\0"+ "\6\101\2\0\12\101\2\0\2\100\42\0\1\100\27\0\2\101\6\0"+ "\12\101\13\0\1\101\1\0\1\101\1\0\1\101\4\0\2\101\10\100"+ "\1\0\42\100\6\0\24\101\1\0\2\101\4\100\4\0\10\101\1\0"+ "\44\101\11\0\1\101\71\0\42\100\1\0\5\100\1\0\2\100\1\0"+ "\7\101\3\0\4\101\6\0\12\101\6\0\6\100\4\101\106\0\46\100"+ "\12\0\51\100\7\0\132\100\5\0\104\100\5\0\122\100\6\0\7\100"+ "\1\0\77\100\1\0\1\100\1\0\4\100\2\0\7\100\1\0\1\100"+ "\1\0\4\100\2\0\47\100\1\0\1\100\1\0\4\100\2\0\37\100"+ "\1\0\1\100\1\0\4\100\2\0\7\100\1\0\1\100\1\0\4\100"+ "\2\0\7\100\1\0\7\100\1\0\27\100\1\0\37\100\1\0\1\100"+ "\1\0\4\100\2\0\7\100\1\0\47\100\1\0\23\100\16\0\11\101"+ "\56\0\125\100\14\0\u026c\100\2\0\10\100\12\0\32\100\5\0\113\100"+ "\3\0\3\100\17\0\15\100\1\0\4\100\3\101\13\0\22\100\3\101"+ "\13\0\22\100\2\101\14\0\15\100\1\0\3\100\1\0\2\101\14\0"+ "\64\100\40\101\3\0\1\100\3\0\2\100\1\101\2\0\12\101\41\0"+ "\3\101\2\0\12\101\6\0\130\100\10\0\51\100\1\101\126\0\35\100"+ "\3\0\14\101\4\0\14\101\12\0\12\101\36\100\2\0\5\100\u038b\0"+ "\154\100\224\0\234\100\4\0\132\100\6\0\26\100\2\0\6\100\2\0"+ "\46\100\2\0\6\100\2\0\10\100\1\0\1\100\1\0\1\100\1\0"+ "\1\100\1\0\37\100\2\0\65\100\1\0\7\100\1\0\1\100\3\0"+ "\3\100\1\0\7\100\3\0\4\100\2\0\6\100\4\0\15\100\5\0"+ "\3\100\1\0\7\100\17\0\4\101\32\0\5\101\20\0\2\100\23\0"+ "\1\100\13\0\4\101\6\0\6\101\1\0\1\100\15\0\1\100\40\0"+ "\22\100\36\0\15\101\4\0\1\101\3\0\6\101\27\0\1\100\4\0"+ "\1\100\2\0\12\100\1\0\1\100\3\0\5\100\6\0\1\100\1\0"+ "\1\100\1\0\1\100\1\0\4\100\1\0\3\100\1\0\7\100\3\0"+ "\3\100\5\0\5\100\26\0\44\100\u0e81\0\3\100\31\0\11\100\6\101"+ "\1\0\5\100\2\0\5\100\4\0\126\100\2\0\2\101\2\0\3\100"+ "\1\0\137\100\5\0\50\100\4\0\136\100\21\0\30\100\70\0\20\100"+ "\u0200\0\u19b6\100\112\0\u51a6\100\132\0\u048d\100\u0773\0\u2ba4\100\134\0\u0800\100"+ "\u1900\0\u012e\100\2\0\73\100\225\0\7\100\14\0\5\100\5\0\1\100"+ "\1\101\12\100\1\0\15\100\1\0\5\100\1\0\1\100\1\0\2\100"+ "\1\0\2\100\1\0\154\100\41\0\u016b\100\22\0\100\100\2\0\66\100"+ "\50\0\15\100\3\0\20\101\20\0\4\101\17\0\2\100\30\0\3\100"+ "\31\0\1\100\6\0\5\100\1\0\207\100\2\0\1\101\4\0\1\100"+ "\13\0\12\101\7\0\32\100\4\0\1\100\1\0\32\100\12\0\132\100"+ "\3\0\6\100\2\0\6\100\2\0\6\100\2\0\3\100\3\0\2\100"+ "\3\0\2\100\22\0\3\101\4\0"; /** * Translates characters to character classes */ private static final char [] ZZ_CMAP = zzUnpackCMap(ZZ_CMAP_PACKED); /** * Translates DFA states to action switch labels. */ private static final int [] ZZ_ACTION = zzUnpackAction(); private static final String ZZ_ACTION_PACKED_0 = "\2\0\1\1\2\2\1\3\1\4\1\5\1\6\1\7"+ "\1\10\1\1\1\11\20\6\1\12\1\13\1\14\1\15"+ "\1\16\1\17\1\20\1\21\1\22\1\23\1\24\1\25"+ "\1\26\1\27\1\30\1\31\1\32\1\33\1\34\1\35"+ "\1\36\1\37\1\40\2\41\1\42\1\1\1\2\1\0"+ "\1\43\1\44\1\5\2\0\1\45\1\46\1\0\2\47"+ "\1\0\31\6\1\50\2\6\1\51\12\6\1\52\1\53"+ "\1\54\1\55\1\56\1\57\1\60\1\61\1\62\1\63"+ "\1\64\1\65\1\66\1\67\1\70\1\71\1\72\1\73"+ "\1\74\1\71\1\75\1\76\1\77\1\100\1\101\1\0"+ "\2\5\1\0\1\102\1\103\12\70\15\6\1\104\15\6"+ "\1\105\2\6\1\106\4\6\1\107\12\6\1\110\1\111"+ "\1\112\1\71\1\0\1\113\1\114\1\115\1\116\1\0"+ "\1\117\1\120\1\121\1\122\1\123\10\6\1\124\1\125"+ "\3\6\1\126\1\6\1\127\2\6\1\130\1\131\4\6"+ "\1\132\1\133\1\6\1\134\10\6\1\135\5\6\1\136"+ "\1\6\1\137\5\6\1\140\1\141\4\6\1\142\1\143"+ "\1\6\1\144\1\6\1\145\7\6\1\146\1\147\5\6"+ "\1\150\1\151\1\6\1\152\2\6\1\153\1\6\1\154"+ "\1\6\1\155\2\6\1\156\2\6\1\157\2\6\1\160"+ "\4\6\1\161\4\6\1\162\1\6\1\163\4\6\1\164"+ "\1\165\1\166\1\6\1\167\1\6\1\170\1\171\2\6"+ "\1\172\4\6\1\173\1\6\1\174\1\6\1\175\1\6"+ "\1\176\1\6\1\177\1\200\1\6\1\201"; private static int [] zzUnpackAction() { int [] result = new int[349]; int offset = 0; offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result); return result; } private static int zzUnpackAction(String packed, int offset, int [] result) { int i = 0; /* index in packed string */ int j = offset; /* index in unpacked array */ int l = packed.length(); while (i < l) { int count = packed.charAt(i++); int value = packed.charAt(i++); do result[j++] = value; while (--count > 0); } return j; } /** * Translates a state to a row index in the transition table */ private static final int [] ZZ_ROWMAP = zzUnpackRowMap(); private static final String ZZ_ROWMAP_PACKED_0 = "\0\0\0\103\0\206\0\206\0\311\0\u010c\0\u014f\0\u0192"+ "\0\u01d5\0\u0218\0\u025b\0\u029e\0\206\0\u02e1\0\u0324\0\u0367"+ "\0\u03aa\0\u03ed\0\u0430\0\u0473\0\u04b6\0\u04f9\0\u053c\0\u057f"+ "\0\u05c2\0\u0605\0\u0648\0\u068b\0\u06ce\0\206\0\206\0\206"+ "\0\206\0\206\0\206\0\206\0\206\0\u0711\0\u0754\0\u0797"+ "\0\u07da\0\206\0\206\0\206\0\u081d\0\u0860\0\u08a3\0\u08e6"+ "\0\u0929\0\206\0\206\0\u096c\0\206\0\u09af\0\206\0\u09f2"+ "\0\u0a35\0\u0a78\0\206\0\206\0\u0abb\0\u0afe\0\u0b41\0\206"+ "\0\206\0\u0b84\0\206\0\u0bc7\0\u0c0a\0\u0c4d\0\u0c90\0\u0cd3"+ "\0\u0d16\0\u0d59\0\u0d9c\0\u0ddf\0\u0e22\0\u0e65\0\u0ea8\0\u0eeb"+ "\0\u0f2e\0\u0f71\0\u0fb4\0\u0ff7\0\u103a\0\u107d\0\u10c0\0\u1103"+ "\0\u1146\0\u1189\0\u11cc\0\u120f\0\u1252\0\u1295\0\u01d5\0\u12d8"+ "\0\u131b\0\u135e\0\u13a1\0\u13e4\0\u1427\0\u146a\0\u14ad\0\u14f0"+ "\0\u1533\0\u1576\0\u15b9\0\u15fc\0\206\0\206\0\u163f\0\206"+ "\0\u1682\0\206\0\206\0\206\0\206\0\206\0\206\0\206"+ "\0\206\0\206\0\206\0\u16c5\0\206\0\206\0\206\0\u1708"+ "\0\206\0\206\0\206\0\206\0\206\0\u174b\0\u178e\0\u17d1"+ "\0\u17d1\0\206\0\206\0\u1814\0\u1857\0\u189a\0\u18dd\0\u1920"+ "\0\u1963\0\u19a6\0\u19e9\0\u1a2c\0\u1a6f\0\u1ab2\0\u1af5\0\u1b38"+ "\0\u1b7b\0\u1bbe\0\u1c01\0\u1c44\0\u1c87\0\u1cca\0\u1d0d\0\u1d50"+ "\0\u1d93\0\u1dd6\0\u01d5\0\u1e19\0\u1e5c\0\u1e9f\0\u1ee2\0\u1f25"+ "\0\u1f68\0\u1fab\0\u1fee\0\u2031\0\u2074\0\u20b7\0\u20fa\0\u213d"+ "\0\u01d5\0\u2180\0\u21c3\0\u2206\0\u2249\0\u228c\0\u22cf\0\u2312"+ "\0\u01d5\0\u2355\0\u2398\0\u23db\0\u241e\0\u2461\0\u24a4\0\u24e7"+ "\0\u252a\0\u256d\0\u25b0\0\206\0\u25f3\0\206\0\206\0\u1920"+ "\0\206\0\206\0\206\0\206\0\u2636\0\206\0\206\0\206"+ "\0\206\0\206\0\u2679\0\u26bc\0\u26ff\0\u2742\0\u2785\0\u27c8"+ "\0\u280b\0\u284e\0\u01d5\0\u01d5\0\u2891\0\u28d4\0\u2917\0\u01d5"+ "\0\u295a\0\u01d5\0\u299d\0\u29e0\0\u01d5\0\u01d5\0\u2a23\0\u2a66"+ "\0\u2aa9\0\u2aec\0\u01d5\0\u01d5\0\u2b2f\0\u01d5\0\u2b72\0\u2bb5"+ "\0\u2bf8\0\u2c3b\0\u2c7e\0\u2cc1\0\u2d04\0\u2d47\0\u01d5\0\u2d8a"+ "\0\u2dcd\0\u2e10\0\u2e53\0\u2e96\0\u01d5\0\u2ed9\0\206\0\u2f1c"+ "\0\u2f5f\0\u2fa2\0\u2fe5\0\u3028\0\u01d5\0\u01d5\0\u306b\0\u30ae"+ "\0\u30f1\0\u3134\0\u3177\0\u01d5\0\u31ba\0\u01d5\0\u31fd\0\u01d5"+ "\0\u3240\0\u3283\0\u32c6\0\u3309\0\u334c\0\u338f\0\u33d2\0\u01d5"+ "\0\u3415\0\u3458\0\u349b\0\u34de\0\u3521\0\u3564\0\u01d5\0\u01d5"+ "\0\u35a7\0\u01d5\0\u35ea\0\u362d\0\u01d5\0\u3670\0\u01d5\0\u36b3"+ "\0\u01d5\0\u36f6\0\u3739\0\u01d5\0\u377c\0\u37bf\0\u01d5\0\u3802"+ "\0\u3845\0\u01d5\0\u3888\0\u38cb\0\u390e\0\u3951\0\u01d5\0\u3994"+ "\0\u39d7\0\u3a1a\0\u3a5d\0\u01d5\0\u3aa0\0\u01d5\0\u3ae3\0\u3b26"+ "\0\u3b69\0\u3bac\0\u01d5\0\u01d5\0\u01d5\0\u3bef\0\u01d5\0\u3c32"+ "\0\u01d5\0\u01d5\0\u3c75\0\u3cb8\0\u01d5\0\u3cfb\0\u3d3e\0\u3d81"+ "\0\u3dc4\0\u01d5\0\u3e07\0\u01d5\0\u3e4a\0\u01d5\0\u3e8d\0\u01d5"+ "\0\u3ed0\0\u01d5\0\u01d5\0\u3f13\0\u01d5"; private static int [] zzUnpackRowMap() { int [] result = new int[349]; int offset = 0; offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result); return result; } private static int zzUnpackRowMap(String packed, int offset, int [] result) { int i = 0; /* index in packed string */ int j = offset; /* index in unpacked array */ int l = packed.length(); while (i < l) { int high = packed.charAt(i++) << 16; result[j++] = high | packed.charAt(i++); } return j; } /** * The transition table of the DFA */ private static final int [] ZZ_TRANS = zzUnpackTrans(); private static final String ZZ_TRANS_PACKED_0 = "\1\3\1\4\1\5\1\4\1\6\1\7\1\10\1\11"+ "\1\10\1\12\1\11\1\13\3\11\1\14\1\15\1\3"+ "\1\10\1\16\1\17\1\20\1\21\1\22\1\23\1\24"+ "\1\11\1\25\1\26\3\11\1\27\1\11\1\30\1\31"+ "\1\11\1\32\1\11\1\33\1\34\1\35\1\11\1\36"+ "\1\37\1\40\1\41\1\42\1\43\1\44\1\45\1\46"+ "\1\47\1\50\1\51\1\52\1\53\1\54\1\55\1\56"+ "\1\57\1\60\1\61\1\62\1\11\1\3\1\63\1\64"+ "\1\65\1\66\15\64\1\67\1\70\61\64\104\0\1\4"+ "\105\0\1\71\1\72\55\0\1\73\102\0\1\74\25\0"+ "\4\10\1\75\1\0\1\10\1\76\1\10\3\0\2\10"+ "\1\0\1\75\2\0\2\10\1\0\1\10\6\0\3\10"+ "\2\0\1\76\41\0\3\11\1\0\1\11\1\0\3\11"+ "\3\0\31\11\25\0\3\11\6\0\1\10\1\0\1\10"+ "\1\77\10\0\1\10\73\0\1\100\47\0\1\101\17\0"+ "\1\102\1\103\1\104\14\102\1\0\1\102\1\105\61\102"+ "\6\0\3\11\1\0\1\11\1\0\3\11\3\0\2\11"+ "\1\106\3\11\1\107\22\11\25\0\3\11\6\0\3\11"+ "\1\0\1\11\1\0\3\11\3\0\5\11\1\110\6\11"+ "\1\111\1\112\1\11\1\113\7\11\1\114\1\11\25\0"+ "\3\11\6\0\3\11\1\0\1\11\1\0\3\11\3\0"+ "\11\11\1\115\1\116\7\11\1\117\6\11\25\0\3\11"+ "\6\0\3\11\1\0\1\11\1\0\3\11\3\0\3\11"+ "\1\120\25\11\25\0\3\11\6\0\3\11\1\0\1\11"+ "\1\0\3\11\3\0\4\11\1\121\10\11\1\122\13\11"+ "\25\0\3\11\6\0\3\11\1\0\1\11\1\0\3\11"+ "\3\0\4\11\1\123\3\11\1\124\3\11\1\125\14\11"+ "\25\0\3\11\6\0\3\11\1\0\1\11\1\0\3\11"+ "\3\0\1\11\1\126\6\11\1\127\1\130\3\11\1\131"+ "\13\11\25\0\3\11\6\0\3\11\1\0\1\11\1\0"+ "\3\11\3\0\10\11\1\132\20\11\25\0\3\11\6\0"+ "\3\11\1\0\1\11\1\0\3\11\3\0\1\11\1\133"+ "\1\11\1\134\13\11\1\135\11\11\25\0\3\11\6\0"+ "\3\11\1\0\1\11\1\0\3\11\3\0\12\11\1\136"+ "\6\11\1\137\2\11\1\140\4\11\25\0\3\11\6\0"+ "\3\11\1\0\1\11\1\0\3\11\3\0\3\11\1\141"+ "\4\11\1\142\20\11\25\0\3\11\6\0\3\11\1\0"+ "\1\11\1\0\3\11\3\0\1\11\1\143\6\11\1\144"+ "\1\145\4\11\1\146\12\11\25\0\3\11\6\0\3\11"+ "\1\0\1\11\1\0\3\11\3\0\10\11\1\147\20\11"+ "\25\0\3\11\6\0\3\11\1\0\1\11\1\0\3\11"+ "\3\0\1\11\1\150\2\11\1\151\12\11\1\152\11\11"+ "\25\0\3\11\6\0\3\11\1\0\1\11\1\0\3\11"+ "\3\0\10\11\1\153\20\11\25\0\3\11\6\0\3\11"+ "\1\0\1\11\1\0\3\11\3\0\15\11\1\154\13\11"+ "\25\0\3\11\63\0\1\155\102\0\1\156\1\157\101\0"+ "\1\160\1\0\1\161\100\0\1\162\102\0\1\163\6\0"+ "\1\164\73\0\1\165\7\0\1\166\72\0\1\167\10\0"+ "\1\170\71\0\1\171\102\0\1\172\17\0\1\64\2\0"+ "\15\64\2\0\61\64\1\0\1\65\101\0\1\173\1\0"+ "\4\173\1\174\10\173\1\175\1\176\1\177\1\200\3\173"+ "\1\201\1\202\1\203\3\173\1\204\6\173\1\205\37\173"+ "\1\71\1\4\1\5\100\71\5\72\1\206\75\72\6\0"+ "\4\10\1\75\1\207\1\10\1\76\1\10\3\0\2\10"+ "\1\0\1\75\2\0\2\10\1\0\1\10\6\0\3\10"+ "\2\0\1\76\24\0\1\207\14\0\1\210\1\0\1\210"+ "\1\0\1\210\1\211\2\0\1\210\3\0\2\210\1\0"+ "\1\210\2\0\2\210\10\0\2\210\30\0\1\211\17\0"+ "\1\212\110\0\1\213\64\0\1\103\101\0\1\173\1\0"+ "\4\173\1\214\10\173\1\215\1\216\1\217\1\220\3\173"+ "\1\221\1\222\1\223\3\173\1\224\6\173\1\225\37\173"+ "\6\0\3\11\1\0\1\11\1\0\3\11\3\0\2\11"+ "\1\226\26\11\25\0\3\11\6\0\3\11\1\0\1\11"+ "\1\0\3\11\3\0\2\11\1\227\26\11\25\0\3\11"+ "\6\0\3\11\1\0\1\11\1\0\3\11\3\0\1\11"+ "\1\230\2\11\1\231\24\11\25\0\3\11\6\0\3\11"+ "\1\0\1\11\1\0\3\11\3\0\12\11\1\232\16\11"+ "\25\0\3\11\6\0\3\11\1\0\1\11\1\0\3\11"+ "\3\0\10\11\1\233\20\11\25\0\3\11\6\0\3\11"+ "\1\0\1\11\1\0\3\11\3\0\25\11\1\234\3\11"+ "\25\0\3\11\6\0\3\11\1\0\1\11\1\0\3\11"+ "\3\0\16\11\1\235\12\11\25\0\3\11\6\0\3\11"+ "\1\0\1\11\1\0\3\11\3\0\2\11\1\236\26\11"+ "\25\0\3\11\6\0\3\11\1\0\1\11\1\0\3\11"+ "\3\0\17\11\1\237\11\11\25\0\3\11\6\0\3\11"+ "\1\0\1\11\1\0\3\11\3\0\5\11\1\240\23\11"+ "\25\0\3\11\6\0\3\11\1\0\1\11\1\0\3\11"+ "\3\0\5\11\1\241\23\11\25\0\3\11\6\0\3\11"+ "\1\0\1\11\1\0\3\11\3\0\1\11\1\242\12\11"+ "\1\243\2\11\1\244\11\11\25\0\3\11\6\0\3\11"+ "\1\0\1\11\1\0\3\11\3\0\4\11\1\245\11\11"+ "\1\246\12\11\25\0\3\11\6\0\3\11\1\0\1\11"+ "\1\0\3\11\3\0\3\11\1\247\25\11\25\0\3\11"+ "\6\0\3\11\1\0\1\11\1\0\3\11\3\0\10\11"+ "\1\250\20\11\25\0\3\11\6\0\3\11\1\0\1\11"+ "\1\0\3\11\3\0\5\11\1\251\23\11\25\0\3\11"+ "\6\0\3\11\1\0\1\11\1\0\3\11\3\0\2\11"+ "\1\252\2\11\1\253\23\11\25\0\3\11\6\0\3\11"+ "\1\0\1\11\1\0\3\11\3\0\12\11\1\254\16\11"+ "\25\0\3\11\6\0\3\11\1\0\1\11\1\0\3\11"+ "\3\0\1\11\1\255\27\11\25\0\3\11\6\0\3\11"+ "\1\0\1\11\1\0\3\11\3\0\1\11\1\256\27\11"+ "\25\0\3\11\6\0\3\11\1\0\1\11\1\0\3\11"+ "\3\0\12\11\1\257\16\11\25\0\3\11\6\0\3\11"+ "\1\0\1\11\1\0\3\11\3\0\5\11\1\260\23\11"+ "\25\0\3\11\6\0\3\11\1\0\1\11\1\0\3\11"+ "\3\0\27\11\1\261\1\11\25\0\3\11\6\0\3\11"+ "\1\0\1\11\1\0\3\11\3\0\11\11\1\262\17\11"+ "\25\0\3\11\6\0\3\11\1\0\1\11\1\0\3\11"+ "\3\0\2\11\1\263\2\11\1\264\23\11\25\0\3\11"+ "\6\0\3\11\1\0\1\11\1\0\3\11\3\0\25\11"+ "\1\265\3\11\25\0\3\11\6\0\3\11\1\0\1\11"+ "\1\0\3\11\3\0\21\11\1\266\7\11\25\0\3\11"+ "\6\0\3\11\1\0\1\11\1\0\3\11\3\0\17\11"+ "\1\267\11\11\25\0\3\11\6\0\3\11\1\0\1\11"+ "\1\0\3\11\3\0\11\11\1\270\17\11\25\0\3\11"+ "\6\0\3\11\1\0\1\11\1\0\3\11\3\0\4\11"+ "\1\271\24\11\25\0\3\11\6\0\3\11\1\0\1\11"+ "\1\0\3\11\3\0\10\11\1\272\20\11\25\0\3\11"+ "\6\0\3\11\1\0\1\11\1\0\3\11\3\0\12\11"+ "\1\273\16\11\25\0\3\11\6\0\3\11\1\0\1\11"+ "\1\0\3\11\3\0\5\11\1\274\23\11\25\0\3\11"+ "\6\0\3\11\1\0\1\11\1\0\3\11\3\0\7\11"+ "\1\275\21\11\25\0\3\11\6\0\3\11\1\0\1\11"+ "\1\0\3\11\3\0\10\11\1\276\5\11\1\277\12\11"+ "\25\0\3\11\6\0\3\11\1\0\1\11\1\0\3\11"+ "\3\0\6\11\1\300\22\11\25\0\3\11\6\0\3\11"+ "\1\0\1\11\1\0\3\11\3\0\11\11\1\301\4\11"+ "\1\302\12\11\25\0\3\11\6\0\3\11\1\0\1\11"+ "\1\0\3\11\3\0\16\11\1\303\12\11\25\0\3\11"+ "\63\0\1\304\1\305\101\0\1\306\25\0\1\200\13\0"+ "\1\200\66\0\1\307\13\0\1\307\60\0\4\72\1\4"+ "\1\206\75\72\6\0\1\207\1\0\3\207\1\0\1\207"+ "\1\0\1\207\3\0\2\207\1\0\1\207\2\0\2\207"+ "\10\0\3\207\44\0\1\210\1\0\1\210\1\0\1\210"+ "\3\0\1\210\3\0\2\210\1\0\1\210\2\0\2\210"+ "\10\0\2\210\45\0\1\310\10\0\1\311\2\0\1\310"+ "\77\0\1\312\102\0\1\313\102\0\1\314\71\0\1\315"+ "\10\0\1\311\2\0\1\315\77\0\1\316\102\0\1\317"+ "\102\0\1\320\102\0\1\321\102\0\1\322\71\0\3\11"+ "\1\0\1\11\1\0\3\11\3\0\3\11\1\323\25\11"+ "\25\0\3\11\6\0\3\11\1\0\1\11\1\0\3\11"+ "\3\0\5\11\1\324\23\11\25\0\3\11\6\0\3\11"+ "\1\0\1\11\1\0\3\11\3\0\5\11\1\325\23\11"+ "\25\0\3\11\6\0\3\11\1\0\1\11\1\0\3\11"+ "\3\0\16\11\1\326\12\11\25\0\3\11\6\0\3\11"+ "\1\0\1\11\1\0\3\11\3\0\7\11\1\327\21\11"+ "\25\0\3\11\6\0\3\11\1\0\1\11\1\0\3\11"+ "\3\0\4\11\1\330\24\11\25\0\3\11\6\0\3\11"+ "\1\0\1\11\1\0\3\11\3\0\3\11\1\331\25\11"+ "\25\0\3\11\6\0\3\11\1\0\1\11\1\0\3\11"+ "\3\0\5\11\1\332\23\11\25\0\3\11\6\0\3\11"+ "\1\0\1\11\1\0\3\11\3\0\3\11\1\333\25\11"+ "\25\0\3\11\6\0\3\11\1\0\1\11\1\0\3\11"+ "\3\0\24\11\1\334\4\11\25\0\3\11\6\0\3\11"+ "\1\0\1\11\1\0\3\11\3\0\3\11\1\335\25\11"+ "\25\0\3\11\6\0\3\11\1\0\1\11\1\0\3\11"+ "\3\0\17\11\1\336\11\11\25\0\3\11\6\0\3\11"+ "\1\0\1\11\1\0\3\11\3\0\12\11\1\337\16\11"+ "\25\0\3\11\6\0\3\11\1\0\1\11\1\0\3\11"+ "\3\0\3\11\1\340\25\11\25\0\3\11\6\0\3\11"+ "\1\0\1\11\1\0\3\11\3\0\10\11\1\341\20\11"+ "\25\0\3\11\6\0\3\11\1\0\1\11\1\0\3\11"+ "\3\0\2\11\1\342\26\11\25\0\3\11\6\0\3\11"+ "\1\0\1\11\1\0\3\11\3\0\1\11\1\343\27\11"+ "\25\0\3\11\6\0\3\11\1\0\1\11\1\0\3\11"+ "\3\0\11\11\1\344\17\11\25\0\3\11\6\0\3\11"+ "\1\0\1\11\1\0\3\11\3\0\3\11\1\345\25\11"+ "\25\0\3\11\6\0\3\11\1\0\1\11\1\0\3\11"+ "\3\0\3\11\1\346\25\11\25\0\3\11\6\0\3\11"+ "\1\0\1\11\1\0\3\11\3\0\7\11\1\347\21\11"+ "\25\0\3\11\6\0\3\11\1\0\1\11\1\0\3\11"+ "\3\0\2\11\1\350\2\11\1\351\23\11\25\0\3\11"+ "\6\0\3\11\1\0\1\11\1\0\3\11\3\0\2\11"+ "\1\352\26\11\25\0\3\11\6\0\3\11\1\0\1\11"+ "\1\0\3\11\3\0\4\11\1\353\24\11\25\0\3\11"+ "\6\0\3\11\1\0\1\11\1\0\3\11\3\0\23\11"+ "\1\354\5\11\25\0\3\11\6\0\3\11\1\0\1\11"+ "\1\0\3\11\3\0\16\11\1\355\12\11\25\0\3\11"+ "\6\0\3\11\1\0\1\11\1\0\3\11\3\0\11\11"+ "\1\356\17\11\25\0\3\11\6\0\3\11\1\0\1\11"+ "\1\0\3\11\3\0\5\11\1\357\23\11\25\0\3\11"+ "\6\0\3\11\1\0\1\11\1\0\3\11\3\0\3\11"+ "\1\360\25\11\25\0\3\11\6\0\3\11\1\0\1\11"+ "\1\0\3\11\3\0\10\11\1\361\1\362\17\11\25\0"+ "\3\11\6\0\3\11\1\0\1\11\1\0\3\11\3\0"+ "\1\11\1\363\27\11\25\0\3\11\6\0\3\11\1\0"+ "\1\11\1\0\3\11\3\0\6\11\1\364\22\11\25\0"+ "\3\11\6\0\3\11\1\0\1\11\1\0\3\11\3\0"+ "\2\11\1\244\26\11\25\0\3\11\6\0\3\11\1\0"+ "\1\11\1\0\3\11\3\0\1\11\1\365\27\11\25\0"+ "\3\11\6\0\3\11\1\0\1\11\1\0\3\11\3\0"+ "\1\11\1\366\27\11\25\0\3\11\6\0\3\11\1\0"+ "\1\11\1\0\3\11\3\0\10\11\1\367\20\11\25\0"+ "\3\11\6\0\3\11\1\0\1\11\1\0\3\11\3\0"+ "\13\11\1\370\15\11\25\0\3\11\6\0\3\11\1\0"+ "\1\11\1\0\3\11\3\0\5\11\1\371\23\11\25\0"+ "\3\11\6\0\3\11\1\0\1\11\1\0\3\11\3\0"+ "\26\11\1\372\2\11\25\0\3\11\6\0\3\11\1\0"+ "\1\11\1\0\3\11\3\0\11\11\1\373\17\11\25\0"+ "\3\11\6\0\3\11\1\0\1\11\1\0\3\11\3\0"+ "\1\11\1\374\27\11\25\0\3\11\6\0\3\11\1\0"+ "\1\11\1\0\3\11\3\0\20\11\1\375\10\11\25\0"+ "\3\11\6\0\3\11\1\0\1\11\1\0\3\11\3\0"+ "\11\11\1\376\17\11\25\0\3\11\63\0\1\377\36\0"+ "\1\311\71\0\3\11\1\0\1\11\1\0\3\11\3\0"+ "\4\11\1\u0100\24\11\25\0\3\11\6\0\3\11\1\0"+ "\1\11\1\0\3\11\3\0\4\11\1\u0101\24\11\25\0"+ "\3\11\6\0\3\11\1\0\1\11\1\0\3\11\3\0"+ "\16\11\1\u0102\12\11\25\0\3\11\6\0\3\11\1\0"+ "\1\11\1\0\3\11\3\0\7\11\1\u0103\21\11\25\0"+ "\3\11\6\0\3\11\1\0\1\11\1\0\3\11\3\0"+ "\15\11\1\u0104\13\11\25\0\3\11\6\0\3\11\1\0"+ "\1\11\1\0\3\11\3\0\5\11\1\u0105\23\11\25\0"+ "\3\11\6\0\3\11\1\0\1\11\1\0\3\11\3\0"+ "\4\11\1\u0106\24\11\25\0\3\11\6\0\3\11\1\0"+ "\1\11\1\0\3\11\3\0\7\11\1\u0107\21\11\25\0"+ "\3\11\6\0\3\11\1\0\1\11\1\0\3\11\3\0"+ "\12\11\1\u0108\16\11\25\0\3\11\6\0\3\11\1\0"+ "\1\11\1\0\3\11\3\0\4\11\1\u0109\24\11\25\0"+ "\3\11\6\0\3\11\1\0\1\11\1\0\3\11\3\0"+ "\2\11\1\u010a\26\11\25\0\3\11\6\0\3\11\1\0"+ "\1\11\1\0\3\11\3\0\27\11\1\u010b\1\11\25\0"+ "\3\11\6\0\3\11\1\0\1\11\1\0\3\11\3\0"+ "\13\11\1\u010c\15\11\25\0\3\11\6\0\3\11\1\0"+ "\1\11\1\0\3\11\3\0\3\11\1\u010d\25\11\25\0"+ "\3\11\6\0\3\11\1\0\1\11\1\0\3\11\3\0"+ "\15\11\1\u010e\13\11\25\0\3\11\6\0\3\11\1\0"+ "\1\11\1\0\3\11\3\0\5\11\1\367\23\11\25\0"+ "\3\11\6\0\3\11\1\0\1\11\1\0\3\11\3\0"+ "\16\11\1\u010f\12\11\25\0\3\11\6\0\3\11\1\0"+ "\1\11\1\0\3\11\3\0\2\11\1\u0110\26\11\25\0"+ "\3\11\6\0\3\11\1\0\1\11\1\0\3\11\3\0"+ "\26\11\1\u0111\2\11\25\0\3\11\6\0\3\11\1\0"+ "\1\11\1\0\3\11\3\0\1\11\1\u0112\27\11\25\0"+ "\3\11\6\0\3\11\1\0\1\11\1\0\3\11\3\0"+ "\4\11\1\u0113\24\11\25\0\3\11\6\0\3\11\1\0"+ "\1\11\1\0\3\11\3\0\4\11\1\u0114\24\11\25\0"+ "\3\11\6\0\3\11\1\0\1\11\1\0\3\11\3\0"+ "\3\11\1\u0115\25\11\25\0\3\11\6\0\3\11\1\0"+ "\1\11\1\0\3\11\3\0\17\11\1\u0116\11\11\25\0"+ "\3\11\6\0\3\11\1\0\1\11\1\0\3\11\3\0"+ "\11\11\1\u0117\17\11\25\0\3\11\6\0\3\11\1\0"+ "\1\11\1\0\3\11\3\0\5\11\1\u0118\23\11\25\0"+ "\3\11\6\0\3\11\1\0\1\11\1\0\3\11\3\0"+ "\11\11\1\u0119\17\11\25\0\3\11\6\0\3\11\1\0"+ "\1\11\1\0\3\11\3\0\1\11\1\u011a\27\11\25\0"+ "\3\11\6\0\3\11\1\0\1\11\1\0\3\11\3\0"+ "\3\11\1\u011b\25\11\25\0\3\11\6\0\3\11\1\0"+ "\1\11\1\0\3\11\3\0\1\11\1\u011c\27\11\25\0"+ "\3\11\6\0\3\11\1\0\1\11\1\0\3\11\3\0"+ "\16\11\1\u011d\12\11\25\0\3\11\6\0\3\11\1\0"+ "\1\11\1\0\3\11\3\0\5\11\1\u011e\23\11\25\0"+ "\3\11\6\0\3\11\1\0\1\11\1\0\3\11\3\0"+ "\3\11\1\u011f\25\11\25\0\3\11\6\0\3\11\1\0"+ "\1\11\1\0\3\11\3\0\5\11\1\u0120\23\11\25\0"+ "\3\11\6\0\3\11\1\0\1\11\1\0\3\11\3\0"+ "\1\11\1\u0121\27\11\25\0\3\11\6\0\3\11\1\0"+ "\1\11\1\0\3\11\3\0\7\11\1\u0122\21\11\25\0"+ "\3\11\6\0\3\11\1\0\1\11\1\0\3\11\3\0"+ "\5\11\1\u0123\23\11\25\0\3\11\6\0\3\11\1\0"+ "\1\11\1\0\3\11\3\0\4\11\1\u0124\24\11\25\0"+ "\3\11\6\0\3\11\1\0\1\11\1\0\3\11\3\0"+ "\15\11\1\u0125\13\11\25\0\3\11\6\0\3\11\1\0"+ "\1\11\1\0\3\11\3\0\20\11\1\u0126\10\11\25\0"+ "\3\11\6\0\3\11\1\0\1\11\1\0\3\11\3\0"+ "\12\11\1\u0127\16\11\25\0\3\11\6\0\3\11\1\0"+ "\1\11\1\0\3\11\3\0\16\11\1\u0128\12\11\25\0"+ "\3\11\6\0\3\11\1\0\1\11\1\0\3\11\3\0"+ "\2\11\1\u0129\26\11\25\0\3\11\6\0\3\11\1\0"+ "\1\11\1\0\3\11\3\0\1\11\1\u012a\27\11\25\0"+ "\3\11\6\0\3\11\1\0\1\11\1\0\3\11\3\0"+ "\12\11\1\u012b\16\11\25\0\3\11\6\0\3\11\1\0"+ "\1\11\1\0\3\11\3\0\3\11\1\u012c\25\11\25\0"+ "\3\11\6\0\3\11\1\0\1\11\1\0\3\11\3\0"+ "\12\11\1\u012d\16\11\25\0\3\11\6\0\3\11\1\0"+ "\1\11\1\0\3\11\3\0\21\11\1\u012e\7\11\25\0"+ "\3\11\6\0\3\11\1\0\1\11\1\0\3\11\3\0"+ "\5\11\1\u012f\23\11\25\0\3\11\6\0\3\11\1\0"+ "\1\11\1\0\3\11\3\0\24\11\1\u0130\4\11\25\0"+ "\3\11\6\0\3\11\1\0\1\11\1\0\3\11\3\0"+ "\11\11\1\u0131\17\11\25\0\3\11\6\0\3\11\1\0"+ "\1\11\1\0\3\11\3\0\3\11\1\u0132\25\11\25\0"+ "\3\11\6\0\3\11\1\0\1\11\1\0\3\11\3\0"+ "\11\11\1\u0133\17\11\25\0\3\11\6\0\3\11\1\0"+ "\1\11\1\0\3\11\3\0\23\11\1\u0134\5\11\25\0"+ "\3\11\6\0\3\11\1\0\1\11\1\0\3\11\3\0"+ "\7\11\1\u0135\21\11\25\0\3\11\6\0\3\11\1\0"+ "\1\11\1\0\3\11\3\0\5\11\1\u0136\23\11\25\0"+ "\3\11\6\0\3\11\1\0\1\11\1\0\3\11\3\0"+ "\7\11\1\u0137\21\11\25\0\3\11\6\0\3\11\1\0"+ "\1\11\1\0\3\11\3\0\16\11\1\u0138\12\11\25\0"+ "\3\11\6\0\3\11\1\0\1\11\1\0\3\11\3\0"+ "\7\11\1\u0139\21\11\25\0\3\11\6\0\3\11\1\0"+ "\1\11\1\0\3\11\3\0\21\11\1\u013a\7\11\25\0"+ "\3\11\6\0\3\11\1\0\1\11\1\0\3\11\3\0"+ "\10\11\1\u013b\20\11\25\0\3\11\6\0\3\11\1\0"+ "\1\11\1\0\3\11\3\0\2\11\1\u013c\26\11\25\0"+ "\3\11\6\0\3\11\1\0\1\11\1\0\3\11\3\0"+ "\3\11\1\u013d\25\11\25\0\3\11\6\0\3\11\1\0"+ "\1\11\1\0\3\11\3\0\12\11\1\u013e\16\11\25\0"+ "\3\11\6\0\3\11\1\0\1\11\1\0\3\11\3\0"+ "\17\11\1\u013f\11\11\25\0\3\11\6\0\3\11\1\0"+ "\1\11\1\0\3\11\3\0\7\11\1\u0140\21\11\25\0"+ "\3\11\6\0\3\11\1\0\1\11\1\0\3\11\3\0"+ "\1\11\1\u0141\27\11\25\0\3\11\6\0\3\11\1\0"+ "\1\11\1\0\3\11\3\0\3\11\1\u0142\25\11\25\0"+ "\3\11\6\0\3\11\1\0\1\11\1\0\3\11\3\0"+ "\5\11\1\u0143\23\11\25\0\3\11\6\0\3\11\1\0"+ "\1\11\1\0\3\11\3\0\14\11\1\u0144\14\11\25\0"+ "\3\11\6\0\3\11\1\0\1\11\1\0\3\11\3\0"+ "\3\11\1\u0145\25\11\25\0\3\11\6\0\3\11\1\0"+ "\1\11\1\0\3\11\3\0\5\11\1\u0146\23\11\25\0"+ "\3\11\6\0\3\11\1\0\1\11\1\0\3\11\3\0"+ "\3\11\1\u0147\25\11\25\0\3\11\6\0\3\11\1\0"+ "\1\11\1\0\3\11\3\0\11\11\1\u0148\17\11\25\0"+ "\3\11\6\0\3\11\1\0\1\11\1\0\3\11\3\0"+ "\5\11\1\u0149\23\11\25\0\3\11\6\0\3\11\1\0"+ "\1\11\1\0\3\11\3\0\25\11\1\u014a\3\11\25\0"+ "\3\11\6\0\3\11\1\0\1\11\1\0\3\11\3\0"+ "\12\11\1\u014b\16\11\25\0\3\11\6\0\3\11\1\0"+ "\1\11\1\0\3\11\3\0\12\11\1\u014c\16\11\25\0"+ "\3\11\6\0\3\11\1\0\1\11\1\0\3\11\3\0"+ "\3\11\1\u014d\25\11\25\0\3\11\6\0\3\11\1\0"+ "\1\11\1\0\3\11\3\0\3\11\1\u014e\25\11\25\0"+ "\3\11\6\0\3\11\1\0\1\11\1\0\3\11\3\0"+ "\7\11\1\u014f\21\11\25\0\3\11\6\0\3\11\1\0"+ "\1\11\1\0\3\11\3\0\12\11\1\u0150\16\11\25\0"+ "\3\11\6\0\3\11\1\0\1\11\1\0\3\11\3\0"+ "\3\11\1\u0151\25\11\25\0\3\11\6\0\3\11\1\0"+ "\1\11\1\0\3\11\3\0\3\11\1\u0152\25\11\25\0"+ "\3\11\6\0\3\11\1\0\1\11\1\0\3\11\3\0"+ "\16\11\1\u0153\12\11\25\0\3\11\6\0\3\11\1\0"+ "\1\11\1\0\3\11\3\0\5\11\1\u0154\23\11\25\0"+ "\3\11\6\0\3\11\1\0\1\11\1\0\3\11\3\0"+ "\10\11\1\u0155\20\11\25\0\3\11\6\0\3\11\1\0"+ "\1\11\1\0\3\11\3\0\3\11\1\u0156\25\11\25\0"+ "\3\11\6\0\3\11\1\0\1\11\1\0\3\11\3\0"+ "\5\11\1\u0157\23\11\25\0\3\11\6\0\3\11\1\0"+ "\1\11\1\0\3\11\3\0\20\11\1\u0158\10\11\25\0"+ "\3\11\6\0\3\11\1\0\1\11\1\0\3\11\3\0"+ "\30\11\1\u0159\25\0\3\11\6\0\3\11\1\0\1\11"+ "\1\0\3\11\3\0\21\11\1\u015a\7\11\25\0\3\11"+ "\6\0\3\11\1\0\1\11\1\0\3\11\3\0\2\11"+ "\1\u015b\26\11\25\0\3\11\6\0\3\11\1\0\1\11"+ "\1\0\3\11\3\0\3\11\1\u015c\25\11\25\0\3\11"+ "\6\0\3\11\1\0\1\11\1\0\3\11\3\0\20\11"+ "\1\u015d\10\11\25\0\3\11"; private static int [] zzUnpackTrans() { int [] result = new int[16214]; int offset = 0; offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result); return result; } private static int zzUnpackTrans(String packed, int offset, int [] result) { int i = 0; /* index in packed string */ int j = offset; /* index in unpacked array */ int l = packed.length(); while (i < l) { int count = packed.charAt(i++); int value = packed.charAt(i++); value--; do result[j++] = value; while (--count > 0); } return j; } /* error codes */ private static final int ZZ_UNKNOWN_ERROR = 0; private static final int ZZ_NO_MATCH = 1; private static final int ZZ_PUSHBACK_2BIG = 2; /* error messages for the codes above */ private static final String ZZ_ERROR_MSG[] = { "Unkown internal scanner error", "Error: could not match input", "Error: pushback value was too large" }; /** * ZZ_ATTRIBUTE[aState] contains the attributes of state <code>aState</code> */ private static final int [] ZZ_ATTRIBUTE = zzUnpackAttribute(); private static final String ZZ_ATTRIBUTE_PACKED_0 = "\2\0\2\11\10\1\1\11\20\1\10\11\4\1\3\11"+ "\5\1\2\11\1\1\1\11\1\1\1\11\2\1\1\0"+ "\2\11\1\1\2\0\2\11\1\0\1\11\1\1\1\0"+ "\47\1\2\11\1\1\1\11\1\1\12\11\1\1\3\11"+ "\1\1\5\11\1\0\2\1\1\0\2\11\70\1\1\11"+ "\1\1\2\11\1\0\4\11\1\0\5\11\54\1\1\11"+ "\136\1"; private static int [] zzUnpackAttribute() { int [] result = new int[349]; int offset = 0; offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result); return result; } private static int zzUnpackAttribute(String packed, int offset, int [] result) { int i = 0; /* index in packed string */ int j = offset; /* index in unpacked array */ int l = packed.length(); while (i < l) { int count = packed.charAt(i++); int value = packed.charAt(i++); do result[j++] = value; while (--count > 0); } return j; } /** the input device */ private java.io.Reader zzReader; /** the current state of the DFA */ private int zzState; /** the current lexical state */ private int zzLexicalState = YYINITIAL; /** this buffer contains the current text to be matched and is the source of the yytext() string */ private char zzBuffer[] = new char[ZZ_BUFFERSIZE]; /** the text position at the last accepting state */ private int zzMarkedPos; /** the text position at the last state to be included in yytext */ private int zzPushbackPos; /** the current text position in the buffer */ private int zzCurrentPos; /** startRead marks the beginning of the yytext() string in the buffer */ private int zzStartRead; /** endRead marks the last character in the buffer, that has been read from input */ private int zzEndRead; /** number of newlines encountered up to the start of the matched text */ private int yyline; /** the number of characters up to the start of the matched text */ private int yychar; /** * the number of characters from the last newline up to the start of the * matched text */ private int yycolumn; /** * zzAtBOL == true <=> the scanner is currently at the beginning of a line */ private boolean zzAtBOL = true; /** zzAtEOF == true <=> the scanner is at the EOF */ private boolean zzAtEOF; /* user code: */ StringBuffer strbuf = new StringBuffer(128); int sub_line; int sub_column; int strlit_start_line, strlit_start_column; private Symbol sym(short id) { return new Symbol(id, yyline + 1, yycolumn + 1, len(), str()); } private Symbol sym(short id, String value) { return new Symbol(id, yyline + 1, yycolumn + 1, len(), value); } private Symbol sym(short id, String value, int start_line, int start_column, int len) { return new Symbol(id, start_line, start_column, len, value); } private String str() { return yytext(); } private int len() { return yylength(); } private void error(String msg) throws Scanner.Exception { throw new Scanner.Exception(yyline + 1, yycolumn + 1, msg); } /** * Creates a new scanner * There is also a java.io.InputStream version of this constructor. * * @param in the java.io.Reader to read input from. */ public JavaScanner(java.io.Reader in) { this.zzReader = in; } /** * Creates a new scanner. * There is also java.io.Reader version of this constructor. * * @param in the java.io.Inputstream to read input from. */ public JavaScanner(java.io.InputStream in) { this(new java.io.InputStreamReader(in)); } /** * Unpacks the compressed character translation table. * * @param packed the packed character translation table * @return the unpacked character translation table */ private static char [] zzUnpackCMap(String packed) { char [] map = new char[0x10000]; int i = 0; /* index in packed string */ int j = 0; /* index in unpacked array */ while (i < 1790) { int count = packed.charAt(i++); char value = packed.charAt(i++); do map[j++] = value; while (--count > 0); } return map; } /** * Refills the input buffer. * * @return <code>false</code>, iff there was new input. * * @exception java.io.IOException if any I/O-Error occurs */ private boolean zzRefill() throws java.io.IOException { /* first: make room (if you can) */ if (zzStartRead > 0) { System.arraycopy(zzBuffer, zzStartRead, zzBuffer, 0, zzEndRead-zzStartRead); /* translate stored positions */ zzEndRead-= zzStartRead; zzCurrentPos-= zzStartRead; zzMarkedPos-= zzStartRead; zzPushbackPos-= zzStartRead; zzStartRead = 0; } /* is the buffer big enough? */ if (zzCurrentPos >= zzBuffer.length) { /* if not: blow it up */ char newBuffer[] = new char[zzCurrentPos*2]; System.arraycopy(zzBuffer, 0, newBuffer, 0, zzBuffer.length); zzBuffer = newBuffer; } /* finally: fill the buffer with new input */ int numRead = zzReader.read(zzBuffer, zzEndRead, zzBuffer.length-zzEndRead); if (numRead < 0) { return true; } else { zzEndRead+= numRead; return false; } } /** * Closes the input stream. */ public final void yyclose() throws java.io.IOException { zzAtEOF = true; /* indicate end of file */ zzEndRead = zzStartRead; /* invalidate buffer */ if (zzReader != null) zzReader.close(); } /** * Resets the scanner to read from a new input stream. * Does not close the old reader. * * All internal variables are reset, the old input stream * <b>cannot</b> be reused (internal buffer is discarded and lost). * Lexical state is set to <tt>ZZ_INITIAL</tt>. * * @param reader the new input stream */ public final void yyreset(java.io.Reader reader) { zzReader = reader; zzAtBOL = true; zzAtEOF = false; zzEndRead = zzStartRead = 0; zzCurrentPos = zzMarkedPos = zzPushbackPos = 0; yyline = yychar = yycolumn = 0; zzLexicalState = YYINITIAL; } /** * Returns the current lexical state. */ public final int yystate() { return zzLexicalState; } /** * Enters a new lexical state * * @param newState the new lexical state */ public final void yybegin(int newState) { zzLexicalState = newState; } /** * Returns the text matched by the current regular expression. */ public final String yytext() { return new String( zzBuffer, zzStartRead, zzMarkedPos-zzStartRead ); } /** * Returns the character at position <tt>pos</tt> from the * matched text. * * It is equivalent to yytext().charAt(pos), but faster * * @param pos the position of the character to fetch. * A value from 0 to yylength()-1. * * @return the character at position pos */ public final char yycharat(int pos) { return zzBuffer[zzStartRead+pos]; } /** * Returns the length of the matched text region. */ public final int yylength() { return zzMarkedPos-zzStartRead; } /** * Reports an error that occurred while scanning. * * In a well-formed scanner (no or only correct usage of * yypushback(int) and a match-all fallback rule) this method * will only be called with things that "Can't Possibly Happen". * If this method is called, something is seriously wrong * (e.g. a JFlex bug producing a faulty scanner etc.). * * Usual syntax/scanner level error handling should be done * in error fallback rules. * * @param errorCode the code of the errormessage to display */ private void zzScanError(int errorCode) { String message; try { message = ZZ_ERROR_MSG[errorCode]; } catch (ArrayIndexOutOfBoundsException e) { message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR]; } throw new Error(message); } /** * Pushes the specified amount of characters back into the input stream. * * They will be read again by then next call of the scanning method * * @param number the number of characters to be read again. * This number must not be greater than yylength()! */ public void yypushback(int number) { if ( number > yylength() ) zzScanError(ZZ_PUSHBACK_2BIG); zzMarkedPos -= number; } /** * Resumes scanning until the next regular expression is matched, * the end of input is encountered or an I/O-Error occurs. * * @return the next token * @exception java.io.IOException if any I/O-Error occurs */ public Symbol nextToken() throws java.io.IOException, Scanner.Exception { int zzInput; int zzAction; // cached fields: int zzCurrentPosL; int zzMarkedPosL; int zzEndReadL = zzEndRead; char [] zzBufferL = zzBuffer; char [] zzCMapL = ZZ_CMAP; int [] zzTransL = ZZ_TRANS; int [] zzRowMapL = ZZ_ROWMAP; int [] zzAttrL = ZZ_ATTRIBUTE; while (true) { zzMarkedPosL = zzMarkedPos; boolean zzR = false; for (zzCurrentPosL = zzStartRead; zzCurrentPosL < zzMarkedPosL; zzCurrentPosL++) { switch (zzBufferL[zzCurrentPosL]) { case '\u000B': case '\u000C': case '\u0085': case '\u2028': case '\u2029': yyline++; yycolumn = 0; zzR = false; break; case '\r': yyline++; yycolumn = 0; zzR = true; break; case '\n': if (zzR) zzR = false; else { yyline++; yycolumn = 0; } break; default: zzR = false; yycolumn++; } } if (zzR) { // peek one character ahead if it is \n (if we have counted one line too much) boolean zzPeek; if (zzMarkedPosL < zzEndReadL) zzPeek = zzBufferL[zzMarkedPosL] == '\n'; else if (zzAtEOF) zzPeek = false; else { boolean eof = zzRefill(); zzMarkedPosL = zzMarkedPos; zzBufferL = zzBuffer; if (eof) zzPeek = false; else zzPeek = zzBufferL[zzMarkedPosL] == '\n'; } if (zzPeek) yyline--; } zzAction = -1; zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL; zzState = zzLexicalState; zzForAction: { while (true) { if (zzCurrentPosL < zzEndReadL) zzInput = zzBufferL[zzCurrentPosL++]; else if (zzAtEOF) { zzInput = YYEOF; break zzForAction; } else { // store back cached positions zzCurrentPos = zzCurrentPosL; zzMarkedPos = zzMarkedPosL; boolean eof = zzRefill(); // get translated positions and possibly new buffer zzCurrentPosL = zzCurrentPos; zzMarkedPosL = zzMarkedPos; zzBufferL = zzBuffer; zzEndReadL = zzEndRead; if (eof) { zzInput = YYEOF; break zzForAction; } else { zzInput = zzBufferL[zzCurrentPosL++]; } } int zzNext = zzTransL[ zzRowMapL[zzState] + zzCMapL[zzInput] ]; if (zzNext == -1) break zzForAction; zzState = zzNext; int zzAttributes = zzAttrL[zzState]; if ( (zzAttributes & 1) == 1 ) { zzAction = zzState; zzMarkedPosL = zzCurrentPosL; if ( (zzAttributes & 8) == 8 ) break zzForAction; } } } // store back cached position zzMarkedPos = zzMarkedPosL; switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) { case 45: { return sym(Terminals.LTEQ); } case 130: break; case 39: { error("unterminated character literal at end of line"); } case 131: break; case 70: { return sym(Terminals.INT); } case 132: break; case 94: { return sym(Terminals.VOID); } case 133: break; case 72: { return sym(Terminals.RSHIFTEQ); } case 134: break; case 25: { return sym(Terminals.AND); } case 135: break; case 114: { return sym(Terminals.EXTENDS); } case 136: break; case 109: { return sym(Terminals.THROWS); } case 137: break; case 78: { return sym(Terminals.CHARACTER_LITERAL, "\\"); } case 138: break; case 48: { return sym(Terminals.ANDEQ); } case 139: break; case 55: { return sym(Terminals.MODEQ); } case 140: break; case 113: { return sym(Terminals.PUBLIC); } case 141: break; case 4: { return sym(Terminals.MULT); } case 142: break; case 51: { return sym(Terminals.OROR); } case 143: break; case 105: { return sym(Terminals.ASSERT); } case 144: break; case 75: { int val = Integer.parseInt(str().substring(2,len()-1),8); return sym(Terminals.CHARACTER_LITERAL, new Character((char)val).toString()); } case 145: break; case 21: { return sym(Terminals.NOT); } case 146: break; case 98: { return sym(Terminals.THROW); } case 147: break; case 19: { return sym(Terminals.GT); } case 148: break; case 33: { error("unterminated string at end of line"); } case 149: break; case 84: { return sym(Terminals.ELSE); } case 150: break; case 18: { return sym(Terminals.EQ); } case 151: break; case 62: { strbuf.append( '\t' ); } case 152: break; case 81: { return sym(Terminals.CHARACTER_LITERAL, "\b"); } case 153: break; case 32: { strbuf.append(str()); } case 154: break; case 11: { return sym(Terminals.RPAREN); } case 155: break; case 41: { return sym(Terminals.DO); } case 156: break; case 115: { return sym(Terminals.BOOLEAN); } case 157: break; case 43: { return sym(Terminals.GTEQ); } case 158: break; case 101: { return sym(Terminals.CLASS); } case 159: break; case 92: { return sym(Terminals.NULL_LITERAL); } case 160: break; case 93: { return sym(Terminals.EOF); } case 161: break; case 35: { return sym(Terminals.DIVEQ); } case 162: break; case 36: { return sym(Terminals.MULTEQ); } case 163: break; case 119: { return sym(Terminals.PRIVATE); } case 164: break; case 88: { return sym(Terminals.BYTE); } case 165: break; case 20: { return sym(Terminals.LT); } case 166: break; case 95: { return sym(Terminals.URSHIFTEQ); } case 167: break; case 28: { return sym(Terminals.XOR); } case 168: break; case 117: { return sym(Terminals.FINALLY); } case 169: break; case 121: { return sym(Terminals.STRICTFP); } case 170: break; case 83: { return sym(Terminals.CHARACTER_LITERAL, "\f"); } case 171: break; case 9: { yybegin(STRING); // remember start position of string literal so we can // set its position correctly in the end strlit_start_line = yyline+1; strlit_start_column = yycolumn+1; strbuf.setLength(0); } case 172: break; case 86: { return sym(Terminals.BOOLEAN_LITERAL); } case 173: break; case 99: { return sym(Terminals.BREAK); } case 174: break; case 64: { strbuf.append( '\n' ); } case 175: break; case 127: { return sym(Terminals.INSTANCEOF); } case 176: break; case 44: { return sym(Terminals.RSHIFT); } case 177: break; case 110: { return sym(Terminals.NATIVE); } case 178: break; case 73: { return sym(Terminals.URSHIFT); } case 179: break; case 57: { strbuf.append((char)Integer.parseInt(str().substring(1),8)); } case 180: break; case 53: { return sym(Terminals.PLUSPLUS); } case 181: break; case 116: { return sym(Terminals.DEFAULT); } case 182: break; case 112: { return sym(Terminals.DOUBLE); } case 183: break; case 123: { return sym(Terminals.VOLATILE); } case 184: break; case 54: { return sym(Terminals.XOREQ); } case 185: break; case 26: { return sym(Terminals.OR); } case 186: break; case 118: { return sym(Terminals.PACKAGE); } case 187: break; case 107: { return sym(Terminals.SWITCH); } case 188: break; case 10: { return sym(Terminals.LPAREN); } case 189: break; case 46: { return sym(Terminals.LSHIFT); } case 190: break; case 66: { return sym(Terminals.ELLIPSIS); } case 191: break; case 42: { return sym(Terminals.EQEQ); } case 192: break; case 38: { return sym(Terminals.MINUSEQ); } case 193: break; case 122: { return sym(Terminals.CONTINUE); } case 194: break; case 120: { return sym(Terminals.ABSTRACT); } case 195: break; case 91: { return sym(Terminals.LONG); } case 196: break; case 27: { return sym(Terminals.PLUS); } case 197: break; case 82: { return sym(Terminals.CHARACTER_LITERAL, "\n"); } case 198: break; case 77: { return sym(Terminals.CHARACTER_LITERAL, "\""); } case 199: break; case 16: { return sym(Terminals.SEMICOLON); } case 200: break; case 15: { return sym(Terminals.RBRACK); } case 201: break; case 103: { return sym(Terminals.FINAL); } case 202: break; case 56: { error("illegal escape sequence \""+str()+"\""); } case 203: break; case 111: { return sym(Terminals.IMPORT); } case 204: break; case 87: { return sym(Terminals.THIS); } case 205: break; case 61: { strbuf.append( '\r' ); } case 206: break; case 102: { return sym(Terminals.FLOAT); } case 207: break; case 97: { return sym(Terminals.SUPER); } case 208: break; case 85: { return sym(Terminals.ENUM); } case 209: break; case 8: { return sym(Terminals.MINUS); } case 210: break; case 63: { strbuf.append( '\b' ); } case 211: break; case 1: { error("illegal character \""+str()+ "\""); } case 212: break; case 79: { return sym(Terminals.CHARACTER_LITERAL, "\r"); } case 213: break; case 40: { return sym(Terminals.IF); } case 214: break; case 37: { return sym(Terminals.MINUSMINUS); } case 215: break; case 126: { return sym(Terminals.PROTECTED); } case 216: break; case 5: { return sym(Terminals.NUMERIC_LITERAL); } case 217: break; case 59: { strbuf.append( '\"' ); } case 218: break; case 76: { return sym(Terminals.CHARACTER_LITERAL, "\'"); } case 219: break; case 80: { return sym(Terminals.CHARACTER_LITERAL, "\t"); } case 220: break; case 24: { return sym(Terminals.COLON); } case 221: break; case 71: { return sym(Terminals.FOR); } case 222: break; case 58: { strbuf.append( '\'' ); } case 223: break; case 90: { return sym(Terminals.CHAR); } case 224: break; case 60: { strbuf.append( '\\' ); } case 225: break; case 13: { return sym(Terminals.RBRACE); } case 226: break; case 67: { return sym(Terminals.CHARACTER_LITERAL, str().substring(1, len()-1)); } case 227: break; case 69: { return sym(Terminals.NEW); } case 228: break; case 14: { return sym(Terminals.LBRACK); } case 229: break; case 22: { return sym(Terminals.COMP); } case 230: break; case 3: { return sym(Terminals.DIV); } case 231: break; case 125: { return sym(Terminals.INTERFACE); } case 232: break; case 23: { return sym(Terminals.QUESTION); } case 233: break; case 124: { return sym(Terminals.TRANSIENT); } case 234: break; case 49: { return sym(Terminals.ANDAND); } case 235: break; case 47: { return sym(Terminals.NOTEQ); } case 236: break; case 29: { return sym(Terminals.MOD); } case 237: break; case 104: { return sym(Terminals.WHILE); } case 238: break; case 74: { return sym(Terminals.LSHIFTEQ); } case 239: break; case 31: { if(sub_line == 0 && sub_column == 0) { sub_line = yyline; sub_column = yycolumn; } } case 240: break; case 52: { return sym(Terminals.PLUSEQ); } case 241: break; case 65: { strbuf.append( '\f' ); } case 242: break; case 100: { return sym(Terminals.CATCH); } case 243: break; case 17: { return sym(Terminals.COMMA); } case 244: break; case 129: { return sym(Terminals.SYNCHRONIZED); } case 245: break; case 50: { return sym(Terminals.OREQ); } case 246: break; case 108: { return sym(Terminals.RETURN); } case 247: break; case 68: { return sym(Terminals.TRY); } case 248: break; case 6: { return sym(Terminals.IDENTIFIER); } case 249: break; case 89: { return sym(Terminals.CASE); } case 250: break; case 12: { return sym(Terminals.LBRACE); } case 251: break; case 34: { yybegin(YYINITIAL); return sym(Terminals.STRING_LITERAL, strbuf.toString(), strlit_start_line, strlit_start_column, strbuf.length()+2); } case 252: break; case 128: { return sym(Terminals.IMPLEMENTS); } case 253: break; case 106: { return sym(Terminals.STATIC); } case 254: break; case 30: { return sym(Terminals.AT); } case 255: break; case 7: { return sym(Terminals.DOT); } case 256: break; case 96: { return sym(Terminals.SHORT); } case 257: break; case 2: { } case 258: break; default: if (zzInput == YYEOF && zzStartRead == zzCurrentPos) { zzAtEOF = true; { // detect position of first SUB character if(!(sub_line == 0 && sub_column == 0) && (sub_line != yyline || sub_column != yycolumn-1)) { // reset to only return error once sub_line = 0; sub_column = 0; // return error error("error"); } return sym(Terminals.EOF); } } else { zzScanError(ZZ_NO_MATCH); } } } } }
55,800
33.466337
150
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/LEExpr.java
/* This file was generated with JastAdd2 (http://jastadd.org) version R20130212 (r1031) */ package soot.JastAddJ; import java.util.HashSet; 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; /** * @production LEExpr : {@link RelationalExpr}; * @ast node * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/java.ast:178 */ public class LEExpr extends RelationalExpr implements Cloneable { /** * @apilevel low-level */ public void flushCache() { super.flushCache(); } /** * @apilevel internal */ public void flushCollectionCache() { super.flushCollectionCache(); } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public LEExpr clone() throws CloneNotSupportedException { LEExpr node = (LEExpr)super.clone(); node.in$Circle(false); node.is$Final(false); return node; } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public LEExpr copy() { try { LEExpr node = (LEExpr) clone(); node.parent = null; if(children != null) node.children = (ASTNode[]) children.clone(); return node; } catch (CloneNotSupportedException e) { throw new Error("Error: clone not supported for " + getClass().getName()); } } /** * Create a deep copy of the AST subtree at this node. * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level */ @SuppressWarnings({"unchecked", "cast"}) public LEExpr fullCopy() { LEExpr tree = (LEExpr) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) children[i]; if(child != null) { child = child.fullCopy(); tree.setChild(child, i); } } } return tree; } /** * @ast method * @aspect BooleanExpressions * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/BooleanExpressions.jrag:285 */ public soot.Value comparison(Body b, soot.Value left, soot.Value right) { return b.newLeExpr(asImmediate(b, left), asImmediate(b, right), this); } /** * @ast method * @aspect BooleanExpressions * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/BooleanExpressions.jrag:307 */ public soot.Value comparisonInv(Body b, soot.Value left, soot.Value right) { return b.newGtExpr(asImmediate(b, left), asImmediate(b, right), this); } /** * @ast method * */ public LEExpr() { super(); } /** * Initializes the child array to the correct size. * Initializes List and Opt nta children. * @apilevel internal * @ast method * @ast method * */ public void init$Children() { children = new ASTNode[2]; } /** * @ast method * */ public LEExpr(Expr p0, Expr p1) { setChild(p0, 0); setChild(p1, 1); } /** * @apilevel low-level * @ast method * */ protected int numChildren() { return 2; } /** * @apilevel internal * @ast method * */ public boolean mayHaveRewrite() { return false; } /** * Replaces the LeftOperand child. * @param node The new node to replace the LeftOperand child. * @apilevel high-level * @ast method * */ public void setLeftOperand(Expr node) { setChild(node, 0); } /** * Retrieves the LeftOperand child. * @return The current node used as the LeftOperand child. * @apilevel high-level * @ast method * */ public Expr getLeftOperand() { return (Expr)getChild(0); } /** * Retrieves the LeftOperand child. * <p><em>This method does not invoke AST transformations.</em></p> * @return The current node used as the LeftOperand child. * @apilevel low-level * @ast method * */ public Expr getLeftOperandNoTransform() { return (Expr)getChildNoTransform(0); } /** * Replaces the RightOperand child. * @param node The new node to replace the RightOperand child. * @apilevel high-level * @ast method * */ public void setRightOperand(Expr node) { setChild(node, 1); } /** * Retrieves the RightOperand child. * @return The current node used as the RightOperand child. * @apilevel high-level * @ast method * */ public Expr getRightOperand() { return (Expr)getChild(1); } /** * Retrieves the RightOperand child. * <p><em>This method does not invoke AST transformations.</em></p> * @return The current node used as the RightOperand child. * @apilevel low-level * @ast method * */ public Expr getRightOperandNoTransform() { return (Expr)getChildNoTransform(1); } /** * @attribute syn * @aspect ConstantExpression * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/ConstantExpression.jrag:91 */ public Constant constant() { ASTNode$State state = state(); try { return Constant.create(binaryNumericPromotedType().leIsTrue(left(), right())); } finally { } } /** * @attribute syn * @aspect PrettyPrint * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/PrettyPrint.jadd:400 */ public String printOp() { ASTNode$State state = state(); try { return " <= "; } finally { } } /** * @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); } }
5,900
24.004237
120
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/LShiftExpr.java
/* This file was generated with JastAdd2 (http://jastadd.org) version R20130212 (r1031) */ package soot.JastAddJ; import java.util.HashSet; 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; /** * @production LShiftExpr : {@link ShiftExpr}; * @ast node * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/java.ast:162 */ public class LShiftExpr extends ShiftExpr implements Cloneable { /** * @apilevel low-level */ public void flushCache() { super.flushCache(); } /** * @apilevel internal */ public void flushCollectionCache() { super.flushCollectionCache(); } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public LShiftExpr clone() throws CloneNotSupportedException { LShiftExpr node = (LShiftExpr)super.clone(); node.in$Circle(false); node.is$Final(false); return node; } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public LShiftExpr copy() { try { LShiftExpr node = (LShiftExpr) clone(); node.parent = null; if(children != null) node.children = (ASTNode[]) children.clone(); return node; } catch (CloneNotSupportedException e) { throw new Error("Error: clone not supported for " + getClass().getName()); } } /** * Create a deep copy of the AST subtree at this node. * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level */ @SuppressWarnings({"unchecked", "cast"}) public LShiftExpr fullCopy() { LShiftExpr tree = (LShiftExpr) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) children[i]; if(child != null) { child = child.fullCopy(); tree.setChild(child, i); } } } return tree; } /** * @ast method * @aspect Expressions * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/Expressions.jrag:798 */ public soot.Value eval(Body b) { return emitShiftExpr(b); } /** * @ast method * @aspect Expressions * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/Expressions.jrag:820 */ public soot.Value emitOperation(Body b, soot.Value left, soot.Value right) { return asLocal(b, b.newShlExpr(asImmediate(b, left), asImmediate(b, right), this)); } /** * @ast method * */ public LShiftExpr() { super(); } /** * Initializes the child array to the correct size. * Initializes List and Opt nta children. * @apilevel internal * @ast method * @ast method * */ public void init$Children() { children = new ASTNode[2]; } /** * @ast method * */ public LShiftExpr(Expr p0, Expr p1) { setChild(p0, 0); setChild(p1, 1); } /** * @apilevel low-level * @ast method * */ protected int numChildren() { return 2; } /** * @apilevel internal * @ast method * */ public boolean mayHaveRewrite() { return false; } /** * Replaces the LeftOperand child. * @param node The new node to replace the LeftOperand child. * @apilevel high-level * @ast method * */ public void setLeftOperand(Expr node) { setChild(node, 0); } /** * Retrieves the LeftOperand child. * @return The current node used as the LeftOperand child. * @apilevel high-level * @ast method * */ public Expr getLeftOperand() { return (Expr)getChild(0); } /** * Retrieves the LeftOperand child. * <p><em>This method does not invoke AST transformations.</em></p> * @return The current node used as the LeftOperand child. * @apilevel low-level * @ast method * */ public Expr getLeftOperandNoTransform() { return (Expr)getChildNoTransform(0); } /** * Replaces the RightOperand child. * @param node The new node to replace the RightOperand child. * @apilevel high-level * @ast method * */ public void setRightOperand(Expr node) { setChild(node, 1); } /** * Retrieves the RightOperand child. * @return The current node used as the RightOperand child. * @apilevel high-level * @ast method * */ public Expr getRightOperand() { return (Expr)getChild(1); } /** * Retrieves the RightOperand child. * <p><em>This method does not invoke AST transformations.</em></p> * @return The current node used as the RightOperand child. * @apilevel low-level * @ast method * */ public Expr getRightOperandNoTransform() { return (Expr)getChildNoTransform(1); } /** * @attribute syn * @aspect ConstantExpression * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/ConstantExpression.jrag:91 */ public Constant constant() { ASTNode$State state = state(); try { return type().lshift(getLeftOperand().constant(), getRightOperand().constant()); } finally { } } /** * @attribute syn * @aspect PrettyPrint * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/PrettyPrint.jadd:400 */ public String printOp() { ASTNode$State state = state(); try { return " << "; } finally { } } /** * @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); } }
5,836
23.944444
113
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/LTExpr.java
/* This file was generated with JastAdd2 (http://jastadd.org) version R20130212 (r1031) */ package soot.JastAddJ; import java.util.HashSet; 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; /** * @production LTExpr : {@link RelationalExpr}; * @ast node * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/java.ast:176 */ public class LTExpr extends RelationalExpr implements Cloneable { /** * @apilevel low-level */ public void flushCache() { super.flushCache(); } /** * @apilevel internal */ public void flushCollectionCache() { super.flushCollectionCache(); } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public LTExpr clone() throws CloneNotSupportedException { LTExpr node = (LTExpr)super.clone(); node.in$Circle(false); node.is$Final(false); return node; } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public LTExpr copy() { try { LTExpr node = (LTExpr) clone(); node.parent = null; if(children != null) node.children = (ASTNode[]) children.clone(); return node; } catch (CloneNotSupportedException e) { throw new Error("Error: clone not supported for " + getClass().getName()); } } /** * Create a deep copy of the AST subtree at this node. * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level */ @SuppressWarnings({"unchecked", "cast"}) public LTExpr fullCopy() { LTExpr tree = (LTExpr) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) children[i]; if(child != null) { child = child.fullCopy(); tree.setChild(child, i); } } } return tree; } /** * @ast method * @aspect BooleanExpressions * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/BooleanExpressions.jrag:282 */ public soot.Value comparison(Body b, soot.Value left, soot.Value right) { return b.newLtExpr(asImmediate(b, left), asImmediate(b, right), this); } /** * @ast method * @aspect BooleanExpressions * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/BooleanExpressions.jrag:304 */ public soot.Value comparisonInv(Body b, soot.Value left, soot.Value right) { return b.newGeExpr(asImmediate(b, left), asImmediate(b, right), this); } /** * @ast method * */ public LTExpr() { super(); } /** * Initializes the child array to the correct size. * Initializes List and Opt nta children. * @apilevel internal * @ast method * @ast method * */ public void init$Children() { children = new ASTNode[2]; } /** * @ast method * */ public LTExpr(Expr p0, Expr p1) { setChild(p0, 0); setChild(p1, 1); } /** * @apilevel low-level * @ast method * */ protected int numChildren() { return 2; } /** * @apilevel internal * @ast method * */ public boolean mayHaveRewrite() { return false; } /** * Replaces the LeftOperand child. * @param node The new node to replace the LeftOperand child. * @apilevel high-level * @ast method * */ public void setLeftOperand(Expr node) { setChild(node, 0); } /** * Retrieves the LeftOperand child. * @return The current node used as the LeftOperand child. * @apilevel high-level * @ast method * */ public Expr getLeftOperand() { return (Expr)getChild(0); } /** * Retrieves the LeftOperand child. * <p><em>This method does not invoke AST transformations.</em></p> * @return The current node used as the LeftOperand child. * @apilevel low-level * @ast method * */ public Expr getLeftOperandNoTransform() { return (Expr)getChildNoTransform(0); } /** * Replaces the RightOperand child. * @param node The new node to replace the RightOperand child. * @apilevel high-level * @ast method * */ public void setRightOperand(Expr node) { setChild(node, 1); } /** * Retrieves the RightOperand child. * @return The current node used as the RightOperand child. * @apilevel high-level * @ast method * */ public Expr getRightOperand() { return (Expr)getChild(1); } /** * Retrieves the RightOperand child. * <p><em>This method does not invoke AST transformations.</em></p> * @return The current node used as the RightOperand child. * @apilevel low-level * @ast method * */ public Expr getRightOperandNoTransform() { return (Expr)getChildNoTransform(1); } /** * @attribute syn * @aspect ConstantExpression * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/ConstantExpression.jrag:91 */ public Constant constant() { ASTNode$State state = state(); try { return Constant.create(binaryNumericPromotedType().ltIsTrue(left(), right())); } finally { } } /** * @attribute syn * @aspect PrettyPrint * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/PrettyPrint.jadd:400 */ public String printOp() { ASTNode$State state = state(); try { return " < "; } finally { } } /** * @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); } }
5,899
24
120
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/LUBType.java
/* This file was generated with JastAdd2 (http://jastadd.org) version R20130212 (r1031) */ package soot.JastAddJ; import java.util.HashSet; 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; /** * @production LUBType : {@link ReferenceType} ::= <span class="component">{@link Modifiers}</span> <span class="component">&lt;ID:String&gt;</span> <span class="component">{@link BodyDecl}*</span> <span class="component">TypeBound:{@link Access}*</span>; * @ast node * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.ast:46 */ public class LUBType extends ReferenceType implements Cloneable { /** * @apilevel low-level */ public void flushCache() { super.flushCache(); lub_computed = false; lub_value = null; subtype_TypeDecl_values = null; getSootClassDecl_computed = false; getSootClassDecl_value = null; } /** * @apilevel internal */ public void flushCollectionCache() { super.flushCollectionCache(); } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public LUBType clone() throws CloneNotSupportedException { LUBType node = (LUBType)super.clone(); node.lub_computed = false; node.lub_value = null; node.subtype_TypeDecl_values = null; node.getSootClassDecl_computed = false; node.getSootClassDecl_value = null; node.in$Circle(false); node.is$Final(false); return node; } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public LUBType copy() { try { LUBType node = (LUBType) clone(); node.parent = null; if(children != null) node.children = (ASTNode[]) children.clone(); return node; } catch (CloneNotSupportedException e) { throw new Error("Error: clone not supported for " + getClass().getName()); } } /** * Create a deep copy of the AST subtree at this node. * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level */ @SuppressWarnings({"unchecked", "cast"}) public LUBType fullCopy() { LUBType tree = (LUBType) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) children[i]; if(child != null) { child = child.fullCopy(); tree.setChild(child, i); } } } return tree; } /** * @ast method * @aspect GenericMethodsInference * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericMethodsInference.jrag:668 */ public static HashSet EC(ArrayList list) { HashSet result = new HashSet(); boolean first = true; for(Iterator iter = list.iterator(); iter.hasNext(); ) { TypeDecl U = (TypeDecl)iter.next(); // erased supertype set of U HashSet EST = LUBType.EST(U); if(first) { result.addAll(EST); first = false; } else result.retainAll(EST); } return result; } /** * The minimal erased candidate set for Tj * is MEC = {V | V in EC, forall W != V in EC, not W <: V} * @return minimal erased candidate set for Tj * @ast method * @aspect GenericMethodsInference * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericMethodsInference.jrag:690 */ public static HashSet MEC(ArrayList list) { HashSet EC = LUBType.EC(list); if(EC.size() == 1) return EC; HashSet MEC = new HashSet(); for(Iterator iter = EC.iterator(); iter.hasNext(); ) { TypeDecl V = (TypeDecl)iter.next(); boolean keep = true; for(Iterator i2 = EC.iterator(); i2.hasNext(); ) { TypeDecl W = (TypeDecl)i2.next(); if(!(V instanceof TypeVariable) && V != W && W.instanceOf(V)) keep = false; } if(keep) MEC.add(V); } return MEC; } /** * relevant invocations of G, Inv(G) * Inv(G) = {V | 1 <= i <= k, V in ST(Ui), V = G<...>} * @return set of relevant invocations of G, Inv(G) * @ast method * @aspect GenericMethodsInference * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericMethodsInference.jrag:714 */ public static HashSet Inv(TypeDecl G, ArrayList Us) { HashSet result = new HashSet(); for(Iterator iter = Us.iterator(); iter.hasNext(); ) { TypeDecl U = (TypeDecl)iter.next(); for(Iterator i2 = LUBType.ST(U).iterator(); i2.hasNext(); ) { TypeDecl V = (TypeDecl)i2.next(); if(V instanceof ParTypeDecl && !V.isRawType() && ((ParTypeDecl)V).genericDecl() == G) result.add(V); } } return result; } /** * @return least containing invocation (lci) * @ast method * @aspect GenericMethodsInference * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericMethodsInference.jrag:730 */ public TypeDecl lci(HashSet set, TypeDecl G) { ArrayList list = new ArrayList(); boolean first = true; for(Iterator iter = set.iterator(); iter.hasNext(); ) { ParTypeDecl decl = (ParTypeDecl)iter.next(); if(first) { first = false; for(int i = 0; i < decl.getNumArgument(); i++) list.add(decl.getArgument(i).type()); } else { for(int i = 0; i < decl.getNumArgument(); i++) list.set(i, lcta((TypeDecl)list.get(i), decl.getArgument(i).type())); } } return ((GenericTypeDecl)G).lookupParTypeDecl(list); } /** * least containing type arguments * @ast method * @aspect GenericMethodsInference * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericMethodsInference.jrag:751 */ public TypeDecl lcta(TypeDecl X, TypeDecl Y) { //System.err.println("Computing lcta for " + X.typeName() + " and " + Y.typeName()); if(!X.isWildcard() && !Y.isWildcard()) { TypeDecl U = X; TypeDecl V = Y; return U == V ? U : lub(U, V).asWildcardExtends(); } else if(!X.isWildcard() && Y instanceof WildcardExtendsType) { TypeDecl U = X; TypeDecl V = ((WildcardExtendsType)Y).getAccess().type(); return lub(U, V).asWildcardExtends(); } else if(!X.isWildcard() && Y instanceof WildcardSuperType) { TypeDecl U = X; TypeDecl V = ((WildcardSuperType)Y).getAccess().type(); ArrayList bounds = new ArrayList(); bounds.add(U); bounds.add(V); return GLBTypeFactory.glb(bounds).asWildcardSuper(); } else if(X instanceof WildcardExtendsType && Y instanceof WildcardExtendsType) { TypeDecl U = ((WildcardExtendsType)X).getAccess().type(); TypeDecl V = ((WildcardExtendsType)Y).getAccess().type(); return lub(U, V).asWildcardExtends(); } else if(X instanceof WildcardExtendsType && Y instanceof WildcardSuperType) { TypeDecl U = ((WildcardExtendsType)X).getAccess().type(); TypeDecl V = ((WildcardSuperType)Y).getAccess().type(); return U == V ? U : U.typeWildcard(); } else if(X instanceof WildcardSuperType && Y instanceof WildcardSuperType) { TypeDecl U = ((WildcardSuperType)X).getAccess().type(); TypeDecl V = ((WildcardSuperType)Y).getAccess().type(); ArrayList bounds = new ArrayList(); bounds.add(U); bounds.add(V); return GLBTypeFactory.glb(bounds).asWildcardSuper(); } else throw new Error("lcta not defined for (" + X.getClass().getName() + ", " + Y.getClass().getName()); } /** * @ast method * @aspect GenericMethodsInference * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericMethodsInference.jrag:793 */ public TypeDecl lub(TypeDecl X, TypeDecl Y) { ArrayList list = new ArrayList(2); list.add(X); list.add(Y); return lub(list); } /** * @ast method * @aspect GenericMethodsInference * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericMethodsInference.jrag:800 */ public TypeDecl lub(ArrayList list) { return lookupLUBType(list); } /** * @ast method * @aspect GenericMethodsInference * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericMethodsInference.jrag:805 */ public static HashSet EST(TypeDecl t) { HashSet result = new HashSet(); for(Iterator iter = LUBType.ST(t).iterator(); iter.hasNext(); ) { TypeDecl typeDecl = (TypeDecl)iter.next(); if(typeDecl instanceof TypeVariable) result.add(typeDecl); else result.add(typeDecl.erasure()); } return result; } /** * @return supertype set of T * @ast method * @aspect GenericMethodsInference * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericMethodsInference.jrag:820 */ public static HashSet ST(TypeDecl t) { HashSet result = new HashSet(); LUBType.addSupertypes(result, t); return result; } /** * @ast method * @aspect GenericMethodsInference * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericMethodsInference.jrag:826 */ public static void addSupertypes(HashSet set, TypeDecl t) { set.add(t); if(t instanceof ClassDecl) { ClassDecl type = (ClassDecl)t; if(type.hasSuperclass()) { addSupertypes(set, type.superclass()); } for(int i = 0; i < type.getNumImplements(); i++) { addSupertypes(set, type.getImplements(i).type()); } } else if(t instanceof InterfaceDecl) { InterfaceDecl type = (InterfaceDecl)t; for(int i = 0; i < type.getNumSuperInterfaceId(); i++) { addSupertypes(set, type.getSuperInterfaceId(i).type()); } if(type.getNumSuperInterfaceId() == 0) set.add(type.typeObject()); } else if(t instanceof TypeVariable) { TypeVariable type = (TypeVariable)t; for(int i = 0; i < type.getNumTypeBound(); i++) { addSupertypes(set, type.getTypeBound(i).type()); } if(type.getNumTypeBound() == 0) set.add(type.typeObject()); } else if(t instanceof LUBType) { LUBType type = (LUBType)t; for(int i = 0; i < type.getNumTypeBound(); i++) { addSupertypes(set, type.getTypeBound(i).type()); } if(type.getNumTypeBound() == 0) set.add(type.typeObject()); } else throw new Error("Operation not supported for " + t.fullName() + ", " + t.getClass().getName()); } /** * @ast method * @aspect LookupParTypeDecl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:1444 */ public HashSet implementedInterfaces(){ HashSet ret = new HashSet(); for (int i = 0; i < getNumTypeBound(); i++) { ret.addAll(getTypeBound(i).type().implementedInterfaces()); } return ret; } /** * @ast method * */ public LUBType() { super(); } /** * Initializes the child array to the correct size. * Initializes List and Opt nta children. * @apilevel internal * @ast method * @ast method * */ public void init$Children() { children = new ASTNode[3]; setChild(new List(), 1); setChild(new List(), 2); } /** * @ast method * */ public LUBType(Modifiers p0, String p1, List<BodyDecl> p2, List<Access> p3) { setChild(p0, 0); setID(p1); setChild(p2, 1); setChild(p3, 2); } /** * @ast method * */ public LUBType(Modifiers p0, beaver.Symbol p1, List<BodyDecl> p2, List<Access> p3) { setChild(p0, 0); setID(p1); setChild(p2, 1); setChild(p3, 2); } /** * @apilevel low-level * @ast method * */ protected int numChildren() { return 3; } /** * @apilevel internal * @ast method * */ public boolean mayHaveRewrite() { return false; } /** * Replaces the Modifiers child. * @param node The new node to replace the Modifiers child. * @apilevel high-level * @ast method * */ public void setModifiers(Modifiers node) { setChild(node, 0); } /** * Retrieves the Modifiers child. * @return The current node used as the Modifiers child. * @apilevel high-level * @ast method * */ public Modifiers getModifiers() { return (Modifiers)getChild(0); } /** * Retrieves the Modifiers child. * <p><em>This method does not invoke AST transformations.</em></p> * @return The current node used as the Modifiers child. * @apilevel low-level * @ast method * */ public Modifiers getModifiersNoTransform() { return (Modifiers)getChildNoTransform(0); } /** * Replaces the lexeme ID. * @param value The new value for the lexeme ID. * @apilevel high-level * @ast method * */ public void setID(String value) { tokenString_ID = value; } /** * JastAdd-internal setter for lexeme ID using the Beaver parser. * @apilevel internal * @ast method * */ 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(); } /** * Retrieves the value for the lexeme ID. * @return The value for the lexeme ID. * @apilevel high-level * @ast method * */ public String getID() { return tokenString_ID != null ? tokenString_ID : ""; } /** * Replaces the BodyDecl list. * @param list The new list node to be used as the BodyDecl list. * @apilevel high-level * @ast method * */ public void setBodyDeclList(List<BodyDecl> list) { setChild(list, 1); } /** * Retrieves the number of children in the BodyDecl list. * @return Number of children in the BodyDecl list. * @apilevel high-level * @ast method * */ public int getNumBodyDecl() { return getBodyDeclList().getNumChild(); } /** * Retrieves the number of children in the BodyDecl list. * Calling this method will not trigger rewrites.. * @return Number of children in the BodyDecl list. * @apilevel low-level * @ast method * */ public int getNumBodyDeclNoTransform() { return getBodyDeclListNoTransform().getNumChildNoTransform(); } /** * Retrieves the element at index {@code i} in the BodyDecl list.. * @param i Index of the element to return. * @return The element at position {@code i} in the BodyDecl list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public BodyDecl getBodyDecl(int i) { return (BodyDecl)getBodyDeclList().getChild(i); } /** * Append an element to the BodyDecl list. * @param node The element to append to the BodyDecl list. * @apilevel high-level * @ast method * */ public void addBodyDecl(BodyDecl node) { List<BodyDecl> list = (parent == null || state == null) ? getBodyDeclListNoTransform() : getBodyDeclList(); list.addChild(node); } /** * @apilevel low-level * @ast method * */ public void addBodyDeclNoTransform(BodyDecl node) { List<BodyDecl> list = getBodyDeclListNoTransform(); list.addChild(node); } /** * Replaces the BodyDecl list element at index {@code i} with the new node {@code node}. * @param node The new node to replace the old list element. * @param i The list index of the node to be replaced. * @apilevel high-level * @ast method * */ public void setBodyDecl(BodyDecl node, int i) { List<BodyDecl> list = getBodyDeclList(); list.setChild(node, i); } /** * Retrieves the BodyDecl list. * @return The node representing the BodyDecl list. * @apilevel high-level * @ast method * */ public List<BodyDecl> getBodyDecls() { return getBodyDeclList(); } /** * Retrieves the BodyDecl list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the BodyDecl list. * @apilevel low-level * @ast method * */ public List<BodyDecl> getBodyDeclsNoTransform() { return getBodyDeclListNoTransform(); } /** * Retrieves the BodyDecl list. * @return The node representing the BodyDecl list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<BodyDecl> getBodyDeclList() { List<BodyDecl> list = (List<BodyDecl>)getChild(1); list.getNumChild(); return list; } /** * Retrieves the BodyDecl list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the BodyDecl list. * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<BodyDecl> getBodyDeclListNoTransform() { return (List<BodyDecl>)getChildNoTransform(1); } /** * Replaces the TypeBound list. * @param list The new list node to be used as the TypeBound list. * @apilevel high-level * @ast method * */ public void setTypeBoundList(List<Access> list) { setChild(list, 2); } /** * Retrieves the number of children in the TypeBound list. * @return Number of children in the TypeBound list. * @apilevel high-level * @ast method * */ public int getNumTypeBound() { return getTypeBoundList().getNumChild(); } /** * Retrieves the number of children in the TypeBound list. * Calling this method will not trigger rewrites.. * @return Number of children in the TypeBound list. * @apilevel low-level * @ast method * */ public int getNumTypeBoundNoTransform() { return getTypeBoundListNoTransform().getNumChildNoTransform(); } /** * Retrieves the element at index {@code i} in the TypeBound list.. * @param i Index of the element to return. * @return The element at position {@code i} in the TypeBound list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public Access getTypeBound(int i) { return (Access)getTypeBoundList().getChild(i); } /** * Append an element to the TypeBound list. * @param node The element to append to the TypeBound list. * @apilevel high-level * @ast method * */ public void addTypeBound(Access node) { List<Access> list = (parent == null || state == null) ? getTypeBoundListNoTransform() : getTypeBoundList(); list.addChild(node); } /** * @apilevel low-level * @ast method * */ public void addTypeBoundNoTransform(Access node) { List<Access> list = getTypeBoundListNoTransform(); list.addChild(node); } /** * Replaces the TypeBound list element at index {@code i} with the new node {@code node}. * @param node The new node to replace the old list element. * @param i The list index of the node to be replaced. * @apilevel high-level * @ast method * */ public void setTypeBound(Access node, int i) { List<Access> list = getTypeBoundList(); list.setChild(node, i); } /** * Retrieves the TypeBound list. * @return The node representing the TypeBound list. * @apilevel high-level * @ast method * */ public List<Access> getTypeBounds() { return getTypeBoundList(); } /** * Retrieves the TypeBound list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the TypeBound list. * @apilevel low-level * @ast method * */ public List<Access> getTypeBoundsNoTransform() { return getTypeBoundListNoTransform(); } /** * Retrieves the TypeBound list. * @return The node representing the TypeBound list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<Access> getTypeBoundList() { List<Access> list = (List<Access>)getChild(2); list.getNumChild(); return list; } /** * Retrieves the TypeBound list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the TypeBound list. * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<Access> getTypeBoundListNoTransform() { return (List<Access>)getChildNoTransform(2); } /** * @apilevel internal */ protected boolean lub_computed = false; /** * @apilevel internal */ protected TypeDecl lub_value; /** * @attribute syn * @aspect GenericMethodsInference * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericMethodsInference.jrag:650 */ @SuppressWarnings({"unchecked", "cast"}) public TypeDecl lub() { if(lub_computed) { return lub_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); lub_value = lub_compute(); if(isFinal && num == state().boundariesCrossed) lub_computed = true; return lub_value; } /** * @apilevel internal */ private TypeDecl lub_compute() { ArrayList list = new ArrayList(); for(int i = 0; i < getNumTypeBound(); i++) list.add(getTypeBound(i).type()); ArrayList bounds = new ArrayList(); for(Iterator iter = LUBType.MEC(list).iterator(); iter.hasNext(); ) { TypeDecl W = (TypeDecl)iter.next(); TypeDecl C = W instanceof GenericTypeDecl ? lci(Inv(W, list), W) : W; bounds.add(C); } if(bounds.size() == 1) return (TypeDecl)bounds.iterator().next(); return lookupLUBType(bounds); } /** * @attribute syn * @aspect LookupParTypeDecl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:1434 */ public String typeName() { ASTNode$State state = state(); try { if(getNumTypeBound() == 0) return "<NOTYPE>"; StringBuffer s = new StringBuffer(); s.append(getTypeBound(0).type().typeName()); for(int i = 1; i < getNumTypeBound(); i++) s.append(" & " + getTypeBound(i).type().typeName()); return s.toString(); } finally { } } protected java.util.Map subtype_TypeDecl_values; /** * @attribute syn * @aspect GenericsSubtype * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericsSubtype.jrag:346 */ @SuppressWarnings({"unchecked", "cast"}) public boolean subtype(TypeDecl type) { Object _parameters = type; if(subtype_TypeDecl_values == null) subtype_TypeDecl_values = new java.util.HashMap(4); ASTNode$State.CircularValue _value; if(subtype_TypeDecl_values.containsKey(_parameters)) { Object _o = subtype_TypeDecl_values.get(_parameters); if(!(_o instanceof ASTNode$State.CircularValue)) { return ((Boolean)_o).booleanValue(); } else _value = (ASTNode$State.CircularValue)_o; } else { _value = new ASTNode$State.CircularValue(); subtype_TypeDecl_values.put(_parameters, _value); _value.value = Boolean.valueOf(true); } ASTNode$State state = state(); if (!state.IN_CIRCLE) { state.IN_CIRCLE = true; int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); boolean new_subtype_TypeDecl_value; do { _value.visited = new Integer(state.CIRCLE_INDEX); state.CHANGE = false; new_subtype_TypeDecl_value = subtype_compute(type); if (new_subtype_TypeDecl_value!=((Boolean)_value.value).booleanValue()) { state.CHANGE = true; _value.value = Boolean.valueOf(new_subtype_TypeDecl_value); } state.CIRCLE_INDEX++; } while (state.CHANGE); if(isFinal && num == state().boundariesCrossed) { subtype_TypeDecl_values.put(_parameters, new_subtype_TypeDecl_value); } else { subtype_TypeDecl_values.remove(_parameters); state.RESET_CYCLE = true; subtype_compute(type); state.RESET_CYCLE = false; } state.IN_CIRCLE = false; return new_subtype_TypeDecl_value; } if(!new Integer(state.CIRCLE_INDEX).equals(_value.visited)) { _value.visited = new Integer(state.CIRCLE_INDEX); boolean new_subtype_TypeDecl_value = subtype_compute(type); if (state.RESET_CYCLE) { subtype_TypeDecl_values.remove(_parameters); } else if (new_subtype_TypeDecl_value!=((Boolean)_value.value).booleanValue()) { state.CHANGE = true; _value.value = new_subtype_TypeDecl_value; } return new_subtype_TypeDecl_value; } return ((Boolean)_value.value).booleanValue(); } /** * @apilevel internal */ private boolean subtype_compute(TypeDecl type) { return type.supertypeLUBType(this); } /** * @attribute syn * @aspect GenericsSubtype * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericsSubtype.jrag:421 */ public boolean supertypeClassDecl(ClassDecl type) { ASTNode$State state = state(); try { return type.subtype(lub()); } finally { } } /** * @attribute syn * @aspect GenericsSubtype * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericsSubtype.jrag:437 */ public boolean supertypeInterfaceDecl(InterfaceDecl type) { ASTNode$State state = state(); try { return type.subtype(lub()); } finally { } } /** * @attribute syn * @aspect GenericsSubtype * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericsSubtype.jrag:366 */ public boolean supertypeGLBType(GLBType type) { ASTNode$State state = state(); try { ArrayList bounds = new ArrayList(getNumTypeBound()); for (int i = 0; i < getNumTypeBound(); i++) { bounds.add(getTypeBound(i)); } return type == lookupGLBType(bounds); } finally { } } /** * @apilevel internal */ protected boolean getSootClassDecl_computed = false; /** * @apilevel internal */ protected SootClass getSootClassDecl_value; /** * @attribute syn * @aspect GenericsCodegen * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/Jimple1.5Backend/GenericsCodegen.jrag:422 */ @SuppressWarnings({"unchecked", "cast"}) public SootClass getSootClassDecl() { if(getSootClassDecl_computed) { return getSootClassDecl_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); getSootClassDecl_value = getSootClassDecl_compute(); if(isFinal && num == state().boundariesCrossed) getSootClassDecl_computed = true; return getSootClassDecl_value; } /** * @apilevel internal */ private SootClass getSootClassDecl_compute() { return typeObject().getSootClassDecl(); } /** * @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); } }
27,877
29.872647
255
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/LabeledStmt.java
/* This file was generated with JastAdd2 (http://jastadd.org) version R20130212 (r1031) */ package soot.JastAddJ; import java.util.HashSet; 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; /** * @production LabeledStmt : {@link BranchTargetStmt} ::= <span class="component">&lt;Label:String&gt;</span> <span class="component">{@link Stmt}</span>; * @ast node * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/java.ast:199 */ public class LabeledStmt extends BranchTargetStmt implements Cloneable { /** * @apilevel low-level */ public void flushCache() { super.flushCache(); targetOf_ContinueStmt_values = null; targetOf_BreakStmt_values = null; isDAafter_Variable_values = null; isDUafter_Variable_values = null; canCompleteNormally_computed = false; label_computed = false; label_value = null; end_label_computed = false; end_label_value = null; lookupLabel_String_values = null; } /** * @apilevel internal */ public void flushCollectionCache() { super.flushCollectionCache(); } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public LabeledStmt clone() throws CloneNotSupportedException { LabeledStmt node = (LabeledStmt)super.clone(); node.targetOf_ContinueStmt_values = null; node.targetOf_BreakStmt_values = null; node.isDAafter_Variable_values = null; node.isDUafter_Variable_values = null; node.canCompleteNormally_computed = false; node.label_computed = false; node.label_value = null; node.end_label_computed = false; node.end_label_value = null; node.lookupLabel_String_values = null; node.in$Circle(false); node.is$Final(false); return node; } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public LabeledStmt copy() { try { LabeledStmt node = (LabeledStmt) clone(); node.parent = null; if(children != null) node.children = (ASTNode[]) children.clone(); return node; } catch (CloneNotSupportedException e) { throw new Error("Error: clone not supported for " + getClass().getName()); } } /** * Create a deep copy of the AST subtree at this node. * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level */ @SuppressWarnings({"unchecked", "cast"}) public LabeledStmt fullCopy() { LabeledStmt tree = (LabeledStmt) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) children[i]; if(child != null) { child = child.fullCopy(); tree.setChild(child, i); } } } return tree; } /** * @ast method * @aspect NameCheck * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/NameCheck.jrag:356 */ public void nameCheck() { LabeledStmt stmt = lookupLabel(getLabel()); if(stmt != null) { if(stmt.enclosingBodyDecl() == enclosingBodyDecl()) { error("Labels can not shadow labels in the same member"); } } } /** * @ast method * @aspect PrettyPrint * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/PrettyPrint.jadd:542 */ public void toString(StringBuffer s) { s.append(indent()); s.append(getLabel() + ":"); getStmt().toString(s); } /** * @ast method * @aspect Statements * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/Statements.jrag:25 */ public void jimplify2(Body b) { b.setLine(this); b.addLabel(label()); getStmt().jimplify2(b); b.addLabel(end_label()); } /** * @ast method * */ public LabeledStmt() { super(); } /** * Initializes the child array to the correct size. * Initializes List and Opt nta children. * @apilevel internal * @ast method * @ast method * */ public void init$Children() { children = new ASTNode[1]; } /** * @ast method * */ public LabeledStmt(String p0, Stmt p1) { setLabel(p0); setChild(p1, 0); } /** * @ast method * */ public LabeledStmt(beaver.Symbol p0, Stmt p1) { setLabel(p0); setChild(p1, 0); } /** * @apilevel low-level * @ast method * */ protected int numChildren() { return 1; } /** * @apilevel internal * @ast method * */ public boolean mayHaveRewrite() { return false; } /** * Replaces the lexeme Label. * @param value The new value for the lexeme Label. * @apilevel high-level * @ast method * */ public void setLabel(String value) { tokenString_Label = value; } /** * @apilevel internal * @ast method * */ /** * @apilevel internal */ protected String tokenString_Label; /** * @ast method * */ public int Labelstart; /** * @ast method * */ public int Labelend; /** * JastAdd-internal setter for lexeme Label using the Beaver parser. * @apilevel internal * @ast method * */ public void setLabel(beaver.Symbol symbol) { if(symbol.value != null && !(symbol.value instanceof String)) throw new UnsupportedOperationException("setLabel is only valid for String lexemes"); tokenString_Label = (String)symbol.value; Labelstart = symbol.getStart(); Labelend = symbol.getEnd(); } /** * Retrieves the value for the lexeme Label. * @return The value for the lexeme Label. * @apilevel high-level * @ast method * */ public String getLabel() { return tokenString_Label != null ? tokenString_Label : ""; } /** * Replaces the Stmt child. * @param node The new node to replace the Stmt child. * @apilevel high-level * @ast method * */ public void setStmt(Stmt node) { setChild(node, 0); } /** * Retrieves the Stmt child. * @return The current node used as the Stmt child. * @apilevel high-level * @ast method * */ public Stmt getStmt() { return (Stmt)getChild(0); } /** * Retrieves the Stmt child. * <p><em>This method does not invoke AST transformations.</em></p> * @return The current node used as the Stmt child. * @apilevel low-level * @ast method * */ public Stmt getStmtNoTransform() { return (Stmt)getChildNoTransform(0); } protected java.util.Map targetOf_ContinueStmt_values; /** * @attribute syn * @aspect BranchTarget * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/BranchTarget.jrag:67 */ @SuppressWarnings({"unchecked", "cast"}) public boolean targetOf(ContinueStmt stmt) { Object _parameters = stmt; if(targetOf_ContinueStmt_values == null) targetOf_ContinueStmt_values = new java.util.HashMap(4); if(targetOf_ContinueStmt_values.containsKey(_parameters)) { return ((Boolean)targetOf_ContinueStmt_values.get(_parameters)).booleanValue(); } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); boolean targetOf_ContinueStmt_value = targetOf_compute(stmt); if(isFinal && num == state().boundariesCrossed) targetOf_ContinueStmt_values.put(_parameters, Boolean.valueOf(targetOf_ContinueStmt_value)); return targetOf_ContinueStmt_value; } /** * @apilevel internal */ private boolean targetOf_compute(ContinueStmt stmt) { return stmt.hasLabel() && stmt.getLabel().equals(getLabel()); } protected java.util.Map targetOf_BreakStmt_values; /** * @attribute syn * @aspect BranchTarget * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/BranchTarget.jrag:74 */ @SuppressWarnings({"unchecked", "cast"}) public boolean targetOf(BreakStmt stmt) { Object _parameters = stmt; if(targetOf_BreakStmt_values == null) targetOf_BreakStmt_values = new java.util.HashMap(4); if(targetOf_BreakStmt_values.containsKey(_parameters)) { return ((Boolean)targetOf_BreakStmt_values.get(_parameters)).booleanValue(); } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); boolean targetOf_BreakStmt_value = targetOf_compute(stmt); if(isFinal && num == state().boundariesCrossed) targetOf_BreakStmt_values.put(_parameters, Boolean.valueOf(targetOf_BreakStmt_value)); return targetOf_BreakStmt_value; } /** * @apilevel internal */ private boolean targetOf_compute(BreakStmt stmt) { return stmt.hasLabel() && stmt.getLabel().equals(getLabel()); } protected java.util.Map isDAafter_Variable_values; /** * @attribute syn * @aspect DA * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DefiniteAssignment.jrag:511 */ @SuppressWarnings({"unchecked", "cast"}) public boolean isDAafter(Variable v) { Object _parameters = v; if(isDAafter_Variable_values == null) isDAafter_Variable_values = new java.util.HashMap(4); if(isDAafter_Variable_values.containsKey(_parameters)) { return ((Boolean)isDAafter_Variable_values.get(_parameters)).booleanValue(); } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); boolean isDAafter_Variable_value = isDAafter_compute(v); if(isFinal && num == state().boundariesCrossed) isDAafter_Variable_values.put(_parameters, Boolean.valueOf(isDAafter_Variable_value)); return isDAafter_Variable_value; } /** * @apilevel internal */ private boolean isDAafter_compute(Variable v) { if(!getStmt().isDAafter(v)) return false; for(Iterator iter = targetBreaks().iterator(); iter.hasNext(); ) { BreakStmt stmt = (BreakStmt)iter.next(); if(!stmt.isDAafterReachedFinallyBlocks(v)) return false; } return true; } protected java.util.Map isDUafter_Variable_values; /** * @attribute syn * @aspect DU * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DefiniteAssignment.jrag:894 */ @SuppressWarnings({"unchecked", "cast"}) public boolean isDUafter(Variable v) { Object _parameters = v; if(isDUafter_Variable_values == null) isDUafter_Variable_values = new java.util.HashMap(4); if(isDUafter_Variable_values.containsKey(_parameters)) { return ((Boolean)isDUafter_Variable_values.get(_parameters)).booleanValue(); } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); boolean isDUafter_Variable_value = isDUafter_compute(v); if(isFinal && num == state().boundariesCrossed) isDUafter_Variable_values.put(_parameters, Boolean.valueOf(isDUafter_Variable_value)); return isDUafter_Variable_value; } /** * @apilevel internal */ private boolean isDUafter_compute(Variable v) { if(!getStmt().isDUafter(v)) return false; for(Iterator iter = targetBreaks().iterator(); iter.hasNext(); ) { BreakStmt stmt = (BreakStmt)iter.next(); if(!stmt.isDUafterReachedFinallyBlocks(v)) return false; } return true; } /** * @apilevel internal */ protected boolean canCompleteNormally_computed = false; /** * @apilevel internal */ protected boolean canCompleteNormally_value; /** * @attribute syn * @aspect UnreachableStatements * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/UnreachableStatements.jrag:46 */ @SuppressWarnings({"unchecked", "cast"}) public boolean canCompleteNormally() { if(canCompleteNormally_computed) { return canCompleteNormally_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); canCompleteNormally_value = canCompleteNormally_compute(); if(isFinal && num == state().boundariesCrossed) canCompleteNormally_computed = true; return canCompleteNormally_value; } /** * @apilevel internal */ private boolean canCompleteNormally_compute() { return getStmt().canCompleteNormally() || reachableBreak(); } /** * @apilevel internal */ protected boolean label_computed = false; /** * @apilevel internal */ protected soot.jimple.Stmt label_value; /** * @attribute syn * @aspect Statements * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/Statements.jrag:23 */ @SuppressWarnings({"unchecked", "cast"}) public soot.jimple.Stmt label() { if(label_computed) { return label_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); label_value = label_compute(); if(isFinal && num == state().boundariesCrossed) label_computed = true; return label_value; } /** * @apilevel internal */ private soot.jimple.Stmt label_compute() { return newLabel(); } /** * @apilevel internal */ protected boolean end_label_computed = false; /** * @apilevel internal */ protected soot.jimple.Stmt end_label_value; /** * @attribute syn * @aspect Statements * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/Statements.jrag:24 */ @SuppressWarnings({"unchecked", "cast"}) public soot.jimple.Stmt end_label() { if(end_label_computed) { return end_label_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); end_label_value = end_label_compute(); if(isFinal && num == state().boundariesCrossed) end_label_computed = true; return end_label_value; } /** * @apilevel internal */ private soot.jimple.Stmt end_label_compute() { return newLabel(); } /** * @attribute syn * @aspect Statements * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/Statements.jrag:200 */ public soot.jimple.Stmt break_label() { ASTNode$State state = state(); try { return end_label(); } finally { } } /** * @attribute syn * @aspect Statements * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/Statements.jrag:225 */ public soot.jimple.Stmt continue_label() { ASTNode$State state = state(); try { return getStmt().continue_label(); } finally { } } /** * @attribute syn * @aspect PreciseRethrow * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/PreciseRethrow.jrag:55 */ public boolean modifiedInScope(Variable var) { ASTNode$State state = state(); try { return getStmt().modifiedInScope(var); } finally { } } protected java.util.Map lookupLabel_String_values; /** * @attribute inh * @aspect BranchTarget * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/BranchTarget.jrag:170 */ @SuppressWarnings({"unchecked", "cast"}) public LabeledStmt lookupLabel(String name) { Object _parameters = name; if(lookupLabel_String_values == null) lookupLabel_String_values = new java.util.HashMap(4); if(lookupLabel_String_values.containsKey(_parameters)) { return (LabeledStmt)lookupLabel_String_values.get(_parameters); } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); LabeledStmt lookupLabel_String_value = getParent().Define_LabeledStmt_lookupLabel(this, null, name); if(isFinal && num == state().boundariesCrossed) lookupLabel_String_values.put(_parameters, lookupLabel_String_value); return lookupLabel_String_value; } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/BranchTarget.jrag:171 * @apilevel internal */ public LabeledStmt Define_LabeledStmt_lookupLabel(ASTNode caller, ASTNode child, String name) { if(caller == getStmtNoTransform()) { return name.equals(getLabel()) ? this : lookupLabel(name); } else { return getParent().Define_LabeledStmt_lookupLabel(this, caller, name); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DefiniteAssignment.jrag:510 * @apilevel internal */ public boolean Define_boolean_isDAbefore(ASTNode caller, ASTNode child, Variable v) { if(caller == getStmtNoTransform()) { return isDAbefore(v); } else { return getParent().Define_boolean_isDAbefore(this, caller, v); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DefiniteAssignment.jrag:893 * @apilevel internal */ public boolean Define_boolean_isDUbefore(ASTNode caller, ASTNode child, Variable v) { if(caller == getStmtNoTransform()) { return isDUbefore(v); } else { return getParent().Define_boolean_isDUbefore(this, caller, v); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/UnreachableStatements.jrag:47 * @apilevel internal */ public boolean Define_boolean_reachable(ASTNode caller, ASTNode child) { if(caller == getStmtNoTransform()) { return reachable(); } else { return getParent().Define_boolean_reachable(this, caller); } } /** * @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); } }
17,934
29.816151
154
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/List.java
/* This file was generated with JastAdd2 (http://jastadd.org) version R20130212 (r1031) */ package soot.JastAddJ; import java.util.HashSet; 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; /** * @production List : {@link ASTNode}; * @ast node * */ public class List<T extends ASTNode> extends ASTNode<T> implements Cloneable { /** * @apilevel low-level */ public void flushCache() { super.flushCache(); } /** * @apilevel internal */ public void flushCollectionCache() { super.flushCollectionCache(); } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public List<T> clone() throws CloneNotSupportedException { List node = (List)super.clone(); node.in$Circle(false); node.is$Final(false); return node; } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public List<T> copy() { try { List node = (List) clone(); node.parent = null; if(children != null) node.children = (ASTNode[]) children.clone(); return node; } catch (CloneNotSupportedException e) { throw new Error("Error: clone not supported for " + getClass().getName()); } } /** * Create a deep copy of the AST subtree at this node. * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level */ @SuppressWarnings({"unchecked", "cast"}) public List<T> fullCopy() { List tree = (List) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) children[i]; if(child != null) { child = child.fullCopy(); tree.setChild(child, i); } } } return tree; } /** * @ast method * @aspect LookupParTypeDecl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:977 */ public List substitute(Parameterization parTypeDecl) { List list = new List(); for(int i = 0; i < getNumChild(); i++) { ASTNode node = getChild(i); if(node instanceof Access) { Access a = (Access)node; list.add(a.type().substitute(parTypeDecl)); } else if(node instanceof VariableArityParameterDeclaration) { VariableArityParameterDeclaration p = (VariableArityParameterDeclaration)node; list.add( new VariableArityParameterDeclarationSubstituted( (Modifiers)p.getModifiers().fullCopy(), // use the type acces since VariableArity adds to the dimension p.getTypeAccess().type().substituteParameterType(parTypeDecl), p.getID(), p ) ); } else if(node instanceof ParameterDeclaration) { ParameterDeclaration p = (ParameterDeclaration)node; list.add( new ParameterDeclarationSubstituted( (Modifiers)p.getModifiers().fullCopy(), p.type().substituteParameterType(parTypeDecl), p.getID(), p ) ); } else { throw new Error("Can only substitute lists of access nodes but node number " + i + " is of type " + node.getClass().getName()); } } return list; } /** * @ast method * */ public List() { super(); } /** * Initializes the child array to the correct size. * Initializes List and Opt nta children. * @apilevel internal * @ast method * @ast method * */ public void init$Children() { } /** * @ast method * */ public List<T> add(T node) { addChild(node); return this; } /** * @ast method * */ public void insertChild(ASTNode node, int i) { list$touched = true; super.insertChild(node, i); } /** * @ast method * */ public void addChild(T node) { list$touched = true; super.addChild(node); } /** * @apilevel low-level * @ast method * */ public void removeChild(int i) { list$touched = true; super.removeChild(i); } /** * @ast method * */ public int getNumChild() { if(list$touched) { for(int i = 0; i < getNumChildNoTransform(); i++) getChild(i); list$touched = false; } return getNumChildNoTransform(); } /** * @ast method * */ private boolean list$touched = true; /** * @apilevel internal * @ast method * */ public boolean mayHaveRewrite() { return true; } /** * @attribute syn * @aspect ImplicitConstructor * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupConstructor.jrag:158 */ public boolean requiresDefaultConstructor() { ASTNode$State state = state(); try { if(getParent() instanceof ClassDecl) { ClassDecl c = (ClassDecl)getParent(); return c.noConstructor() && c.getBodyDeclListNoTransform() == this && !(c instanceof AnonymousDecl); } return false; } finally { } } /** * @attribute syn * @aspect BooleanExpressions * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/BooleanExpressions.jrag:21 */ public boolean definesLabel() { ASTNode$State state = state(); try { return getParent().definesLabel(); } finally { } } /** * @apilevel internal */ public ASTNode rewriteTo() { if(list$touched) { for(int i = 0 ; i < getNumChildNoTransform(); i++) getChild(i); list$touched = false; return this; } // Declared in /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupConstructor.jrag at line 186 if(requiresDefaultConstructor()) { state().duringImplicitConstructor++; ASTNode result = rewriteRule0(); state().duringImplicitConstructor--; return result; } return super.rewriteTo(); } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupConstructor.jrag:186 * @apilevel internal */ private List rewriteRule0() { { ClassDecl c = (ClassDecl)getParent(); Modifiers m = new Modifiers(); if(c.isPublic()) m.addModifier(new Modifier("public")); else if(c.isProtected()) m.addModifier(new Modifier("protected")); else if(c.isPrivate()) m.addModifier(new Modifier("private")); ConstructorDecl constructor = new ConstructorDecl( m, c.name(), new List(), new List(), new Opt(), new Block() ); constructor.setDefaultConstructor(); c.addBodyDecl(constructor); return this; } } }
7,093
24.702899
135
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/Literal.java
/* This file was generated with JastAdd2 (http://jastadd.org) version R20130212 (r1031) */ package soot.JastAddJ; import java.util.HashSet; 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; /** * The abstract base class for all literals. * @production Literal : {@link PrimaryExpr} ::= <span class="component">&lt;LITERAL:String&gt;</span>; * @ast node * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/Literals.ast:4 */ public abstract class Literal extends PrimaryExpr implements Cloneable { /** * @apilevel low-level */ public void flushCache() { super.flushCache(); constant_computed = false; constant_value = null; } /** * @apilevel internal */ public void flushCollectionCache() { super.flushCollectionCache(); } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public Literal clone() throws CloneNotSupportedException { Literal node = (Literal)super.clone(); node.constant_computed = false; node.constant_value = null; node.in$Circle(false); node.is$Final(false); return node; } /** * @ast method * @aspect BytecodeCONSTANT * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/BytecodeCONSTANT.jrag:75 */ public static Literal buildBooleanLiteral(boolean value) { return new BooleanLiteral(value ? "true" : "false"); } /** * @ast method * @aspect BytecodeCONSTANT * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/BytecodeCONSTANT.jrag:79 */ public static Literal buildStringLiteral(String value) { return new StringLiteral(value); } /** * @ast method * @aspect PrettyPrint * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/PrettyPrint.jadd:263 */ public void toString(StringBuffer s) { s.append(getLITERAL()); } /** * @ast method * @aspect PrettyPrint * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/PrettyPrint.jadd:290 */ protected static String escape(String s) { StringBuffer result = new StringBuffer(); for (int i=0; i < s.length(); i++) { switch(s.charAt(i)) { case '\b' : result.append("\\b"); break; case '\t' : result.append("\\t"); break; case '\n' : result.append("\\n"); break; case '\f' : result.append("\\f"); break; case '\r' : result.append("\\r"); break; case '\"' : result.append("\\\""); break; case '\'' : result.append("\\\'"); break; case '\\' : result.append("\\\\"); break; default: int value = (int)s.charAt(i); if(value < 0x20 || (value > 0x7e)) result.append(asEscape(value)); else result.append(s.charAt(i)); } } return result.toString(); } /** * @ast method * @aspect PrettyPrint * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/PrettyPrint.jadd:312 */ protected static String asEscape(int value) { StringBuffer s = new StringBuffer("\\u"); String hex = Integer.toHexString(value); for(int i = 0; i < 4-hex.length(); i++) s.append("0"); s.append(hex); return s.toString(); } /** * @ast method * */ public Literal() { super(); } /** * Initializes the child array to the correct size. * Initializes List and Opt nta children. * @apilevel internal * @ast method * @ast method * */ public void init$Children() { } /** * @ast method * */ public Literal(String p0) { setLITERAL(p0); } /** * @ast method * */ public Literal(beaver.Symbol p0) { setLITERAL(p0); } /** * @apilevel low-level * @ast method * */ protected int numChildren() { return 0; } /** * @apilevel internal * @ast method * */ public boolean mayHaveRewrite() { return false; } /** * Replaces the lexeme LITERAL. * @param value The new value for the lexeme LITERAL. * @apilevel high-level * @ast method * */ public void setLITERAL(String value) { tokenString_LITERAL = value; } /** * @apilevel internal * @ast method * */ /** * @apilevel internal */ protected String tokenString_LITERAL; /** * @ast method * */ public int LITERALstart; /** * @ast method * */ public int LITERALend; /** * JastAdd-internal setter for lexeme LITERAL using the Beaver parser. * @apilevel internal * @ast method * */ 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(); } /** * Retrieves the value for the lexeme LITERAL. * @return The value for the lexeme LITERAL. * @apilevel high-level * @ast method * */ public String getLITERAL() { return tokenString_LITERAL != null ? tokenString_LITERAL : ""; } /** * @return a fresh double literal representing the given value * @ast method * @aspect Literals * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/Literals.jrag:50 */ public static Literal buildDoubleLiteral(double value) { String digits = Double.toString(value); NumericLiteral lit = new DoubleLiteral(digits); lit.setDigits(digits); lit.setKind(NumericLiteral.DECIMAL); return lit; } /** * @return a fresh float literal representing the given value * @ast method * @aspect Literals * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/Literals.jrag:62 */ public static Literal buildFloatLiteral(float value) { String digits = Float.toString(value); NumericLiteral lit = new FloatingPointLiteral(digits); lit.setDigits(digits); lit.setKind(NumericLiteral.DECIMAL); return lit; } /** * @return a fresh integer literal representing the given value * @ast method * @aspect Literals * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/Literals.jrag:74 */ public static Literal buildIntegerLiteral(int value) { String digits = Integer.toHexString(value); NumericLiteral lit = new IntegerLiteral("0x"+digits); lit.setDigits(digits.toLowerCase()); lit.setKind(NumericLiteral.HEXADECIMAL); return lit; } /** * @return a fresh long literal representing the given value * @ast method * @aspect Literals * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/Literals.jrag:86 */ public static Literal buildLongLiteral(long value) { String digits = Long.toHexString(value); NumericLiteral lit = new LongLiteral("0x"+digits); lit.setDigits(digits.toLowerCase()); lit.setKind(NumericLiteral.HEXADECIMAL); return lit; } /** * @apilevel internal */ protected boolean constant_computed = false; /** * @apilevel internal */ protected Constant constant_value; /** * @attribute syn * @aspect ConstantExpression * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/ConstantExpression.jrag:96 */ @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; } /** * @apilevel internal */ private Constant constant_compute() { throw new UnsupportedOperationException("ConstantExpression operation constant" + " not supported for type " + getClass().getName()); } /** * @attribute syn * @aspect ConstantExpression * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/ConstantExpression.jrag:336 */ public boolean isConstant() { ASTNode$State state = state(); try { return true; } finally { } } /** * @attribute syn * @aspect PrettyPrint * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/PrettyPrint.jadd:800 */ public String dumpString() { ASTNode$State state = state(); try { return getClass().getName() + " [" + getLITERAL() + "]"; } finally { } } /** * @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); } }
9,121
26.229851
111
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/LocalClassDeclStmt.java
/* This file was generated with JastAdd2 (http://jastadd.org) version R20130212 (r1031) */ package soot.JastAddJ; import java.util.HashSet; 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; /** * @production LocalClassDeclStmt : {@link Stmt} ::= <span class="component">{@link ClassDecl}</span>; * @ast node * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/java.ast:223 */ public class LocalClassDeclStmt extends Stmt implements Cloneable { /** * @apilevel low-level */ public void flushCache() { super.flushCache(); isDAafter_Variable_values = null; isDUafter_Variable_values = null; canCompleteNormally_computed = false; } /** * @apilevel internal */ public void flushCollectionCache() { super.flushCollectionCache(); } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public LocalClassDeclStmt clone() throws CloneNotSupportedException { LocalClassDeclStmt node = (LocalClassDeclStmt)super.clone(); node.isDAafter_Variable_values = null; node.isDUafter_Variable_values = null; node.canCompleteNormally_computed = false; node.in$Circle(false); node.is$Final(false); return node; } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public LocalClassDeclStmt copy() { try { LocalClassDeclStmt node = (LocalClassDeclStmt) clone(); node.parent = null; if(children != null) node.children = (ASTNode[]) children.clone(); return node; } catch (CloneNotSupportedException e) { throw new Error("Error: clone not supported for " + getClass().getName()); } } /** * Create a deep copy of the AST subtree at this node. * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level */ @SuppressWarnings({"unchecked", "cast"}) public LocalClassDeclStmt fullCopy() { LocalClassDeclStmt tree = (LocalClassDeclStmt) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) children[i]; if(child != null) { child = child.fullCopy(); tree.setChild(child, i); } } } return tree; } /** * @ast method * @aspect PrettyPrint * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/PrettyPrint.jadd:740 */ public void toString(StringBuffer s) { getClassDecl().toString(s); } /** * @ast method * @aspect Statements * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/Statements.jrag:534 */ public void jimplify2(Body b) { } /** * @ast method * */ public LocalClassDeclStmt() { super(); } /** * Initializes the child array to the correct size. * Initializes List and Opt nta children. * @apilevel internal * @ast method * @ast method * */ public void init$Children() { children = new ASTNode[1]; } /** * @ast method * */ public LocalClassDeclStmt(ClassDecl p0) { setChild(p0, 0); } /** * @apilevel low-level * @ast method * */ protected int numChildren() { return 1; } /** * @apilevel internal * @ast method * */ public boolean mayHaveRewrite() { return false; } /** * Replaces the ClassDecl child. * @param node The new node to replace the ClassDecl child. * @apilevel high-level * @ast method * */ public void setClassDecl(ClassDecl node) { setChild(node, 0); } /** * Retrieves the ClassDecl child. * @return The current node used as the ClassDecl child. * @apilevel high-level * @ast method * */ public ClassDecl getClassDecl() { return (ClassDecl)getChild(0); } /** * Retrieves the ClassDecl child. * <p><em>This method does not invoke AST transformations.</em></p> * @return The current node used as the ClassDecl child. * @apilevel low-level * @ast method * */ public ClassDecl getClassDeclNoTransform() { return (ClassDecl)getChildNoTransform(0); } protected java.util.Map isDAafter_Variable_values; /** * @attribute syn * @aspect DA * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DefiniteAssignment.jrag:490 */ @SuppressWarnings({"unchecked", "cast"}) public boolean isDAafter(Variable v) { Object _parameters = v; if(isDAafter_Variable_values == null) isDAafter_Variable_values = new java.util.HashMap(4); if(isDAafter_Variable_values.containsKey(_parameters)) { return ((Boolean)isDAafter_Variable_values.get(_parameters)).booleanValue(); } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); boolean isDAafter_Variable_value = isDAafter_compute(v); if(isFinal && num == state().boundariesCrossed) isDAafter_Variable_values.put(_parameters, Boolean.valueOf(isDAafter_Variable_value)); return isDAafter_Variable_value; } /** * @apilevel internal */ private boolean isDAafter_compute(Variable v) { return isDAbefore(v); } protected java.util.Map isDUafter_Variable_values; /** * @attribute syn * @aspect DU * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DefiniteAssignment.jrag:873 */ @SuppressWarnings({"unchecked", "cast"}) public boolean isDUafter(Variable v) { Object _parameters = v; if(isDUafter_Variable_values == null) isDUafter_Variable_values = new java.util.HashMap(4); if(isDUafter_Variable_values.containsKey(_parameters)) { return ((Boolean)isDUafter_Variable_values.get(_parameters)).booleanValue(); } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); boolean isDUafter_Variable_value = isDUafter_compute(v); if(isFinal && num == state().boundariesCrossed) isDUafter_Variable_values.put(_parameters, Boolean.valueOf(isDUafter_Variable_value)); return isDUafter_Variable_value; } /** * @apilevel internal */ private boolean isDUafter_compute(Variable v) { return isDUbefore(v); } /** * @apilevel internal */ protected boolean canCompleteNormally_computed = false; /** * @apilevel internal */ protected boolean canCompleteNormally_value; /** * @attribute syn * @aspect UnreachableStatements * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/UnreachableStatements.jrag:40 */ @SuppressWarnings({"unchecked", "cast"}) public boolean canCompleteNormally() { if(canCompleteNormally_computed) { return canCompleteNormally_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); canCompleteNormally_value = canCompleteNormally_compute(); if(isFinal && num == state().boundariesCrossed) canCompleteNormally_computed = true; return canCompleteNormally_value; } /** * @apilevel internal */ private boolean canCompleteNormally_compute() { return reachable(); } /** * @attribute syn * @aspect PreciseRethrow * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/PreciseRethrow.jrag:55 */ public boolean modifiedInScope(Variable var) { ASTNode$State state = state(); try { return false; } finally { } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeAnalysis.jrag:543 * @apilevel internal */ public boolean Define_boolean_isLocalClass(ASTNode caller, ASTNode child) { if(caller == getClassDeclNoTransform()) { return true; } else { return getParent().Define_boolean_isLocalClass(this, caller); } } /** * @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); } }
8,363
28.244755
140
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/LogNotExpr.java
/* This file was generated with JastAdd2 (http://jastadd.org) version R20130212 (r1031) */ package soot.JastAddJ; import java.util.HashSet; 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; /** * @production LogNotExpr : {@link Unary}; * @ast node * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/java.ast:142 */ public class LogNotExpr extends Unary implements Cloneable { /** * @apilevel low-level */ public void flushCache() { super.flushCache(); type_computed = false; type_value = null; } /** * @apilevel internal */ public void flushCollectionCache() { super.flushCollectionCache(); } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public LogNotExpr clone() throws CloneNotSupportedException { LogNotExpr node = (LogNotExpr)super.clone(); node.type_computed = false; node.type_value = null; node.in$Circle(false); node.is$Final(false); return node; } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public LogNotExpr copy() { try { LogNotExpr node = (LogNotExpr) clone(); node.parent = null; if(children != null) node.children = (ASTNode[]) children.clone(); return node; } catch (CloneNotSupportedException e) { throw new Error("Error: clone not supported for " + getClass().getName()); } } /** * Create a deep copy of the AST subtree at this node. * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level */ @SuppressWarnings({"unchecked", "cast"}) public LogNotExpr fullCopy() { LogNotExpr tree = (LogNotExpr) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) children[i]; if(child != null) { child = child.fullCopy(); tree.setChild(child, i); } } } return tree; } /** * @ast method * @aspect TypeCheck * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeCheck.jrag:287 */ public void typeCheck() { if(!getOperand().type().isBoolean()) error("unary ! only operates on boolean types"); } /** * @ast method * @aspect BooleanExpressions * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/BooleanExpressions.jrag:103 */ public soot.Value eval(Body b) { return emitBooleanCondition(b); } /** * @ast method * @aspect BooleanExpressions * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/BooleanExpressions.jrag:182 */ public void emitEvalBranch(Body b) { getOperand().emitEvalBranch(b); } /** * @ast method * */ public LogNotExpr() { super(); } /** * Initializes the child array to the correct size. * Initializes List and Opt nta children. * @apilevel internal * @ast method * @ast method * */ public void init$Children() { children = new ASTNode[1]; } /** * @ast method * */ public LogNotExpr(Expr p0) { setChild(p0, 0); } /** * @apilevel low-level * @ast method * */ protected int numChildren() { return 1; } /** * @apilevel internal * @ast method * */ public boolean mayHaveRewrite() { return false; } /** * Replaces the Operand child. * @param node The new node to replace the Operand child. * @apilevel high-level * @ast method * */ public void setOperand(Expr node) { setChild(node, 0); } /** * Retrieves the Operand child. * @return The current node used as the Operand child. * @apilevel high-level * @ast method * */ public Expr getOperand() { return (Expr)getChild(0); } /** * Retrieves the Operand child. * <p><em>This method does not invoke AST transformations.</em></p> * @return The current node used as the Operand child. * @apilevel low-level * @ast method * */ public Expr getOperandNoTransform() { return (Expr)getChildNoTransform(0); } /** * @attribute syn * @aspect ConstantExpression * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/ConstantExpression.jrag:336 */ public boolean isConstant() { ASTNode$State state = state(); try { return getOperand().isConstant(); } finally { } } /** * @attribute syn * @aspect ConstantExpression * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/ConstantExpression.jrag:91 */ public Constant constant() { ASTNode$State state = state(); try { return Constant.create(!getOperand().constant().booleanValue()); } finally { } } /*eq Stmt.isDAafter(Variable v) { //System.out.println("### isDAafter reached in " + getClass().getName()); //throw new NullPointerException(); throw new Error("Can not compute isDAafter for " + getClass().getName() + " at " + errorPrefix()); }* @attribute syn * @aspect DA * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DefiniteAssignment.jrag:332 */ public boolean isDAafterTrue(Variable v) { ASTNode$State state = state(); try { return getOperand().isDAafterFalse(v) || isFalse(); } finally { } } /** * @attribute syn * @aspect DA * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DefiniteAssignment.jrag:333 */ public boolean isDAafterFalse(Variable v) { ASTNode$State state = state(); try { return getOperand().isDAafterTrue(v) || isTrue(); } finally { } } /** * @attribute syn * @aspect DA * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DefiniteAssignment.jrag:235 */ public boolean isDAafter(Variable v) { ASTNode$State state = state(); try { return isDAafterTrue(v) && isDAafterFalse(v); } finally { } } /** * @attribute syn * @aspect DU * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DefiniteAssignment.jrag:702 */ public boolean isDUafterTrue(Variable v) { ASTNode$State state = state(); try { return getOperand().isDUafterFalse(v); } finally { } } /** * @attribute syn * @aspect DU * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DefiniteAssignment.jrag:703 */ public boolean isDUafterFalse(Variable v) { ASTNode$State state = state(); try { return getOperand().isDUafterTrue(v); } finally { } } /** * @attribute syn * @aspect DU * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DefiniteAssignment.jrag:694 */ public boolean isDUafter(Variable v) { ASTNode$State state = state(); try { return isDUafterTrue(v) && isDUafterFalse(v); } finally { } } /** * @attribute syn * @aspect PrettyPrint * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/PrettyPrint.jadd:376 */ public String printPreOp() { ASTNode$State state = state(); try { return "!"; } finally { } } /** * @apilevel internal */ protected boolean type_computed = false; /** * @apilevel internal */ protected TypeDecl type_value; /** * @attribute syn * @aspect TypeAnalysis * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeAnalysis.jrag:318 */ @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; } /** * @apilevel internal */ private TypeDecl type_compute() { return typeBoolean(); } /** * @attribute syn * @aspect BooleanExpressions * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/BooleanExpressions.jrag:21 */ public boolean definesLabel() { ASTNode$State state = state(); try { return true; } finally { } } /** * @attribute syn * @aspect BooleanExpressions * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/BooleanExpressions.jrag:82 */ public boolean canBeTrue() { ASTNode$State state = state(); try { return getOperand().canBeFalse(); } finally { } } /** * @attribute syn * @aspect BooleanExpressions * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/BooleanExpressions.jrag:92 */ public boolean canBeFalse() { ASTNode$State state = state(); try { return getOperand().canBeTrue(); } finally { } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DefiniteAssignment.jrag:380 * @apilevel internal */ public boolean Define_boolean_isDAbefore(ASTNode caller, ASTNode child, Variable v) { if(caller == getOperandNoTransform()) { return isDAbefore(v); } else { return getParent().Define_boolean_isDAbefore(this, caller, v); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DefiniteAssignment.jrag:816 * @apilevel internal */ public boolean Define_boolean_isDUbefore(ASTNode caller, ASTNode child, Variable v) { if(caller == getOperandNoTransform()) { return isDUbefore(v); } else { return getParent().Define_boolean_isDUbefore(this, caller, v); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/BooleanExpressions.jrag:57 * @apilevel internal */ public soot.jimple.Stmt Define_soot_jimple_Stmt_condition_false_label(ASTNode caller, ASTNode child) { if(caller == getOperandNoTransform()) { return true_label(); } else { return getParent().Define_soot_jimple_Stmt_condition_false_label(this, caller); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/BooleanExpressions.jrag:58 * @apilevel internal */ public soot.jimple.Stmt Define_soot_jimple_Stmt_condition_true_label(ASTNode caller, ASTNode child) { if(caller == getOperandNoTransform()) { return false_label(); } else { return getParent().Define_soot_jimple_Stmt_condition_true_label(this, caller); } } /** * @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); } }
11,230
27.14787
120
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/LogicalExpr.java
/* This file was generated with JastAdd2 (http://jastadd.org) version R20130212 (r1031) */ package soot.JastAddJ; import java.util.HashSet; 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; /** * @production LogicalExpr : {@link Binary}; * @ast node * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/java.ast:171 */ public abstract class LogicalExpr extends Binary implements Cloneable { /** * @apilevel low-level */ public void flushCache() { super.flushCache(); type_computed = false; type_value = null; } /** * @apilevel internal */ public void flushCollectionCache() { super.flushCollectionCache(); } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public LogicalExpr clone() throws CloneNotSupportedException { LogicalExpr node = (LogicalExpr)super.clone(); node.type_computed = false; node.type_value = null; node.in$Circle(false); node.is$Final(false); return node; } /** * @ast method * @aspect TypeCheck * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeCheck.jrag:212 */ public void typeCheck() { if(!getLeftOperand().type().isBoolean()) error(getLeftOperand().type().typeName() + " is not boolean"); if(!getRightOperand().type().isBoolean()) error(getRightOperand().type().typeName() + " is not boolean"); } /** * @ast method * @aspect BooleanExpressions * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/BooleanExpressions.jrag:104 */ public soot.Value eval(Body b) { return emitBooleanCondition(b); } /** * @ast method * */ public LogicalExpr() { super(); } /** * Initializes the child array to the correct size. * Initializes List and Opt nta children. * @apilevel internal * @ast method * @ast method * */ public void init$Children() { children = new ASTNode[2]; } /** * @ast method * */ public LogicalExpr(Expr p0, Expr p1) { setChild(p0, 0); setChild(p1, 1); } /** * @apilevel low-level * @ast method * */ protected int numChildren() { return 2; } /** * @apilevel internal * @ast method * */ public boolean mayHaveRewrite() { return false; } /** * Replaces the LeftOperand child. * @param node The new node to replace the LeftOperand child. * @apilevel high-level * @ast method * */ public void setLeftOperand(Expr node) { setChild(node, 0); } /** * Retrieves the LeftOperand child. * @return The current node used as the LeftOperand child. * @apilevel high-level * @ast method * */ public Expr getLeftOperand() { return (Expr)getChild(0); } /** * Retrieves the LeftOperand child. * <p><em>This method does not invoke AST transformations.</em></p> * @return The current node used as the LeftOperand child. * @apilevel low-level * @ast method * */ public Expr getLeftOperandNoTransform() { return (Expr)getChildNoTransform(0); } /** * Replaces the RightOperand child. * @param node The new node to replace the RightOperand child. * @apilevel high-level * @ast method * */ public void setRightOperand(Expr node) { setChild(node, 1); } /** * Retrieves the RightOperand child. * @return The current node used as the RightOperand child. * @apilevel high-level * @ast method * */ public Expr getRightOperand() { return (Expr)getChild(1); } /** * Retrieves the RightOperand child. * <p><em>This method does not invoke AST transformations.</em></p> * @return The current node used as the RightOperand child. * @apilevel low-level * @ast method * */ public Expr getRightOperandNoTransform() { return (Expr)getChildNoTransform(1); } /** * @apilevel internal */ protected boolean type_computed = false; /** * @apilevel internal */ protected TypeDecl type_value; /** * @attribute syn * @aspect TypeAnalysis * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeAnalysis.jrag:347 */ @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; } /** * @apilevel internal */ private TypeDecl type_compute() { return typeBoolean(); } /** * @attribute syn * @aspect BooleanExpressions * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/BooleanExpressions.jrag:21 */ public boolean definesLabel() { ASTNode$State state = state(); try { return true; } finally { } } /** * @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); } }
5,485
23.600897
120
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/LongLiteral.java
/* This file was generated with JastAdd2 (http://jastadd.org) version R20130212 (r1031) */ package soot.JastAddJ; import java.util.HashSet; 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; /** * Java long integer literal. Can store any number that fits in 64 bits * of data, or less. * @production LongLiteral : {@link NumericLiteral}; * @ast node * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/Literals.ast:54 */ public class LongLiteral extends NumericLiteral implements Cloneable { /** * @apilevel low-level */ public void flushCache() { super.flushCache(); type_computed = false; type_value = null; constant_computed = false; constant_value = null; } /** * @apilevel internal */ public void flushCollectionCache() { super.flushCollectionCache(); } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public LongLiteral clone() throws CloneNotSupportedException { LongLiteral node = (LongLiteral)super.clone(); node.type_computed = false; node.type_value = null; node.constant_computed = false; node.constant_value = null; node.in$Circle(false); node.is$Final(false); return node; } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public LongLiteral copy() { try { LongLiteral node = (LongLiteral) clone(); node.parent = null; if(children != null) node.children = (ASTNode[]) children.clone(); return node; } catch (CloneNotSupportedException e) { throw new Error("Error: clone not supported for " + getClass().getName()); } } /** * Create a deep copy of the AST subtree at this node. * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level */ @SuppressWarnings({"unchecked", "cast"}) public LongLiteral fullCopy() { LongLiteral tree = (LongLiteral) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) children[i]; if(child != null) { child = child.fullCopy(); tree.setChild(child, i); } } } return tree; } /** * @ast method * @aspect Expressions * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/Expressions.jrag:23 */ public soot.Value eval(Body b) { return soot.jimple.LongConstant.v(constant().longValue()); } /** * @ast method * */ public LongLiteral() { super(); } /** * Initializes the child array to the correct size. * Initializes List and Opt nta children. * @apilevel internal * @ast method * @ast method * */ public void init$Children() { } /** * @ast method * */ public LongLiteral(String p0) { setLITERAL(p0); } /** * @ast method * */ public LongLiteral(beaver.Symbol p0) { setLITERAL(p0); } /** * @apilevel low-level * @ast method * */ protected int numChildren() { return 0; } /** * @apilevel internal * @ast method * */ public boolean mayHaveRewrite() { return true; } /** * Replaces the lexeme LITERAL. * @param value The new value for the lexeme LITERAL. * @apilevel high-level * @ast method * */ public void setLITERAL(String value) { tokenString_LITERAL = value; } /** * JastAdd-internal setter for lexeme LITERAL using the Beaver parser. * @apilevel internal * @ast method * */ 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(); } /** * Retrieves the value for the lexeme LITERAL. * @return The value for the lexeme LITERAL. * @apilevel high-level * @ast method * */ public String getLITERAL() { return tokenString_LITERAL != null ? tokenString_LITERAL : ""; } /** * Defer pretty printing to superclass. * @ast method * @aspect Literals * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/Literals.jrag:98 */ public void toString(StringBuffer s) { super.toString(s); } /** * Check for and report literal-out-of-bounds error. * If the constant is error-marked, there exists a literal out of bounds error. * @ast method * @aspect Literals * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/Literals.jrag:130 */ public void typeCheck() { if(constant().error) error("The integer literal \""+getLITERAL()+"\" is too large for type long."); } /*syn lazy boolean FloatingPointLiteral.isZero() { String s = getLITERAL(); for(int i = 0; i < s.length(); i++) { char c = s.charAt(i); if(c == 'E' || c == 'e') break; if(Character.isDigit(c) && c != '0') { return false; } } return true; } syn lazy boolean DoubleLiteral.isZero() { String s = getLITERAL(); for(int i = 0; i < s.length(); i++) { char c = s.charAt(i); if(c == 'E' || c == 'e') break; if(Character.isDigit(c) && c != '0') { return false; } } return true; }* @attribute syn * @aspect ConstantExpression * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/ConstantExpression.jrag:152 */ public boolean isPositive() { ASTNode$State state = state(); try { return !getLITERAL().startsWith("-"); } finally { } } /** * @apilevel internal */ protected boolean type_computed = false; /** * @apilevel internal */ protected TypeDecl type_value; /** * @attribute syn * @aspect TypeAnalysis * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeAnalysis.jrag:301 */ @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; } /** * @apilevel internal */ private TypeDecl type_compute() { return typeLong(); } /** * @apilevel internal */ protected boolean constant_computed = false; /** * @apilevel internal */ protected Constant constant_value; /** * Parse this literal and return a fresh Constant. * @return a fresh Constant representing this LongLiteral * @attribute syn * @aspect Literals * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/Literals.jrag:161 */ @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; } /** * @apilevel internal */ private Constant constant_compute() { try { return Constant.create(parseLong()); } catch (NumberFormatException e) { Constant c = Constant.create(0L); c.error = true; return c; } } /** * Utility attribute for literal rewriting. * Any of the NumericLiteral subclasses have already * been rewritten and/or parsed, and should not be * rewritten again. * * @return true if this literal is a "raw", not-yet-parsed NumericLiteral * @attribute syn * @aspect Literals * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/Literals.jrag:334 */ public boolean needsRewrite() { ASTNode$State state = state(); try { return false; } finally { } } /** * @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); } }
8,629
25.151515
112
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/LongType.java
/* This file was generated with JastAdd2 (http://jastadd.org) version R20130212 (r1031) */ package soot.JastAddJ; import java.util.HashSet; 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; /** * @production LongType : {@link IntegralType}; * @ast node * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/java.ast:59 */ public class LongType extends IntegralType implements Cloneable { /** * @apilevel low-level */ public void flushCache() { super.flushCache(); boxed_computed = false; boxed_value = null; jvmName_computed = false; jvmName_value = null; getSootType_computed = false; getSootType_value = null; } /** * @apilevel internal */ public void flushCollectionCache() { super.flushCollectionCache(); } /** * @apilevel internal */ @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; } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public LongType copy() { try { LongType node = (LongType) clone(); node.parent = null; if(children != null) node.children = (ASTNode[]) children.clone(); return node; } catch (CloneNotSupportedException e) { throw new Error("Error: clone not supported for " + getClass().getName()); } } /** * Create a deep copy of the AST subtree at this node. * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level */ @SuppressWarnings({"unchecked", "cast"}) public LongType fullCopy() { LongType tree = (LongType) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) children[i]; if(child != null) { child = child.fullCopy(); tree.setChild(child, i); } } } return tree; } /** * @ast method * @aspect PrettyPrint * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/PrettyPrint.jadd:844 */ public void toString(StringBuffer s) { s.append("long"); } /** * @ast method * */ public LongType() { super(); } /** * Initializes the child array to the correct size. * Initializes List and Opt nta children. * @apilevel internal * @ast method * @ast method * */ public void init$Children() { children = new ASTNode[3]; setChild(new Opt(), 1); setChild(new List(), 2); } /** * @ast method * */ public LongType(Modifiers p0, String p1, Opt<Access> p2, List<BodyDecl> p3) { setChild(p0, 0); setID(p1); setChild(p2, 1); setChild(p3, 2); } /** * @ast method * */ public LongType(Modifiers p0, beaver.Symbol p1, Opt<Access> p2, List<BodyDecl> p3) { setChild(p0, 0); setID(p1); setChild(p2, 1); setChild(p3, 2); } /** * @apilevel low-level * @ast method * */ protected int numChildren() { return 3; } /** * @apilevel internal * @ast method * */ public boolean mayHaveRewrite() { return false; } /** * Replaces the Modifiers child. * @param node The new node to replace the Modifiers child. * @apilevel high-level * @ast method * */ public void setModifiers(Modifiers node) { setChild(node, 0); } /** * Retrieves the Modifiers child. * @return The current node used as the Modifiers child. * @apilevel high-level * @ast method * */ public Modifiers getModifiers() { return (Modifiers)getChild(0); } /** * Retrieves the Modifiers child. * <p><em>This method does not invoke AST transformations.</em></p> * @return The current node used as the Modifiers child. * @apilevel low-level * @ast method * */ public Modifiers getModifiersNoTransform() { return (Modifiers)getChildNoTransform(0); } /** * Replaces the lexeme ID. * @param value The new value for the lexeme ID. * @apilevel high-level * @ast method * */ public void setID(String value) { tokenString_ID = value; } /** * JastAdd-internal setter for lexeme ID using the Beaver parser. * @apilevel internal * @ast method * */ 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(); } /** * Retrieves the value for the lexeme ID. * @return The value for the lexeme ID. * @apilevel high-level * @ast method * */ public String getID() { return tokenString_ID != null ? tokenString_ID : ""; } /** * Replaces the optional node for the SuperClassAccess child. This is the {@code Opt} node containing the child SuperClassAccess, not the actual child! * @param opt The new node to be used as the optional node for the SuperClassAccess child. * @apilevel low-level * @ast method * */ public void setSuperClassAccessOpt(Opt<Access> opt) { setChild(opt, 1); } /** * Check whether the optional SuperClassAccess child exists. * @return {@code true} if the optional SuperClassAccess child exists, {@code false} if it does not. * @apilevel high-level * @ast method * */ public boolean hasSuperClassAccess() { return getSuperClassAccessOpt().getNumChild() != 0; } /** * Retrieves the (optional) SuperClassAccess child. * @return The SuperClassAccess child, if it exists. Returns {@code null} otherwise. * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public Access getSuperClassAccess() { return (Access)getSuperClassAccessOpt().getChild(0); } /** * Replaces the (optional) SuperClassAccess child. * @param node The new node to be used as the SuperClassAccess child. * @apilevel high-level * @ast method * */ public void setSuperClassAccess(Access node) { getSuperClassAccessOpt().setChild(node, 0); } /** * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public Opt<Access> getSuperClassAccessOpt() { return (Opt<Access>)getChild(1); } /** * Retrieves the optional node for child SuperClassAccess. This is the {@code Opt} node containing the child SuperClassAccess, not the actual child! * <p><em>This method does not invoke AST transformations.</em></p> * @return The optional node for child SuperClassAccess. * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public Opt<Access> getSuperClassAccessOptNoTransform() { return (Opt<Access>)getChildNoTransform(1); } /** * Replaces the BodyDecl list. * @param list The new list node to be used as the BodyDecl list. * @apilevel high-level * @ast method * */ public void setBodyDeclList(List<BodyDecl> list) { setChild(list, 2); } /** * Retrieves the number of children in the BodyDecl list. * @return Number of children in the BodyDecl list. * @apilevel high-level * @ast method * */ public int getNumBodyDecl() { return getBodyDeclList().getNumChild(); } /** * Retrieves the number of children in the BodyDecl list. * Calling this method will not trigger rewrites.. * @return Number of children in the BodyDecl list. * @apilevel low-level * @ast method * */ public int getNumBodyDeclNoTransform() { return getBodyDeclListNoTransform().getNumChildNoTransform(); } /** * Retrieves the element at index {@code i} in the BodyDecl list.. * @param i Index of the element to return. * @return The element at position {@code i} in the BodyDecl list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public BodyDecl getBodyDecl(int i) { return (BodyDecl)getBodyDeclList().getChild(i); } /** * Append an element to the BodyDecl list. * @param node The element to append to the BodyDecl list. * @apilevel high-level * @ast method * */ public void addBodyDecl(BodyDecl node) { List<BodyDecl> list = (parent == null || state == null) ? getBodyDeclListNoTransform() : getBodyDeclList(); list.addChild(node); } /** * @apilevel low-level * @ast method * */ public void addBodyDeclNoTransform(BodyDecl node) { List<BodyDecl> list = getBodyDeclListNoTransform(); list.addChild(node); } /** * Replaces the BodyDecl list element at index {@code i} with the new node {@code node}. * @param node The new node to replace the old list element. * @param i The list index of the node to be replaced. * @apilevel high-level * @ast method * */ public void setBodyDecl(BodyDecl node, int i) { List<BodyDecl> list = getBodyDeclList(); list.setChild(node, i); } /** * Retrieves the BodyDecl list. * @return The node representing the BodyDecl list. * @apilevel high-level * @ast method * */ public List<BodyDecl> getBodyDecls() { return getBodyDeclList(); } /** * Retrieves the BodyDecl list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the BodyDecl list. * @apilevel low-level * @ast method * */ public List<BodyDecl> getBodyDeclsNoTransform() { return getBodyDeclListNoTransform(); } /** * Retrieves the BodyDecl list. * @return The node representing the BodyDecl list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<BodyDecl> getBodyDeclList() { List<BodyDecl> list = (List<BodyDecl>)getChild(2); list.getNumChild(); return list; } /** * Retrieves the BodyDecl list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the BodyDecl list. * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<BodyDecl> getBodyDeclListNoTransform() { return (List<BodyDecl>)getChildNoTransform(2); } /** * @attribute syn * @aspect ConstantExpression * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/ConstantExpression.jrag:160 */ public Constant cast(Constant c) { ASTNode$State state = state(); try { return Constant.create(c.longValue()); } finally { } } /** * @attribute syn * @aspect ConstantExpression * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/ConstantExpression.jrag:174 */ public Constant plus(Constant c) { ASTNode$State state = state(); try { return c; } finally { } } /** * @attribute syn * @aspect ConstantExpression * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/ConstantExpression.jrag:183 */ public Constant minus(Constant c) { ASTNode$State state = state(); try { return Constant.create(-c.longValue()); } finally { } } /** * @attribute syn * @aspect ConstantExpression * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/ConstantExpression.jrag:192 */ public Constant bitNot(Constant c) { ASTNode$State state = state(); try { return Constant.create(~c.longValue()); } finally { } } /** * @attribute syn * @aspect ConstantExpression * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/ConstantExpression.jrag:199 */ public Constant mul(Constant c1, Constant c2) { ASTNode$State state = state(); try { return Constant.create(c1.longValue() * c2.longValue()); } finally { } } /** * @attribute syn * @aspect ConstantExpression * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/ConstantExpression.jrag:208 */ public Constant div(Constant c1, Constant c2) { ASTNode$State state = state(); try { return Constant.create(c1.longValue() / c2.longValue()); } finally { } } /** * @attribute syn * @aspect ConstantExpression * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/ConstantExpression.jrag:217 */ public Constant mod(Constant c1, Constant c2) { ASTNode$State state = state(); try { return Constant.create(c1.longValue() % c2.longValue()); } finally { } } /** * @attribute syn * @aspect ConstantExpression * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/ConstantExpression.jrag:226 */ public Constant add(Constant c1, Constant c2) { ASTNode$State state = state(); try { return Constant.create(c1.longValue() + c2.longValue()); } finally { } } /** * @attribute syn * @aspect ConstantExpression * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/ConstantExpression.jrag:236 */ public Constant sub(Constant c1, Constant c2) { ASTNode$State state = state(); try { return Constant.create(c1.longValue() - c2.longValue()); } finally { } } /** * @attribute syn * @aspect ConstantExpression * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/ConstantExpression.jrag:245 */ public Constant lshift(Constant c1, Constant c2) { ASTNode$State state = state(); try { return Constant.create(c1.longValue() << c2.longValue()); } finally { } } /** * @attribute syn * @aspect ConstantExpression * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/ConstantExpression.jrag:252 */ public Constant rshift(Constant c1, Constant c2) { ASTNode$State state = state(); try { return Constant.create(c1.longValue() >> c2.longValue()); } finally { } } /** * @attribute syn * @aspect ConstantExpression * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/ConstantExpression.jrag:259 */ public Constant urshift(Constant c1, Constant c2) { ASTNode$State state = state(); try { return Constant.create(c1.longValue() >>> c2.longValue()); } finally { } } /** * @attribute syn * @aspect ConstantExpression * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/ConstantExpression.jrag:266 */ public Constant andBitwise(Constant c1, Constant c2) { ASTNode$State state = state(); try { return Constant.create(c1.longValue() & c2.longValue()); } finally { } } /** * @attribute syn * @aspect ConstantExpression * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/ConstantExpression.jrag:274 */ public Constant xorBitwise(Constant c1, Constant c2) { ASTNode$State state = state(); try { return Constant.create(c1.longValue() ^ c2.longValue()); } finally { } } /** * @attribute syn * @aspect ConstantExpression * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/ConstantExpression.jrag:282 */ public Constant orBitwise(Constant c1, Constant c2) { ASTNode$State state = state(); try { return Constant.create(c1.longValue() | c2.longValue()); } finally { } } /** * @attribute syn * @aspect ConstantExpression * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/ConstantExpression.jrag:290 */ public Constant questionColon(Constant cond, Constant c1, Constant c2) { ASTNode$State state = state(); try { return Constant.create(cond.booleanValue() ? c1.longValue() : c2.longValue()); } finally { } } /** * @attribute syn * @aspect ConstantExpression * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/ConstantExpression.jrag:394 */ public boolean eqIsTrue(Expr left, Expr right) { ASTNode$State state = state(); try { return left.constant().longValue() == right.constant().longValue(); } finally { } } /** * @attribute syn * @aspect ConstantExpression * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/ConstantExpression.jrag:405 */ public boolean ltIsTrue(Expr left, Expr right) { ASTNode$State state = state(); try { return left.constant().longValue() < right.constant().longValue(); } finally { } } /** * @attribute syn * @aspect ConstantExpression * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/ConstantExpression.jrag:411 */ public boolean leIsTrue(Expr left, Expr right) { ASTNode$State state = state(); try { return left.constant().longValue() <= right.constant().longValue(); } finally { } } /** * @attribute syn * @aspect NameCheck * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/NameCheck.jrag:427 */ public boolean assignableToInt() { ASTNode$State state = state(); try { return false; } finally { } } /** * @attribute syn * @aspect TypeAnalysis * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeAnalysis.jrag:197 */ public boolean isLong() { ASTNode$State state = state(); try { return true; } finally { } } /** * @apilevel internal */ protected boolean boxed_computed = false; /** * @apilevel internal */ protected TypeDecl boxed_value; /** * @attribute syn * @aspect AutoBoxing * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/AutoBoxing.jrag: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; } /** * @apilevel internal */ private TypeDecl boxed_compute() { return lookupType("java.lang", "Long"); } /** * @apilevel internal */ protected boolean jvmName_computed = false; /** * @apilevel internal */ protected String jvmName_value; /** * @attribute syn * @aspect Java2Rewrites * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Backend/Java2Rewrites.jrag: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; } /** * @apilevel internal */ private String jvmName_compute() { return "J"; } /** * @attribute syn * @aspect Java2Rewrites * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Backend/Java2Rewrites.jrag:44 */ public String primitiveClassName() { ASTNode$State state = state(); try { return "Long"; } finally { } } /** * @apilevel internal */ protected boolean getSootType_computed = false; /** * @apilevel internal */ protected Type getSootType_value; /** * @attribute syn * @aspect EmitJimple * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/EmitJimple.jrag: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; } /** * @apilevel internal */ private Type getSootType_compute() { return soot.LongType.v(); } /** * @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); } }
21,147
27.348525
153
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/MemberClassDecl.java
/* This file was generated with JastAdd2 (http://jastadd.org) version R20130212 (r1031) */ package soot.JastAddJ; import java.util.HashSet; 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; /** * @production MemberClassDecl : {@link MemberTypeDecl} ::= <span class="component">{@link ClassDecl}</span>; * @ast node * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/java.ast:99 */ public class MemberClassDecl extends MemberTypeDecl implements Cloneable { /** * @apilevel low-level */ public void flushCache() { super.flushCache(); } /** * @apilevel internal */ public void flushCollectionCache() { super.flushCollectionCache(); } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public MemberClassDecl clone() throws CloneNotSupportedException { MemberClassDecl node = (MemberClassDecl)super.clone(); node.in$Circle(false); node.is$Final(false); return node; } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public MemberClassDecl copy() { try { MemberClassDecl node = (MemberClassDecl) clone(); node.parent = null; if(children != null) node.children = (ASTNode[]) children.clone(); return node; } catch (CloneNotSupportedException e) { throw new Error("Error: clone not supported for " + getClass().getName()); } } /** * Create a deep copy of the AST subtree at this node. * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level */ @SuppressWarnings({"unchecked", "cast"}) public MemberClassDecl fullCopy() { MemberClassDecl tree = (MemberClassDecl) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) children[i]; if(child != null) { child = child.fullCopy(); tree.setChild(child, i); } } } return tree; } /** * @ast method * @aspect PrettyPrint * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/PrettyPrint.jadd:206 */ public void toString(StringBuffer s) { s.append(indent()); getClassDecl().toString(s); } /** * @ast method * */ public MemberClassDecl() { super(); } /** * Initializes the child array to the correct size. * Initializes List and Opt nta children. * @apilevel internal * @ast method * @ast method * */ public void init$Children() { children = new ASTNode[1]; } /** * @ast method * */ public MemberClassDecl(ClassDecl p0) { setChild(p0, 0); } /** * @apilevel low-level * @ast method * */ protected int numChildren() { return 1; } /** * @apilevel internal * @ast method * */ public boolean mayHaveRewrite() { return false; } /** * Replaces the ClassDecl child. * @param node The new node to replace the ClassDecl child. * @apilevel high-level * @ast method * */ public void setClassDecl(ClassDecl node) { setChild(node, 0); } /** * Retrieves the ClassDecl child. * @return The current node used as the ClassDecl child. * @apilevel high-level * @ast method * */ public ClassDecl getClassDecl() { return (ClassDecl)getChild(0); } /** * Retrieves the ClassDecl child. * <p><em>This method does not invoke AST transformations.</em></p> * @return The current node used as the ClassDecl child. * @apilevel low-level * @ast method * */ public ClassDecl getClassDeclNoTransform() { return (ClassDecl)getChildNoTransform(0); } /** * @attribute syn * @aspect TypeScopePropagation * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupType.jrag:484 */ public TypeDecl typeDecl() { ASTNode$State state = state(); try { return getClassDecl(); } finally { } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeAnalysis.jrag:527 * @apilevel internal */ public boolean Define_boolean_isMemberType(ASTNode caller, ASTNode child) { if(caller == getClassDeclNoTransform()) { return true; } else { return getParent().Define_boolean_isMemberType(this, caller); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeHierarchyCheck.jrag:145 * @apilevel internal */ public boolean Define_boolean_inStaticContext(ASTNode caller, ASTNode child) { if(caller == getClassDeclNoTransform()) { return false; } else { return getParent().Define_boolean_inStaticContext(this, caller); } } /** * @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); } }
5,283
24.403846
113
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/MemberDecl.java
/* This file was generated with JastAdd2 (http://jastadd.org) version R20130212 (r1031) */ package soot.JastAddJ; import java.util.HashSet; 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; /** * @production MemberDecl : {@link BodyDecl}; * @ast node * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/java.ast:77 */ public abstract class MemberDecl extends BodyDecl implements Cloneable { /** * @apilevel low-level */ public void flushCache() { super.flushCache(); } /** * @apilevel internal */ public void flushCollectionCache() { super.flushCollectionCache(); } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public MemberDecl clone() throws CloneNotSupportedException { MemberDecl node = (MemberDecl)super.clone(); node.in$Circle(false); node.is$Final(false); return node; } /** * @ast method * @aspect Modifiers * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/Modifiers.jrag:192 */ public void checkModifiers() { if(!isSynthetic()) { super.checkModifiers(); if(isStatic() && hostType().isInnerClass() && !isConstant()) error("*** Inner classes may not declare static members, unless they are compile-time constant fields"); } } /** * @ast method * */ public MemberDecl() { super(); } /** * Initializes the child array to the correct size. * Initializes List and Opt nta children. * @apilevel internal * @ast method * @ast method * */ public void init$Children() { } /** * @apilevel low-level * @ast method * */ protected int numChildren() { return 0; } /** * @apilevel internal * @ast method * */ public boolean mayHaveRewrite() { return false; } /** * @attribute syn * @aspect Modifiers * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/Modifiers.jrag:222 */ @SuppressWarnings({"unchecked", "cast"}) public abstract boolean isStatic(); /** * @attribute syn * @aspect ConstantExpression * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/ConstantExpression.jrag:332 */ public boolean isConstant() { ASTNode$State state = state(); try { return false; } finally { } } /** * @attribute syn * @aspect Modifiers * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/Modifiers.jrag:214 */ public boolean isSynthetic() { ASTNode$State state = state(); try { return false; } finally { } } /** * @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); } }
3,145
22.833333
112
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/MemberInterfaceDecl.java
/* This file was generated with JastAdd2 (http://jastadd.org) version R20130212 (r1031) */ package soot.JastAddJ; import java.util.HashSet; 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; /** * @production MemberInterfaceDecl : {@link MemberTypeDecl} ::= <span class="component">{@link InterfaceDecl}</span>; * @ast node * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/java.ast:100 */ public class MemberInterfaceDecl extends MemberTypeDecl implements Cloneable { /** * @apilevel low-level */ public void flushCache() { super.flushCache(); } /** * @apilevel internal */ public void flushCollectionCache() { super.flushCollectionCache(); } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public MemberInterfaceDecl clone() throws CloneNotSupportedException { MemberInterfaceDecl node = (MemberInterfaceDecl)super.clone(); node.in$Circle(false); node.is$Final(false); return node; } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public MemberInterfaceDecl copy() { try { MemberInterfaceDecl node = (MemberInterfaceDecl) clone(); node.parent = null; if(children != null) node.children = (ASTNode[]) children.clone(); return node; } catch (CloneNotSupportedException e) { throw new Error("Error: clone not supported for " + getClass().getName()); } } /** * Create a deep copy of the AST subtree at this node. * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level */ @SuppressWarnings({"unchecked", "cast"}) public MemberInterfaceDecl fullCopy() { MemberInterfaceDecl tree = (MemberInterfaceDecl) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) children[i]; if(child != null) { child = child.fullCopy(); tree.setChild(child, i); } } } return tree; } /** * @ast method * @aspect Modifiers * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/Modifiers.jrag:186 */ public void checkModifiers() { super.checkModifiers(); if(hostType().isInnerClass()) error("*** Inner classes may not declare member interfaces"); } /** * @ast method * @aspect PrettyPrint * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/PrettyPrint.jadd:211 */ public void toString(StringBuffer s) { s.append(indent()); getInterfaceDecl().toString(s); } /** * @ast method * */ public MemberInterfaceDecl() { super(); } /** * Initializes the child array to the correct size. * Initializes List and Opt nta children. * @apilevel internal * @ast method * @ast method * */ public void init$Children() { children = new ASTNode[1]; } /** * @ast method * */ public MemberInterfaceDecl(InterfaceDecl p0) { setChild(p0, 0); } /** * @apilevel low-level * @ast method * */ protected int numChildren() { return 1; } /** * @apilevel internal * @ast method * */ public boolean mayHaveRewrite() { return false; } /** * Replaces the InterfaceDecl child. * @param node The new node to replace the InterfaceDecl child. * @apilevel high-level * @ast method * */ public void setInterfaceDecl(InterfaceDecl node) { setChild(node, 0); } /** * Retrieves the InterfaceDecl child. * @return The current node used as the InterfaceDecl child. * @apilevel high-level * @ast method * */ public InterfaceDecl getInterfaceDecl() { return (InterfaceDecl)getChild(0); } /** * Retrieves the InterfaceDecl child. * <p><em>This method does not invoke AST transformations.</em></p> * @return The current node used as the InterfaceDecl child. * @apilevel low-level * @ast method * */ public InterfaceDecl getInterfaceDeclNoTransform() { return (InterfaceDecl)getChildNoTransform(0); } /** * @attribute syn * @aspect TypeScopePropagation * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupType.jrag:484 */ public TypeDecl typeDecl() { ASTNode$State state = state(); try { return getInterfaceDecl(); } finally { } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeAnalysis.jrag:528 * @apilevel internal */ public boolean Define_boolean_isMemberType(ASTNode caller, ASTNode child) { if(caller == getInterfaceDeclNoTransform()) { return true; } else { return getParent().Define_boolean_isMemberType(this, caller); } } /** * @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); } }
5,343
24.816425
117
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/MemberSubstitutor.java
package soot.JastAddJ; import java.util.HashSet; 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; /** * @ast interface * */ public interface MemberSubstitutor extends Parameterization { TypeDecl original(); void addBodyDecl(BodyDecl b); TypeDecl substitute(TypeVariable typeVariable); /** * @attribute syn * @aspect LookupParTypeDecl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:1084 */ @SuppressWarnings({"unchecked", "cast"}) public HashMap localMethodsSignatureMap(); /** * @attribute syn * @aspect LookupParTypeDecl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:1119 */ @SuppressWarnings({"unchecked", "cast"}) public SimpleSet localFields(String name); /** * @attribute syn * @aspect LookupParTypeDecl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:1154 */ @SuppressWarnings({"unchecked", "cast"}) public SimpleSet localTypeDecls(String name); /** * @attribute syn * @aspect LookupParTypeDecl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:1213 */ @SuppressWarnings({"unchecked", "cast"}) public Collection constructors(); }
1,714
26.222222
104
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/MemberTypeDecl.java
/* This file was generated with JastAdd2 (http://jastadd.org) version R20130212 (r1031) */ package soot.JastAddJ; import java.util.HashSet; 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; /** * @production MemberTypeDecl : {@link MemberDecl}; * @ast node * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/java.ast:98 */ public abstract class MemberTypeDecl extends MemberDecl implements Cloneable { /** * @apilevel low-level */ public void flushCache() { super.flushCache(); } /** * @apilevel internal */ public void flushCollectionCache() { super.flushCollectionCache(); } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public MemberTypeDecl clone() throws CloneNotSupportedException { MemberTypeDecl node = (MemberTypeDecl)super.clone(); node.in$Circle(false); node.is$Final(false); return node; } /** * @ast method * */ public MemberTypeDecl() { super(); } /** * Initializes the child array to the correct size. * Initializes List and Opt nta children. * @apilevel internal * @ast method * @ast method * */ public void init$Children() { } /** * @apilevel low-level * @ast method * */ protected int numChildren() { return 0; } /** * @apilevel internal * @ast method * */ public boolean mayHaveRewrite() { return false; } /** * @attribute syn * @aspect TypeScopePropagation * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupType.jrag:484 */ @SuppressWarnings({"unchecked", "cast"}) public abstract TypeDecl typeDecl(); /** * @attribute syn * @aspect TypeScopePropagation * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupType.jrag:479 */ public boolean declaresType(String name) { ASTNode$State state = state(); try { return typeDecl().name().equals(name); } finally { } } /** * @attribute syn * @aspect TypeScopePropagation * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupType.jrag:481 */ public TypeDecl type(String name) { ASTNode$State state = state(); try { return declaresType(name) ? typeDecl() : null; } finally { } } /** * @attribute syn * @aspect Modifiers * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/Modifiers.jrag:222 */ public boolean isStatic() { ASTNode$State state = state(); try { return typeDecl().isStatic(); } finally { } } /** * @attribute syn * @aspect PrettyPrint * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/PrettyPrint.jadd:758 */ public boolean addsIndentationLevel() { ASTNode$State state = state(); try { return false; } finally { } } /** * @attribute syn * @aspect Annotations * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Annotations.jrag:283 */ public boolean hasAnnotationSuppressWarnings(String s) { ASTNode$State state = state(); try { return typeDecl().hasAnnotationSuppressWarnings(s); } finally { } } /** * @attribute syn * @aspect Annotations * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Annotations.jrag:322 */ public boolean isDeprecated() { ASTNode$State state = state(); try { return typeDecl().isDeprecated(); } finally { } } /** * @attribute syn * @aspect GenericsParTypeDecl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericsParTypeDecl.jrag:67 */ public boolean visibleTypeParameters() { ASTNode$State state = state(); try { return !isStatic(); } finally { } } /** * @return true if the modifier list includes the SafeVarargs annotation * @attribute syn * @aspect SafeVarargs * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/SafeVarargs.jrag:20 */ public boolean hasAnnotationSafeVarargs() { ASTNode$State state = state(); try { return typeDecl().hasAnnotationSafeVarargs(); } finally { } } /** * @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); } }
4,788
24.473404
113
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/MethodAccess.java
/* This file was generated with JastAdd2 (http://jastadd.org) version R20130212 (r1031) */ package soot.JastAddJ; import java.util.HashSet; 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; /** * @production MethodAccess : {@link Access} ::= <span class="component">&lt;ID:String&gt;</span> <span class="component">Arg:{@link Expr}*</span>; * @ast node * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/java.ast:20 */ public class MethodAccess extends Access implements Cloneable { /** * @apilevel low-level */ public void flushCache() { super.flushCache(); computeDAbefore_int_Variable_values = null; exceptionCollection_computed = false; exceptionCollection_value = null; decls_computed = false; decls_value = null; decl_computed = false; decl_value = null; type_computed = false; type_value = null; typeArguments_MethodDecl_values = null; } /** * @apilevel internal */ public void flushCollectionCache() { super.flushCollectionCache(); } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public MethodAccess clone() throws CloneNotSupportedException { MethodAccess node = (MethodAccess)super.clone(); node.computeDAbefore_int_Variable_values = null; node.exceptionCollection_computed = false; node.exceptionCollection_value = null; node.decls_computed = false; node.decls_value = null; node.decl_computed = false; node.decl_value = null; node.type_computed = false; node.type_value = null; node.typeArguments_MethodDecl_values = null; node.in$Circle(false); node.is$Final(false); return node; } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public MethodAccess copy() { try { MethodAccess node = (MethodAccess) clone(); node.parent = null; if(children != null) node.children = (ASTNode[]) children.clone(); return node; } catch (CloneNotSupportedException e) { throw new Error("Error: clone not supported for " + getClass().getName()); } } /** * Create a deep copy of the AST subtree at this node. * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level */ @SuppressWarnings({"unchecked", "cast"}) public MethodAccess fullCopy() { MethodAccess tree = (MethodAccess) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) children[i]; if(child != null) { child = child.fullCopy(); tree.setChild(child, i); } } } return tree; } /** * @ast method * @aspect AnonymousClasses * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/AnonymousClasses.jrag:215 */ protected void collectExceptions(Collection c, ASTNode target) { super.collectExceptions(c, target); for(int i = 0; i < decl().getNumException(); i++) c.add(decl().getException(i).type()); } /** * @ast method * @aspect ExceptionHandling * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/ExceptionHandling.jrag:57 */ public void exceptionHandling() { for(Iterator iter = exceptionCollection().iterator(); iter.hasNext(); ) { TypeDecl exceptionType = (TypeDecl)iter.next(); if(!handlesException(exceptionType)) error("" + decl().hostType().fullName() + "." + this + " invoked in " + hostType().fullName() + " may throw uncaught exception " + exceptionType.fullName()); } } /** * @ast method * @aspect ExceptionHandling * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/ExceptionHandling.jrag:253 */ protected boolean reachedException(TypeDecl catchType) { for(Iterator iter = exceptionCollection().iterator(); iter.hasNext(); ) { TypeDecl exceptionType = (TypeDecl)iter.next(); if(catchType.mayCatch(exceptionType)) return true; } return super.reachedException(catchType); } /** * @ast method * @aspect LookupMethod * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupMethod.jrag:119 */ private static SimpleSet removeInstanceMethods(SimpleSet c) { SimpleSet set = SimpleSet.emptySet; for(Iterator iter = c.iterator(); iter.hasNext(); ) { MethodDecl m = (MethodDecl)iter.next(); if(m.isStatic()) set = set.add(m); } return set; } /** * @ast method * @aspect MethodDecl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupMethod.jrag:158 */ public boolean applicable(MethodDecl decl) { if(getNumArg() != decl.getNumParameter()) return false; if(!name().equals(decl.name())) return false; for(int i = 0; i < getNumArg(); i++) { if(!getArg(i).type().instanceOf(decl.getParameter(i).type())) return false; } return true; } /** * @ast method * @aspect NodeConstructors * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/NodeConstructors.jrag:56 */ public MethodAccess(String name, List args, int start, int end) { this(name, args); setStart(start); setEnd(end); } /** * @ast method * @aspect PrettyPrint * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/PrettyPrint.jadd:457 */ public void toString(StringBuffer s) { s.append(name()); s.append("("); if(getNumArg() > 0) { getArg(0).toString(s); for(int i = 1; i < getNumArg(); i++) { s.append(", "); getArg(i).toString(s); } } s.append(")"); } /** * @ast method * @aspect TypeHierarchyCheck * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeHierarchyCheck.jrag:23 */ public void nameCheck() { if(isQualified() && qualifier().isPackageAccess() && !qualifier().isUnknown()) error("The method " + decl().signature() + " can not be qualified by a package name."); if(isQualified() && decl().isAbstract() && qualifier().isSuperAccess()) error("may not access abstract methods in superclass"); if(decls().isEmpty() && (!isQualified() || !qualifier().isUnknown())) { StringBuffer s = new StringBuffer(); s.append("no method named " + name()); s.append("("); for(int i = 0; i < getNumArg(); i++) { if(i != 0) s.append(", "); s.append(getArg(i).type().typeName()); } s.append(")" + " in " + methodHost() + " matches."); if(singleCandidateDecl() != null) s.append(" However, there is a method " + singleCandidateDecl().signature()); error(s.toString()); } if(decls().size() > 1) { boolean allAbstract = true; for(Iterator iter = decls().iterator(); iter.hasNext() && allAbstract; ) { MethodDecl m = (MethodDecl)iter.next(); if(!m.isAbstract() && !m.hostType().isObject()) allAbstract = false; } if(!allAbstract && validArgs()) { StringBuffer s = new StringBuffer(); s.append("several most specific methods for " + this + "\n"); for(Iterator iter = decls().iterator(); iter.hasNext(); ) { MethodDecl m = (MethodDecl)iter.next(); s.append(" " + m.signature() + " in " + m.hostType().typeName() + "\n"); } error(s.toString()); } } } /** * @ast method * @aspect Annotations * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Annotations.jrag:336 */ public void checkModifiers() { if(decl().isDeprecated() && !withinDeprecatedAnnotation() && hostType().topLevelType() != decl().hostType().topLevelType() && !withinSuppressWarnings("deprecation")) warning(decl().signature() + " in " + decl().hostType().typeName() + " has been deprecated"); } /** * @ast method * @aspect GenericMethodsInference * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericMethodsInference.jrag:46 */ public Collection computeConstraints(GenericMethodDecl decl) { Constraints c = new Constraints(); // store type parameters for(int i = 0; i < decl.original().getNumTypeParameter(); i++) c.addTypeVariable(decl.original().getTypeParameter(i)); // add initial constraints for(int i = 0; i < getNumArg(); i++) { TypeDecl A = getArg(i).type(); int index = i >= decl.getNumParameter() ? decl.getNumParameter() - 1 : i; TypeDecl F = decl.getParameter(index).type(); if(decl.getParameter(index) instanceof VariableArityParameterDeclaration && (getNumArg() != decl.getNumParameter() || !A.isArrayDecl())) { F = F.componentType(); } c.convertibleTo(A, F); } if(c.rawAccess) return new ArrayList(); //c.printConstraints(); //System.err.println("Resolving equality constraints"); c.resolveEqualityConstraints(); //c.printConstraints(); //System.err.println("Resolving supertype constraints"); c.resolveSupertypeConstraints(); //c.printConstraints(); //System.err.println("Resolving unresolved type arguments"); //c.resolveBounds(); //c.printConstraints(); if(c.unresolvedTypeArguments()) { TypeDecl S = assignConvertedType(); if(S.isUnboxedPrimitive()) S = S.boxed(); TypeDecl R = decl.type(); // TODO: replace all uses of type variables in R with their inferred types TypeDecl Rprime = R; if(R.isVoid()) R = typeObject(); c.convertibleFrom(S, R); // TODO: additional constraints c.resolveEqualityConstraints(); c.resolveSupertypeConstraints(); //c.resolveBounds(); c.resolveSubtypeConstraints(); } return c.typeArguments(); } /** * @ast method * @aspect MethodSignature15 * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/MethodSignature.jrag:23 */ protected SimpleSet potentiallyApplicable(Collection candidates) { SimpleSet potentiallyApplicable = SimpleSet.emptySet; // select potentially applicable methods for(Iterator iter = candidates.iterator(); iter.hasNext(); ) { MethodDecl decl = (MethodDecl)iter.next(); if(potentiallyApplicable(decl) && accessible(decl)) { if(decl instanceof GenericMethodDecl) { decl = ((GenericMethodDecl)decl).lookupParMethodDecl(typeArguments(decl)); } potentiallyApplicable = potentiallyApplicable.add(decl); } } return potentiallyApplicable; } /** * @ast method * @aspect MethodSignature15 * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/MethodSignature.jrag:38 */ protected SimpleSet applicableBySubtyping(SimpleSet potentiallyApplicable) { SimpleSet maxSpecific = SimpleSet.emptySet; for(Iterator iter = potentiallyApplicable.iterator(); iter.hasNext(); ) { MethodDecl decl = (MethodDecl)iter.next(); if(applicableBySubtyping(decl)) maxSpecific = mostSpecific(maxSpecific, decl); } return maxSpecific; } /** * @ast method * @aspect MethodSignature15 * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/MethodSignature.jrag:48 */ protected SimpleSet applicableByMethodInvocationConversion(SimpleSet potentiallyApplicable, SimpleSet maxSpecific) { if(maxSpecific.isEmpty()) { for(Iterator iter = potentiallyApplicable.iterator(); iter.hasNext(); ) { MethodDecl decl = (MethodDecl)iter.next(); if(applicableByMethodInvocationConversion(decl)) maxSpecific = mostSpecific(maxSpecific, decl); } } return maxSpecific; } /** * @ast method * @aspect MethodSignature15 * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/MethodSignature.jrag:59 */ protected SimpleSet applicableVariableArity(SimpleSet potentiallyApplicable, SimpleSet maxSpecific) { if(maxSpecific.isEmpty()) { for(Iterator iter = potentiallyApplicable.iterator(); iter.hasNext(); ) { MethodDecl decl = (MethodDecl)iter.next(); if(decl.isVariableArity() && applicableVariableArity(decl)) maxSpecific = mostSpecific(maxSpecific, decl); } } return maxSpecific; } /** * @ast method * @aspect MethodSignature15 * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/MethodSignature.jrag:140 */ private static SimpleSet mostSpecific(SimpleSet maxSpecific, MethodDecl decl) { if(maxSpecific.isEmpty()) maxSpecific = maxSpecific.add(decl); else { if(decl.moreSpecificThan((MethodDecl)maxSpecific.iterator().next())) maxSpecific = SimpleSet.emptySet.add(decl); else if(!((MethodDecl)maxSpecific.iterator().next()).moreSpecificThan(decl)) maxSpecific = maxSpecific.add(decl); } return maxSpecific; } /** * @ast method * @aspect InnerClasses * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Backend/InnerClasses.jrag:48 */ private TypeDecl refined_InnerClasses_MethodAccess_methodQualifierType() { if(hasPrevExpr()) return prevExpr().type(); TypeDecl typeDecl = hostType(); while(typeDecl != null && !typeDecl.hasMethod(name())) typeDecl = typeDecl.enclosingType(); if(typeDecl != null) return typeDecl; return decl().hostType(); } /** * @ast method * @aspect InnerClasses * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Backend/InnerClasses.jrag:113 */ public TypeDecl superAccessorTarget() { TypeDecl targetDecl = prevExpr().type(); TypeDecl enclosing = hostType(); do { enclosing = enclosing.enclosingType(); } while (!enclosing.instanceOf(targetDecl)); return enclosing; } /** * @ast method * @aspect Transformations * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Backend/Transformations.jrag:69 */ public void refined_Transformations_MethodAccess_transformation() { MethodDecl m = decl(); /*if(!isQualified() && !m.isStatic()) { TypeDecl typeDecl = hostType(); while(typeDecl != null && !typeDecl.hasMethod(name())) typeDecl = typeDecl.enclosingType(); ASTNode result = replace(this).with(typeDecl.createQualifiedAccess().qualifiesAccess(new ThisAccess("this")).qualifiesAccess(new MethodAccess(name(), getArgList()))); result.transformation(); return; }*/ if(requiresAccessor()) { /* Access to private methods in enclosing types: The original MethodAccess is replaced with an access to an accessor method built by createAccessor(). This method is built lazily and differs from normal MethodDeclarations in the following ways: 1) The method in the class file should always be static and the signature is thus changed to include a possible this reference as the first argument. 2) The method is always invoked using INVOKESTATIC 3) The flags must indicate that the method is static and package private */ super.transformation(); replace(this).with(decl().createAccessor(methodQualifierType()).createBoundAccess(getArgList())); return; } else if(!m.isStatic() && isQualified() && prevExpr().isSuperAccess() && !hostType().instanceOf(prevExpr().type())) { decl().createSuperAccessor(superAccessorTarget()); } super.transformation(); } /** * @ast method * @aspect SafeVarargs * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/SafeVarargs.jrag:73 */ public void checkWarnings() { MethodDecl decl = decl(); if (decl.getNumParameter() == 0) return; if (decl.getNumParameter() > getNumArg()) return; ParameterDeclaration param = decl.getParameter( decl.getNumParameter()-1); if (!withinSuppressWarnings("unchecked") && !decl.hasAnnotationSafeVarargs() && param.isVariableArity() && !param.type().isReifiable()) warning("unchecked array creation for variable " + "arity parameter of " + decl().name()); } /** * @ast method * @aspect EmitJimpleRefinements * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/SootJastAddJ/EmitJimpleRefinements.jrag:227 */ public void collectTypesToSignatures(Collection<Type> set) { super.collectTypesToSignatures(set); addDependencyIfNeeded(set, methodQualifierType()); } /** * @ast method * */ public MethodAccess() { super(); } /** * Initializes the child array to the correct size. * Initializes List and Opt nta children. * @apilevel internal * @ast method * @ast method * */ public void init$Children() { children = new ASTNode[1]; setChild(new List(), 0); } /** * @ast method * */ public MethodAccess(String p0, List<Expr> p1) { setID(p0); setChild(p1, 0); } /** * @ast method * */ public MethodAccess(beaver.Symbol p0, List<Expr> p1) { setID(p0); setChild(p1, 0); } /** * @apilevel low-level * @ast method * */ protected int numChildren() { return 1; } /** * @apilevel internal * @ast method * */ public boolean mayHaveRewrite() { return false; } /** * Replaces the lexeme ID. * @param value The new value for the lexeme ID. * @apilevel high-level * @ast method * */ public void setID(String value) { tokenString_ID = value; } /** * @apilevel internal * @ast method * */ /** * @apilevel internal */ protected String tokenString_ID; /** * @ast method * */ public int IDstart; /** * @ast method * */ public int IDend; /** * JastAdd-internal setter for lexeme ID using the Beaver parser. * @apilevel internal * @ast method * */ 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(); } /** * Retrieves the value for the lexeme ID. * @return The value for the lexeme ID. * @apilevel high-level * @ast method * */ public String getID() { return tokenString_ID != null ? tokenString_ID : ""; } /** * Replaces the Arg list. * @param list The new list node to be used as the Arg list. * @apilevel high-level * @ast method * */ public void setArgList(List<Expr> list) { setChild(list, 0); } /** * Retrieves the number of children in the Arg list. * @return Number of children in the Arg list. * @apilevel high-level * @ast method * */ public int getNumArg() { return getArgList().getNumChild(); } /** * Retrieves the number of children in the Arg list. * Calling this method will not trigger rewrites.. * @return Number of children in the Arg list. * @apilevel low-level * @ast method * */ public int getNumArgNoTransform() { return getArgListNoTransform().getNumChildNoTransform(); } /** * Retrieves the element at index {@code i} in the Arg list.. * @param i Index of the element to return. * @return The element at position {@code i} in the Arg list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public Expr getArg(int i) { return (Expr)getArgList().getChild(i); } /** * Append an element to the Arg list. * @param node The element to append to the Arg list. * @apilevel high-level * @ast method * */ public void addArg(Expr node) { List<Expr> list = (parent == null || state == null) ? getArgListNoTransform() : getArgList(); list.addChild(node); } /** * @apilevel low-level * @ast method * */ public void addArgNoTransform(Expr node) { List<Expr> list = getArgListNoTransform(); list.addChild(node); } /** * Replaces the Arg list element at index {@code i} with the new node {@code node}. * @param node The new node to replace the old list element. * @param i The list index of the node to be replaced. * @apilevel high-level * @ast method * */ public void setArg(Expr node, int i) { List<Expr> list = getArgList(); list.setChild(node, i); } /** * Retrieves the Arg list. * @return The node representing the Arg list. * @apilevel high-level * @ast method * */ public List<Expr> getArgs() { return getArgList(); } /** * Retrieves the Arg list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the Arg list. * @apilevel low-level * @ast method * */ public List<Expr> getArgsNoTransform() { return getArgListNoTransform(); } /** * Retrieves the Arg list. * @return The node representing the Arg list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<Expr> getArgList() { List<Expr> list = (List<Expr>)getChild(0); list.getNumChild(); return list; } /** * Retrieves the Arg list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the Arg list. * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<Expr> getArgListNoTransform() { return (List<Expr>)getChildNoTransform(0); } /** * @ast method * @aspect MethodSignature15 * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/MethodSignature.jrag:11 */ protected SimpleSet maxSpecific(Collection candidates) { SimpleSet potentiallyApplicable = potentiallyApplicable(candidates); // first phase SimpleSet maxSpecific = applicableBySubtyping(potentiallyApplicable); // second phase maxSpecific = applicableByMethodInvocationConversion(potentiallyApplicable, maxSpecific); // third phase maxSpecific = applicableVariableArity(potentiallyApplicable, maxSpecific); return maxSpecific; } /** * @ast method * @aspect MethodSignature15 * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/MethodSignature.jrag:331 */ public void typeCheck() { if(isQualified() && decl().isAbstract() && qualifier().isSuperAccess()) error("may not access abstract methods in superclass"); if(!decl().isVariableArity() || invokesVariableArityAsArray()) { for(int i = 0; i < decl().getNumParameter(); i++) { TypeDecl exprType = getArg(i).type(); TypeDecl parmType = decl().getParameter(i).type(); if(!exprType.methodInvocationConversionTo(parmType) && !exprType.isUnknown() && !parmType.isUnknown()) { error("#The type " + exprType.typeName() + " of expr " + getArg(i) + " is not compatible with the method parameter " + decl().getParameter(i)); } } } } /** * @ast method * @aspect GenericsCodegen * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/Jimple1.5Backend/GenericsCodegen.jrag:300 */ protected TypeDecl refined_GenericsCodegen_MethodAccess_methodQualifierType() { TypeDecl typeDecl = refined_InnerClasses_MethodAccess_methodQualifierType(); if(typeDecl == null) return null; typeDecl = typeDecl.erasure(); MethodDecl m = decl().sourceMethodDecl(); Collection methods = typeDecl.memberMethods(m.name()); if(!methods.contains(decl()) && !methods.contains(m)) return m.hostType(); return typeDecl.erasure(); } /** * @ast method * @aspect VariableArityParametersCodegen * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/Jimple1.5Backend/VariableArityParametersCodegen.jrag:16 */ public void transformation() { if(decl().isVariableArity() && !invokesVariableArityAsArray()) { // arguments to normal parameters List list = new List(); for(int i = 0; i < decl().getNumParameter() - 1; i++) list.add(getArg(i).fullCopy()); // arguments to variable arity parameters List last = new List(); for(int i = decl().getNumParameter() - 1; i < getNumArg(); i++) last.add(getArg(i).fullCopy()); // build an array holding arguments Access typeAccess = decl().lastParameter().type().elementType().createQualifiedAccess(); for(int i = 0; i < decl().lastParameter().type().dimension(); i++) typeAccess = new ArrayTypeAccess(typeAccess); list.add(new ArrayCreationExpr(typeAccess, new Opt(new ArrayInit(last)))); // replace argument list with augemented argument list setArgList(list); } refined_Transformations_MethodAccess_transformation(); } /** * @ast method * @aspect GenericsCodegen * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/Jimple1.5Backend/GenericsCodegen.jrag:127 */ private ArrayList buildArgList(Body b) { ArrayList list = new ArrayList(); for(int i = 0; i < getNumArg(); i++) list.add( asImmediate(b, getArg(i).type().emitCastTo(b, // MethodInvocationConversion getArg(i), decl().getParameter(i).type() ) ) ); return list; } /** * @ast method * @aspect GenericsCodegen * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/Jimple1.5Backend/GenericsCodegen.jrag:141 */ public soot.Value eval(Body b) { MethodDecl decl = decl().erasedMethod(); if(!decl().isStatic() && isQualified() && prevExpr().isSuperAccess()) { Local left = asLocal(b, createLoadQualifier(b)); ArrayList list = buildArgList(b); soot.Value result; if(!hostType().instanceOf(prevExpr().type())) { MethodDecl m = decl.createSuperAccessor(superAccessorTarget()); if(methodQualifierType().isInterfaceDecl()) result = b.newInterfaceInvokeExpr(left, m.sootRef(), list, this); else result = b.newVirtualInvokeExpr(left, m.sootRef(), list, this); } else result = b.newSpecialInvokeExpr(left, sootRef(), list, this); if(decl.type() != decl().type()) result = decl.type().emitCastTo(b, result, decl().type(), this); return type().isVoid() ? result : asLocal(b, result); } else { soot.Value result; if(!decl().isStatic()) { Local left = asLocal(b, createLoadQualifier(b)); ArrayList list = buildArgList(b); if(methodQualifierType().isInterfaceDecl()) result = b.newInterfaceInvokeExpr(left, sootRef(), list, this); else result = b.newVirtualInvokeExpr(left, sootRef(), list, this); } else { if(isQualified() && !qualifier().isTypeAccess()) b.newTemp(qualifier().eval(b)); ArrayList list = buildArgList(b); result = b.newStaticInvokeExpr(sootRef(), list, this); } if(decl.type() != decl().type()) result = decl.type().emitCastTo(b, result, decl().type(), this); return type().isVoid() ? result : asLocal(b, result); } } /** * @ast method * @aspect GenericsCodegen * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/Jimple1.5Backend/GenericsCodegen.jrag:182 */ private SootMethodRef sootRef() { MethodDecl decl = decl().erasedMethod(); ArrayList parameters = new ArrayList(); for(int i = 0; i < decl.getNumParameter(); i++) parameters.add(decl.getParameter(i).type().getSootType()); SootMethodRef ref = Scene.v().makeMethodRef( methodQualifierType().getSootClassDecl(), decl.name(), parameters, decl.type().getSootType(), decl.isStatic() ); return ref; } /** * @ast method * @aspect GenericsCodegen * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/Jimple1.5Backend/GenericsCodegen.jrag:197 */ private soot.Value createLoadQualifier(Body b) { MethodDecl m = decl().erasedMethod(); if(hasPrevExpr()) { // load explicit qualifier soot.Value v = prevExpr().eval(b); if(v == null) throw new Error("Problems evaluating " + prevExpr().getClass().getName()); Local qualifier = asLocal(b, v /*prevExpr().eval(b)*/); // pop qualifier stack element for class variables // this qualifier must be computed to ensure side effects return qualifier; } else if(!m.isStatic()) { // load implicit this qualifier return emitThis(b, methodQualifierType()); } throw new Error("createLoadQualifier not supported for " + m.getClass().getName()); } /** * @ast method * @aspect StaticImportsCodegen * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/Jimple1.5Backend/StaticImportsCodegen.jrag:18 */ protected TypeDecl methodQualifierType() { TypeDecl typeDecl = refined_GenericsCodegen_MethodAccess_methodQualifierType(); if(typeDecl != null) return typeDecl; return decl().hostType(); } /** * @ast method * @aspect TypeAnalysis * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeAnalysis.jrag:284 */ private TypeDecl refined_TypeAnalysis_MethodAccess_type() { return decl().type(); } protected java.util.Map computeDAbefore_int_Variable_values; /** * @attribute syn * @aspect DA * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DefiniteAssignment.jrag:410 */ @SuppressWarnings({"unchecked", "cast"}) public boolean computeDAbefore(int i, Variable v) { java.util.List _parameters = new java.util.ArrayList(2); _parameters.add(Integer.valueOf(i)); _parameters.add(v); if(computeDAbefore_int_Variable_values == null) computeDAbefore_int_Variable_values = new java.util.HashMap(4); if(computeDAbefore_int_Variable_values.containsKey(_parameters)) { return ((Boolean)computeDAbefore_int_Variable_values.get(_parameters)).booleanValue(); } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); boolean computeDAbefore_int_Variable_value = computeDAbefore_compute(i, v); if(isFinal && num == state().boundariesCrossed) computeDAbefore_int_Variable_values.put(_parameters, Boolean.valueOf(computeDAbefore_int_Variable_value)); return computeDAbefore_int_Variable_value; } /** * @apilevel internal */ private boolean computeDAbefore_compute(int i, Variable v) { return i == 0 ? isDAbefore(v) : getArg(i-1).isDAafter(v); } /** * @attribute syn * @aspect DA * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DefiniteAssignment.jrag:235 */ public boolean isDAafter(Variable v) { ASTNode$State state = state(); try { return getNumArg() == 0 ? isDAbefore(v) : getArg(getNumArg()-1).isDAafter(v); } finally { } } /*eq Stmt.isDAafter(Variable v) { //System.out.println("### isDAafter reached in " + getClass().getName()); //throw new NullPointerException(); throw new Error("Can not compute isDAafter for " + getClass().getName() + " at " + errorPrefix()); }* @attribute syn * @aspect DA * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DefiniteAssignment.jrag:332 */ public boolean isDAafterTrue(Variable v) { ASTNode$State state = state(); try { return (getNumArg() == 0 ? isDAbefore(v) : getArg(getNumArg()-1).isDAafter(v)) || isFalse(); } finally { } } /** * @attribute syn * @aspect DA * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DefiniteAssignment.jrag:333 */ public boolean isDAafterFalse(Variable v) { ASTNode$State state = state(); try { return (getNumArg() == 0 ? isDAbefore(v) : getArg(getNumArg()-1).isDAafter(v)) || isTrue(); } finally { } } /** * @apilevel internal */ protected boolean exceptionCollection_computed = false; /** * @apilevel internal */ protected Collection exceptionCollection_value; /** * @attribute syn * @aspect ExceptionHandling * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/ExceptionHandling.jrag:65 */ @SuppressWarnings({"unchecked", "cast"}) public Collection exceptionCollection() { if(exceptionCollection_computed) { return exceptionCollection_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); exceptionCollection_value = exceptionCollection_compute(); if(isFinal && num == state().boundariesCrossed) exceptionCollection_computed = true; return exceptionCollection_value; } /** * @apilevel internal */ private Collection exceptionCollection_compute() { //System.out.println("Computing exceptionCollection for " + name()); HashSet set = new HashSet(); Iterator iter = decls().iterator(); if(!iter.hasNext()) return set; MethodDecl m = (MethodDecl)iter.next(); //System.out.println("Processing first found method " + m.signature() + " in " + m.hostType().fullName()); for(int i = 0; i < m.getNumException(); i++) { TypeDecl exceptionType = m.getException(i).type(); set.add(exceptionType); } while(iter.hasNext()) { HashSet first = new HashSet(); first.addAll(set); HashSet second = new HashSet(); m = (MethodDecl)iter.next(); //System.out.println("Processing the next method " + m.signature() + " in " + m.hostType().fullName()); for(int i = 0; i < m.getNumException(); i++) { TypeDecl exceptionType = m.getException(i).type(); second.add(exceptionType); } set = new HashSet(); for(Iterator i1 = first.iterator(); i1.hasNext(); ) { TypeDecl firstType = (TypeDecl)i1.next(); for(Iterator i2 = second.iterator(); i2.hasNext(); ) { TypeDecl secondType = (TypeDecl)i2.next(); if(firstType.instanceOf(secondType)) { set.add(firstType); } else if(secondType.instanceOf(firstType)) { set.add(secondType); } } } } return set; } /** * @attribute syn * @aspect LookupMethod * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupMethod.jrag:66 */ public MethodDecl singleCandidateDecl() { ASTNode$State state = state(); try { MethodDecl result = null; for(Iterator iter = lookupMethod(name()).iterator(); iter.hasNext(); ) { MethodDecl m = (MethodDecl)iter.next(); if(result == null) result = m; else if(m.getNumParameter() == getNumArg() && result.getNumParameter() != getNumArg()) result = m; } return result; } finally { } } /** * @apilevel internal */ protected boolean decls_computed = false; /** * @apilevel internal */ protected SimpleSet decls_value; /** * @attribute syn * @aspect LookupMethod * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupMethod.jrag:96 */ @SuppressWarnings({"unchecked", "cast"}) public SimpleSet decls() { if(decls_computed) { return decls_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); decls_value = decls_compute(); if(isFinal && num == state().boundariesCrossed) decls_computed = true; return decls_value; } /** * @apilevel internal */ private SimpleSet decls_compute() { SimpleSet maxSpecific = maxSpecific(lookupMethod(name())); if(isQualified() ? qualifier().staticContextQualifier() : inStaticContext()) maxSpecific = removeInstanceMethods(maxSpecific); return maxSpecific; } /** * @apilevel internal */ protected boolean decl_computed = false; /** * @apilevel internal */ protected MethodDecl decl_value; /** * @attribute syn * @aspect LookupMethod * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupMethod.jrag:103 */ @SuppressWarnings({"unchecked", "cast"}) public MethodDecl decl() { if(decl_computed) { return decl_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); decl_value = decl_compute(); if(isFinal && num == state().boundariesCrossed) decl_computed = true; return decl_value; } /** * @apilevel internal */ private MethodDecl decl_compute() { SimpleSet decls = decls(); if(decls.size() == 1) return (MethodDecl)decls.iterator().next(); // 8.4.6.4 - only return the first method in case of multply inherited abstract methods boolean allAbstract = true; for(Iterator iter = decls.iterator(); iter.hasNext() && allAbstract; ) { MethodDecl m = (MethodDecl)iter.next(); if(!m.isAbstract() && !m.hostType().isObject()) allAbstract = false; } if(decls.size() > 1 && allAbstract) return (MethodDecl)decls.iterator().next(); return unknownMethod(); } /** * @attribute syn * @aspect MethodDecl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupMethod.jrag:170 */ public boolean accessible(MethodDecl m) { ASTNode$State state = state(); try { if(!isQualified()) return true; if(!m.accessibleFrom(hostType())) return false; // the method is not accessible if the type is not accessible if(!qualifier().type().accessibleFrom(hostType())) return false; // 6.6.2.1 - include qualifier type for protected access if(m.isProtected() && !m.hostPackage().equals(hostPackage()) && !m.isStatic() && !qualifier().isSuperAccess()) { return hostType().mayAccess(this, m); } return true; } finally { } } /** * @attribute syn * @aspect NameCheck * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/NameCheck.jrag:65 */ public boolean validArgs() { ASTNode$State state = state(); try { for(int i = 0; i < getNumArg(); i++) if(getArg(i).type().isUnknown()) return false; return true; } finally { } } /** * @attribute syn * @aspect PrettyPrint * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/PrettyPrint.jadd:800 */ public String dumpString() { ASTNode$State state = state(); try { return getClass().getName() + " [" + getID() + "]"; } finally { } } /** * @attribute syn * @aspect Names * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/QualifiedNames.jrag:18 */ public String name() { ASTNode$State state = state(); try { return getID(); } finally { } } /** * @attribute syn * @aspect AccessTypes * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/ResolveAmbiguousNames.jrag:17 */ public boolean isMethodAccess() { ASTNode$State state = state(); try { return true; } finally { } } /** * @attribute syn * @aspect SyntacticClassification * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/SyntacticClassification.jrag:56 */ public NameType predNameType() { ASTNode$State state = state(); try { return NameType.AMBIGUOUS_NAME; } finally { } } /** * @apilevel internal */ protected boolean type_computed = false; /** * @apilevel internal */ protected TypeDecl type_value; /** * @attribute syn * @aspect Generics * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:32 */ @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; } /** * @apilevel internal */ private TypeDecl type_compute() { if(getNumArg() == 0 && name().equals("getClass") && decl().hostType().isObject()) { TypeDecl bound = isQualified() ? qualifier().type() : hostType(); ArrayList args = new ArrayList(); args.add(bound.erasure().asWildcardExtends()); return ((GenericClassDecl)lookupType("java.lang", "Class")).lookupParTypeDecl(args); } else return refined_TypeAnalysis_MethodAccess_type(); } /** * @attribute syn * @aspect MethodSignature15 * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/MethodSignature.jrag:181 */ public boolean applicableBySubtyping(MethodDecl m) { ASTNode$State state = state(); try { if(m.getNumParameter() != getNumArg()) return false; for(int i = 0; i < m.getNumParameter(); i++) if(!getArg(i).type().instanceOf(m.getParameter(i).type())) return false; return true; } finally { } } /** * @attribute syn * @aspect MethodSignature15 * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/MethodSignature.jrag:201 */ public boolean applicableByMethodInvocationConversion(MethodDecl m) { ASTNode$State state = state(); try { if(m.getNumParameter() != getNumArg()) return false; for(int i = 0; i < m.getNumParameter(); i++) if(!getArg(i).type().methodInvocationConversionTo(m.getParameter(i).type())) return false; return true; } finally { } } /** * @attribute syn * @aspect MethodSignature15 * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/MethodSignature.jrag:221 */ public boolean applicableVariableArity(MethodDecl m) { ASTNode$State state = state(); try { for(int i = 0; i < m.getNumParameter() - 1; i++) if(!getArg(i).type().methodInvocationConversionTo(m.getParameter(i).type())) return false; for(int i = m.getNumParameter() - 1; i < getNumArg(); i++) if(!getArg(i).type().methodInvocationConversionTo(m.lastParameter().type().componentType())) return false; return true; } finally { } } /** * @attribute syn * @aspect MethodSignature15 * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/MethodSignature.jrag:262 */ public boolean potentiallyApplicable(MethodDecl m) { ASTNode$State state = state(); try { if(!m.name().equals(name())) return false; if(!m.accessibleFrom(hostType())) return false; if(m.isVariableArity() && !(arity() >= m.arity()-1)) return false; if(!m.isVariableArity() && !(m.arity() == arity())) return false; if(m instanceof GenericMethodDecl) { GenericMethodDecl gm = (GenericMethodDecl)m; ArrayList list = typeArguments(m); if(list.size() != 0) { if(gm.getNumTypeParameter() != list.size()) return false; for(int i = 0; i < gm.getNumTypeParameter(); i++) if(!((TypeDecl)list.get(i)).subtype(gm.original().getTypeParameter(i))) return false; } } return true; } finally { } } /** * @attribute syn * @aspect MethodSignature15 * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/MethodSignature.jrag:285 */ public int arity() { ASTNode$State state = state(); try { return getNumArg(); } finally { } } protected java.util.Map typeArguments_MethodDecl_values; /** * @attribute syn * @aspect MethodSignature15 * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/MethodSignature.jrag:287 */ @SuppressWarnings({"unchecked", "cast"}) public ArrayList typeArguments(MethodDecl m) { Object _parameters = m; if(typeArguments_MethodDecl_values == null) typeArguments_MethodDecl_values = new java.util.HashMap(4); if(typeArguments_MethodDecl_values.containsKey(_parameters)) { return (ArrayList)typeArguments_MethodDecl_values.get(_parameters); } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); ArrayList typeArguments_MethodDecl_value = typeArguments_compute(m); if(isFinal && num == state().boundariesCrossed) typeArguments_MethodDecl_values.put(_parameters, typeArguments_MethodDecl_value); return typeArguments_MethodDecl_value; } /** * @apilevel internal */ private ArrayList typeArguments_compute(MethodDecl m) { ArrayList typeArguments = new ArrayList(); if(m instanceof GenericMethodDecl) { GenericMethodDecl g = (GenericMethodDecl)m; Collection arguments = computeConstraints(g); if(arguments.isEmpty()) return typeArguments; int i = 0; for(Iterator iter = arguments.iterator(); iter.hasNext(); i++) { TypeDecl typeDecl = (TypeDecl)iter.next(); if(typeDecl == null) { TypeVariable v = g.original().getTypeParameter(i); if(v.getNumTypeBound() == 0) typeDecl = typeObject(); else if(v.getNumTypeBound() == 1) typeDecl = v.getTypeBound(0).type(); else typeDecl = v.lubType(); } typeArguments.add(typeDecl); } } return typeArguments; } /** * @attribute syn * @aspect VariableArityParameters * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/VariableArityParameters.jrag:40 */ public boolean invokesVariableArityAsArray() { ASTNode$State state = state(); try { if(!decl().isVariableArity()) return false; if(arity() != decl().arity()) return false; return getArg(getNumArg()-1).type().methodInvocationConversionTo(decl().lastParameter().type()); } finally { } } /** * @attribute syn * @aspect InnerClasses * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Backend/InnerClasses.jrag:385 */ public boolean requiresAccessor() { ASTNode$State state = state(); try { MethodDecl m = decl(); if(m.isPrivate() && m.hostType() != hostType()) return true; if(m.isProtected() && !m.hostPackage().equals(hostPackage()) && !hostType().hasMethod(m.name())) return true; return false; } finally { } } /** * @attribute inh * @aspect ExceptionHandling * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/ExceptionHandling.jrag:43 */ @SuppressWarnings({"unchecked", "cast"}) public boolean handlesException(TypeDecl exceptionType) { ASTNode$State state = state(); boolean handlesException_TypeDecl_value = getParent().Define_boolean_handlesException(this, null, exceptionType); return handlesException_TypeDecl_value; } /** * @attribute inh * @aspect LookupMethod * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupMethod.jrag:15 */ @SuppressWarnings({"unchecked", "cast"}) public MethodDecl unknownMethod() { ASTNode$State state = state(); MethodDecl unknownMethod_value = getParent().Define_MethodDecl_unknownMethod(this, null); return unknownMethod_value; } /** * @attribute inh * @aspect TypeHierarchyCheck * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeHierarchyCheck.jrag:123 */ @SuppressWarnings({"unchecked", "cast"}) public boolean inExplicitConstructorInvocation() { ASTNode$State state = state(); boolean inExplicitConstructorInvocation_value = getParent().Define_boolean_inExplicitConstructorInvocation(this, null); return inExplicitConstructorInvocation_value; } /** * @attribute inh * @aspect GenericMethodsInference * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericMethodsInference.jrag:43 */ @SuppressWarnings({"unchecked", "cast"}) public TypeDecl typeObject() { ASTNode$State state = state(); TypeDecl typeObject_value = getParent().Define_TypeDecl_typeObject(this, null); return typeObject_value; } /** * @attribute inh * @aspect SuppressWarnings * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/SuppressWarnings.jrag:18 */ @SuppressWarnings({"unchecked", "cast"}) public boolean withinSuppressWarnings(String s) { ASTNode$State state = state(); boolean withinSuppressWarnings_String_value = getParent().Define_boolean_withinSuppressWarnings(this, null, s); return withinSuppressWarnings_String_value; } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DefiniteAssignment.jrag:409 * @apilevel internal */ public boolean Define_boolean_isDAbefore(ASTNode caller, ASTNode child, Variable v) { if(caller == getArgListNoTransform()) { int i = caller.getIndexOfChild(child); return computeDAbefore(i, v); } else { return getParent().Define_boolean_isDAbefore(this, caller, v); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupMethod.jrag:28 * @apilevel internal */ public Collection Define_Collection_lookupMethod(ASTNode caller, ASTNode child, String name) { if(caller == getArgListNoTransform()) { int childIndex = caller.getIndexOfChild(child); return unqualifiedScope().lookupMethod(name); } else { return getParent().Define_Collection_lookupMethod(this, caller, name); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupType.jrag:87 * @apilevel internal */ public boolean Define_boolean_hasPackage(ASTNode caller, ASTNode child, String packageName) { if(caller == getArgListNoTransform()) { int childIndex = caller.getIndexOfChild(child); return unqualifiedScope().hasPackage(packageName); } else { return getParent().Define_boolean_hasPackage(this, caller, packageName); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupType.jrag:253 * @apilevel internal */ public SimpleSet Define_SimpleSet_lookupType(ASTNode caller, ASTNode child, String name) { if(caller == getArgListNoTransform()) { int childIndex = caller.getIndexOfChild(child); return unqualifiedScope().lookupType(name); } else { return getParent().Define_SimpleSet_lookupType(this, caller, name); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupVariable.jrag:132 * @apilevel internal */ public SimpleSet Define_SimpleSet_lookupVariable(ASTNode caller, ASTNode child, String name) { if(caller == getArgListNoTransform()) { int childIndex = caller.getIndexOfChild(child); return unqualifiedScope().lookupVariable(name); } else { return getParent().Define_SimpleSet_lookupVariable(this, caller, name); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/SyntacticClassification.jrag:120 * @apilevel internal */ public NameType Define_NameType_nameType(ASTNode caller, ASTNode child) { if(caller == getArgListNoTransform()) { int childIndex = caller.getIndexOfChild(child); return NameType.EXPRESSION_NAME; } else { return getParent().Define_NameType_nameType(this, caller); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeHierarchyCheck.jrag:17 * @apilevel internal */ public String Define_String_methodHost(ASTNode caller, ASTNode child) { { int childIndex = this.getIndexOfChild(caller); return unqualifiedScope().methodHost(); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericMethodsInference.jrag:41 * @apilevel internal */ public TypeDecl Define_TypeDecl_assignConvertedType(ASTNode caller, ASTNode child) { if(caller == getArgListNoTransform()) { int childIndex = caller.getIndexOfChild(child); return typeObject(); } else { return getParent().Define_TypeDecl_assignConvertedType(this, caller); } } /** * @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); } }
53,674
32.504994
172
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/MethodDecl.java
/* This file was generated with JastAdd2 (http://jastadd.org) version R20130212 (r1031) */ package soot.JastAddJ; import java.util.ArrayList; import java.util.Collection; import java.util.HashSet; import java.util.Iterator; import soot.Scene; import soot.SootMethod; import soot.SootMethodRef; import soot.jimple.Jimple; import soot.jimple.JimpleBody; /** * @production MethodDecl : {@link MemberDecl} ::= * <span class="component">{@link Modifiers}</span> * <span class="component">TypeAccess:{@link Access}</span> * <span class="component">&lt;ID:String&gt;</span> <span class= * "component">Parameter:{@link ParameterDeclaration}*</span> * <span class="component">Exception:{@link Access}*</span> * <span class="component">[{@link Block}]</span>; * @ast node * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/java.ast:95 */ public class MethodDecl extends MemberDecl implements Cloneable, SimpleSet, Iterator { /** * @apilevel low-level */ public void flushCache() { super.flushCache(); accessibleFrom_TypeDecl_values = null; throwsException_TypeDecl_values = null; signature_computed = false; signature_value = null; moreSpecificThan_MethodDecl_values = null; overrides_MethodDecl_values = null; hides_MethodDecl_values = null; parameterDeclaration_String_values = null; type_computed = false; type_value = null; usesTypeVariable_computed = false; sourceMethodDecl_computed = false; sourceMethodDecl_value = null; sootMethod_computed = false; sootMethod_value = null; sootRef_computed = false; sootRef_value = null; offsetBeforeParameters_computed = false; offsetAfterParameters_computed = false; handlesException_TypeDecl_values = null; } /** * @apilevel internal */ public void flushCollectionCache() { super.flushCollectionCache(); } /** * @apilevel internal */ @SuppressWarnings({ "unchecked", "cast" }) public MethodDecl clone() throws CloneNotSupportedException { MethodDecl node = (MethodDecl) super.clone(); node.accessibleFrom_TypeDecl_values = null; node.throwsException_TypeDecl_values = null; node.signature_computed = false; node.signature_value = null; node.moreSpecificThan_MethodDecl_values = null; node.overrides_MethodDecl_values = null; node.hides_MethodDecl_values = null; node.parameterDeclaration_String_values = null; node.type_computed = false; node.type_value = null; node.usesTypeVariable_computed = false; node.sourceMethodDecl_computed = false; node.sourceMethodDecl_value = null; node.sootMethod_computed = false; node.sootMethod_value = null; node.sootRef_computed = false; node.sootRef_value = null; node.offsetBeforeParameters_computed = false; node.offsetAfterParameters_computed = false; node.handlesException_TypeDecl_values = null; node.in$Circle(false); node.is$Final(false); return node; } /** * @apilevel internal */ @SuppressWarnings({ "unchecked", "cast" }) public MethodDecl copy() { try { MethodDecl node = (MethodDecl) clone(); node.parent = null; if (children != null) node.children = (ASTNode[]) children.clone(); return node; } catch (CloneNotSupportedException e) { throw new Error("Error: clone not supported for " + getClass().getName()); } } /** * Create a deep copy of the AST subtree at this node. The copy is dangling, * i.e. has no parent. * * @return dangling copy of the subtree at this node * @apilevel low-level */ @SuppressWarnings({ "unchecked", "cast" }) public MethodDecl fullCopy() { MethodDecl tree = (MethodDecl) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) children[i]; if (child != null) { child = child.fullCopy(); tree.setChild(child, i); } } } return tree; } /** * @ast method * @aspect BoundNames * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/BoundNames.jrag:77 */ public Access createBoundAccess(List args) { if (isStatic()) { return hostType().createQualifiedAccess().qualifiesAccess(new BoundMethodAccess(name(), args, this)); } return new BoundMethodAccess(name(), args, this); } /** * @ast method * @aspect DataStructures * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DataStructures.jrag:154 */ public SimpleSet add(Object o) { return new SimpleSetImpl().add(this).add(o); } /** * @ast method * @aspect DataStructures * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DataStructures.jrag:158 */ public boolean isSingleton() { return true; } /** * @ast method * @aspect DataStructures * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DataStructures.jrag:159 */ public boolean isSingleton(Object o) { return contains(o); } /** * @ast method * @aspect DataStructures * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DataStructures.jrag:162 */ private MethodDecl iterElem; /** * @ast method * @aspect DataStructures * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DataStructures.jrag:163 */ public Iterator iterator() { iterElem = this; return this; } /** * @ast method * @aspect DataStructures * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DataStructures.jrag:164 */ public boolean hasNext() { return iterElem != null; } /** * @ast method * @aspect DataStructures * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DataStructures.jrag:165 */ public Object next() { Object o = iterElem; iterElem = null; return o; } /** * @ast method * @aspect DataStructures * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DataStructures.jrag:166 */ public void remove() { throw new UnsupportedOperationException(); } /** * @ast method * @aspect NameCheck * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/NameCheck.jrag:101 */ public void nameCheck() { // 8.4 // 8.4.2 if (!hostType().methodsSignature(signature()).contains(this)) error("method with signature " + signature() + " is multiply declared in type " + hostType().typeName()); // 8.4.3.4 if (isNative() && hasBlock()) error("native methods must have an empty semicolon body"); // 8.4.5 if (isAbstract() && hasBlock()) error("abstract methods must have an empty semicolon body"); // 8.4.5 if (!hasBlock() && !(isNative() || isAbstract())) error("only abstract and native methods may have an empty semicolon body"); } /** * @ast method * @aspect PrettyPrint * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/PrettyPrint.jadd:176 */ public void toString(StringBuffer s) { s.append(indent()); getModifiers().toString(s); getTypeAccess().toString(s); s.append(" " + name() + "("); if (getNumParameter() > 0) { getParameter(0).toString(s); for (int i = 1; i < getNumParameter(); i++) { s.append(", "); getParameter(i).toString(s); } } s.append(")"); if (getNumException() > 0) { s.append(" throws "); getException(0).toString(s); for (int i = 1; i < getNumException(); i++) { s.append(", "); getException(i).toString(s); } } if (hasBlock()) { s.append(" "); getBlock().toString(s); } else { s.append(";"); } } /** * @ast method * @aspect TypeCheck * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeCheck.jrag:386 */ public void typeCheck() { // Thrown vs super class method see MethodDecl.nameCheck // 8.4.4 TypeDecl exceptionType = typeThrowable(); for (int i = 0; i < getNumException(); i++) { TypeDecl typeDecl = getException(i).type(); if (!typeDecl.instanceOf(exceptionType)) error(signature() + " throws non throwable type " + typeDecl.fullName()); } // check returns if (!isVoid() && hasBlock() && getBlock().canCompleteNormally()) error("the body of a non void method may not complete normally"); } /** * @ast method * @aspect LookupParTypeDecl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:1242 */ public BodyDecl substitutedBodyDecl(Parameterization parTypeDecl) { // System.out.println("Begin substituting " + signature() + " in " + // hostType().typeName() + " with " + parTypeDecl.typeSignature()); MethodDecl m = new MethodDeclSubstituted((Modifiers) getModifiers().fullCopy(), getTypeAccess().type().substituteReturnType(parTypeDecl), getID(), getParameterList().substitute(parTypeDecl), getExceptionList().substitute(parTypeDecl), substituteBody(parTypeDecl), this); // System.out.println("End substituting " + signature()); return m; } /** * @ast method * @aspect LookupParTypeDecl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:1257 */ public Opt substituteBody(Parameterization parTypeDecl) { return new Opt(); } /** * @ast method * @aspect InnerClasses * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Backend/InnerClasses.jrag:199 */ public MethodDecl createAccessor(TypeDecl methodQualifier) { MethodDecl m = (MethodDecl) methodQualifier.getAccessor(this, "method"); if (m != null) return m; int accessorIndex = methodQualifier.accessorCounter++; List parameterList = new List(); for (int i = 0; i < getNumParameter(); i++) parameterList.add(new ParameterDeclaration( // We don't need to create a qualified access to the type // here // since there can be no ambiguity concerning unqualified // type names in an inner/enclosing class // Jesper 2012-05-04 // FALSE! We need to create a qualified access in case the // method we are generating an access for is not declared // in the methodQualifier type getParameter(i).type().createQualifiedAccess(), getParameter(i).name())); List exceptionList = new List(); for (int i = 0; i < getNumException(); i++) exceptionList.add((Access) getException(i).fullCopy()); // add synthetic flag to modifiers Modifiers modifiers = new Modifiers(new List()); if (getModifiers().isStatic()) modifiers.addModifier(new Modifier("static")); modifiers.addModifier(new Modifier("synthetic")); modifiers.addModifier(new Modifier("public")); // build accessor declaration m = new MethodDecl(modifiers, getTypeAccess().type().createQualifiedAccess(), name() + "$access$" + accessorIndex, parameterList, exceptionList, new Opt(new Block(new List().add(createAccessorStmt())))); m = methodQualifier.addMemberMethod(m); methodQualifier.addAccessor(this, "method", m); return m; } /** * @ast method * @aspect InnerClasses * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Backend/InnerClasses.jrag:247 */ private Stmt createAccessorStmt() { List argumentList = new List(); for (int i = 0; i < getNumParameter(); i++) argumentList.add(new VarAccess(getParameter(i).name())); Access access = new BoundMethodAccess(name(), argumentList, this); if (!isStatic()) access = new ThisAccess("this").qualifiesAccess(access); return isVoid() ? (Stmt) new ExprStmt(access) : new ReturnStmt(new Opt(access)); } /** * @ast method * @aspect InnerClasses * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Backend/InnerClasses.jrag:257 */ public MethodDecl createSuperAccessor(TypeDecl methodQualifier) { MethodDecl m = (MethodDecl) methodQualifier.getAccessor(this, "method_super"); if (m != null) return m; int accessorIndex = methodQualifier.accessorCounter++; List parameters = new List(); List args = new List(); for (int i = 0; i < getNumParameter(); i++) { parameters.add(new ParameterDeclaration(getParameter(i).type(), getParameter(i).name())); args.add(new VarAccess(getParameter(i).name())); } Stmt stmt; if (type().isVoid()) stmt = new ExprStmt(new SuperAccess("super").qualifiesAccess(new MethodAccess(name(), args))); else stmt = new ReturnStmt(new Opt(new SuperAccess("super").qualifiesAccess(new MethodAccess(name(), args)))); m = new MethodDecl(new Modifiers(new List().add(new Modifier("synthetic"))), type().createQualifiedAccess(), name() + "$access$" + accessorIndex, parameters, new List(), new Opt(new Block(new List().add(stmt)))); m = methodQualifier.addMemberMethod(m); methodQualifier.addAccessor(this, "method_super", m); return m; } /** * @ast method * @aspect EmitJimple * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/EmitJimple.jrag:210 */ public void jimplify1phase2() { String name = name(); ArrayList parameters = new ArrayList(); ArrayList paramnames = new ArrayList(); for (int i = 0; i < getNumParameter(); i++) { parameters.add(getParameter(i).type().getSootType()); paramnames.add(getParameter(i).name()); } soot.Type returnType = type().getSootType(); int modifiers = sootTypeModifiers(); ArrayList throwtypes = new ArrayList(); for (int i = 0; i < getNumException(); i++) throwtypes.add(getException(i).type().getSootClassDecl()); String signature = SootMethod.getSubSignature(name, parameters, returnType); if (!hostType().getSootClassDecl().declaresMethod(signature)) { SootMethod m = Scene.v().makeSootMethod(name, parameters, returnType, modifiers, throwtypes); hostType().getSootClassDecl().addMethod(m); m.addTag(new soot.tagkit.ParamNamesTag(paramnames)); sootMethod = m; } else { sootMethod = hostType().getSootClassDecl().getMethod(signature); } addAttributes(); } /** * @ast method * @aspect EmitJimple * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/EmitJimple.jrag:268 */ public SootMethod sootMethod; /** * @ast method * @aspect AnnotationsCodegen * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/Jimple1.5Backend/AnnotationsCodegen.jrag:43 */ public void addAttributes() { super.addAttributes(); ArrayList c = new ArrayList(); getModifiers().addRuntimeVisibleAnnotationsAttribute(c); getModifiers().addRuntimeInvisibleAnnotationsAttribute(c); addRuntimeVisibleParameterAnnotationsAttribute(c); addRuntimeInvisibleParameterAnnotationsAttribute(c); addSourceLevelParameterAnnotationsAttribute(c); getModifiers().addSourceOnlyAnnotations(c); for (Iterator iter = c.iterator(); iter.hasNext();) { soot.tagkit.Tag tag = (soot.tagkit.Tag) iter.next(); sootMethod.addTag(tag); } } /** * @ast method * @aspect AnnotationsCodegen * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/Jimple1.5Backend/AnnotationsCodegen.jrag:163 */ public void addRuntimeVisibleParameterAnnotationsAttribute(Collection c) { boolean foundVisibleAnnotations = false; Collection annotations = new ArrayList(getNumParameter()); for (int i = 0; i < getNumParameter(); i++) { Collection a = getParameter(i).getModifiers().runtimeVisibleAnnotations(); if (!a.isEmpty()) foundVisibleAnnotations = true; soot.tagkit.VisibilityAnnotationTag tag = new soot.tagkit.VisibilityAnnotationTag( soot.tagkit.AnnotationConstants.RUNTIME_VISIBLE); for (Iterator iter = a.iterator(); iter.hasNext();) { Annotation annotation = (Annotation) iter.next(); ArrayList elements = new ArrayList(1); annotation.appendAsAttributeTo(elements); tag.addAnnotation((soot.tagkit.AnnotationTag) elements.get(0)); } annotations.add(tag); } if (foundVisibleAnnotations) { soot.tagkit.VisibilityParameterAnnotationTag tag = new soot.tagkit.VisibilityParameterAnnotationTag( annotations.size(), soot.tagkit.AnnotationConstants.RUNTIME_VISIBLE); for (Iterator iter = annotations.iterator(); iter.hasNext();) { tag.addVisibilityAnnotation((soot.tagkit.VisibilityAnnotationTag) iter.next()); } c.add(tag); } } /** * @ast method * @aspect AnnotationsCodegen * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/Jimple1.5Backend/AnnotationsCodegen.jrag:219 */ public void addRuntimeInvisibleParameterAnnotationsAttribute(Collection c) { boolean foundVisibleAnnotations = false; Collection annotations = new ArrayList(getNumParameter()); for (int i = 0; i < getNumParameter(); i++) { Collection a = getParameter(i).getModifiers().runtimeInvisibleAnnotations(); if (!a.isEmpty()) foundVisibleAnnotations = true; soot.tagkit.VisibilityAnnotationTag tag = new soot.tagkit.VisibilityAnnotationTag( soot.tagkit.AnnotationConstants.RUNTIME_INVISIBLE); for (Iterator iter = a.iterator(); iter.hasNext();) { Annotation annotation = (Annotation) iter.next(); ArrayList elements = new ArrayList(1); annotation.appendAsAttributeTo(elements); tag.addAnnotation((soot.tagkit.AnnotationTag) elements.get(0)); } annotations.add(tag); } if (foundVisibleAnnotations) { soot.tagkit.VisibilityParameterAnnotationTag tag = new soot.tagkit.VisibilityParameterAnnotationTag( annotations.size(), soot.tagkit.AnnotationConstants.RUNTIME_INVISIBLE); for (Iterator iter = annotations.iterator(); iter.hasNext();) { tag.addVisibilityAnnotation((soot.tagkit.VisibilityAnnotationTag) iter.next()); } c.add(tag); } } /** * @ast method * @aspect AnnotationsCodegen * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/Jimple1.5Backend/AnnotationsCodegen.jrag:274 */ public void addSourceLevelParameterAnnotationsAttribute(Collection c) { boolean foundVisibleAnnotations = false; Collection annotations = new ArrayList(getNumParameter()); for (int i = 0; i < getNumParameter(); i++) { getParameter(i).getModifiers().addSourceOnlyAnnotations(c); } } /** * @ast method * @aspect GenericsCodegen * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/Jimple1.5Backend/GenericsCodegen.jrag:342 */ public void transformation() { super.transformation(); HashSet processed = new HashSet(); for (Iterator iter = hostType().bridgeCandidates(signature()).iterator(); iter.hasNext();) { MethodDecl m = (MethodDecl) iter.next(); if (this.overrides(m)) { MethodDecl erased = m.erasedMethod(); if (!erased.signature().equals(signature()) || erased.type().erasure() != type().erasure()) { StringBuffer keyBuffer = new StringBuffer(); for (int i = 0; i < getNumParameter(); i++) { keyBuffer.append(erased.getParameter(i).type().erasure().fullName()); } keyBuffer.append(erased.type().erasure().fullName()); String key = keyBuffer.toString(); if (!processed.contains(key)) { processed.add(key); List args = new List(); List parameters = new List(); for (int i = 0; i < getNumParameter(); i++) { args.add(new CastExpr(getParameter(i).type().erasure().createBoundAccess(), new VarAccess("p" + i))); parameters.add(new ParameterDeclaration(erased.getParameter(i).type().erasure(), "p" + i)); } Stmt stmt; if (type().isVoid()) { stmt = new ExprStmt(createBoundAccess(args)); } else { stmt = new ReturnStmt(createBoundAccess(args)); } List modifiersList = new List(); if (isPublic()) modifiersList.add(new Modifier("public")); else if (isProtected()) modifiersList.add(new Modifier("protected")); else if (isPrivate()) modifiersList.add(new Modifier("private")); MethodDecl bridge = new BridgeMethodDecl(new Modifiers(modifiersList), erased.type().erasure().createBoundAccess(), erased.name(), parameters, (List) getExceptionList().fullCopy(), new Opt(new Block(new List().add(stmt)))); hostType().addBodyDecl(bridge); } } } } } /** * Check if the method is missing a SafeVarargs annotation. * * @ast method * @aspect SafeVarargs * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/SafeVarargs.jrag:151 */ public void checkWarnings() { // check for illegal use of @SafeVarargs super.checkWarnings(); if (!suppressWarnings("unchecked") && !hasAnnotationSafeVarargs() && isVariableArity() && !getParameter(getNumParameter() - 1).type().isReifiable()) warning("possible heap pollution for " + "variable arity parameter"); } /** * @ast method * */ public MethodDecl() { super(); } /** * Initializes the child array to the correct size. Initializes List and Opt * nta children. * * @apilevel internal * @ast method * @ast method * */ public void init$Children() { children = new ASTNode[5]; setChild(new List(), 2); setChild(new List(), 3); setChild(new Opt(), 4); } /** * @ast method * */ public MethodDecl(Modifiers p0, Access p1, String p2, List<ParameterDeclaration> p3, List<Access> p4, Opt<Block> p5) { setChild(p0, 0); setChild(p1, 1); setID(p2); setChild(p3, 2); setChild(p4, 3); setChild(p5, 4); } /** * @ast method * */ public MethodDecl(Modifiers p0, Access p1, beaver.Symbol p2, List<ParameterDeclaration> p3, List<Access> p4, Opt<Block> p5) { setChild(p0, 0); setChild(p1, 1); setID(p2); setChild(p3, 2); setChild(p4, 3); setChild(p5, 4); } /** * @apilevel low-level * @ast method * */ protected int numChildren() { return 5; } /** * @apilevel internal * @ast method * */ public boolean mayHaveRewrite() { return false; } /** * Replaces the Modifiers child. * * @param node * The new node to replace the Modifiers child. * @apilevel high-level * @ast method * */ public void setModifiers(Modifiers node) { setChild(node, 0); } /** * Retrieves the Modifiers child. * * @return The current node used as the Modifiers child. * @apilevel high-level * @ast method * */ public Modifiers getModifiers() { return (Modifiers) getChild(0); } /** * Retrieves the Modifiers child. * <p> * <em>This method does not invoke AST transformations.</em> * </p> * * @return The current node used as the Modifiers child. * @apilevel low-level * @ast method * */ public Modifiers getModifiersNoTransform() { return (Modifiers) getChildNoTransform(0); } /** * Replaces the TypeAccess child. * * @param node * The new node to replace the TypeAccess child. * @apilevel high-level * @ast method * */ public void setTypeAccess(Access node) { setChild(node, 1); } /** * Retrieves the TypeAccess child. * * @return The current node used as the TypeAccess child. * @apilevel high-level * @ast method * */ public Access getTypeAccess() { return (Access) getChild(1); } /** * Retrieves the TypeAccess child. * <p> * <em>This method does not invoke AST transformations.</em> * </p> * * @return The current node used as the TypeAccess child. * @apilevel low-level * @ast method * */ public Access getTypeAccessNoTransform() { return (Access) getChildNoTransform(1); } /** * Replaces the lexeme ID. * * @param value * The new value for the lexeme ID. * @apilevel high-level * @ast method * */ public void setID(String value) { tokenString_ID = value; } /** * @apilevel internal * @ast method * */ /** * @apilevel internal */ protected String tokenString_ID; /** * @ast method * */ public int IDstart; /** * @ast method * */ public int IDend; /** * JastAdd-internal setter for lexeme ID using the Beaver parser. * * @apilevel internal * @ast method * */ 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(); } /** * Retrieves the value for the lexeme ID. * * @return The value for the lexeme ID. * @apilevel high-level * @ast method * */ public String getID() { return tokenString_ID != null ? tokenString_ID : ""; } /** * Replaces the Parameter list. * * @param list * The new list node to be used as the Parameter list. * @apilevel high-level * @ast method * */ public void setParameterList(List<ParameterDeclaration> list) { setChild(list, 2); } /** * Retrieves the number of children in the Parameter list. * * @return Number of children in the Parameter list. * @apilevel high-level * @ast method * */ public int getNumParameter() { return getParameterList().getNumChild(); } /** * Retrieves the number of children in the Parameter list. Calling this * method will not trigger rewrites.. * * @return Number of children in the Parameter list. * @apilevel low-level * @ast method * */ public int getNumParameterNoTransform() { return getParameterListNoTransform().getNumChildNoTransform(); } /** * Retrieves the element at index {@code i} in the Parameter list.. * * @param i * Index of the element to return. * @return The element at position {@code i} in the Parameter list. * @apilevel high-level * @ast method * */ @SuppressWarnings({ "unchecked", "cast" }) public ParameterDeclaration getParameter(int i) { return (ParameterDeclaration) getParameterList().getChild(i); } /** * Append an element to the Parameter list. * * @param node * The element to append to the Parameter list. * @apilevel high-level * @ast method * */ public void addParameter(ParameterDeclaration node) { List<ParameterDeclaration> list = (parent == null || state == null) ? getParameterListNoTransform() : getParameterList(); list.addChild(node); } /** * @apilevel low-level * @ast method * */ public void addParameterNoTransform(ParameterDeclaration node) { List<ParameterDeclaration> list = getParameterListNoTransform(); list.addChild(node); } /** * Replaces the Parameter list element at index {@code i} with the new node * {@code node}. * * @param node * The new node to replace the old list element. * @param i * The list index of the node to be replaced. * @apilevel high-level * @ast method * */ public void setParameter(ParameterDeclaration node, int i) { List<ParameterDeclaration> list = getParameterList(); list.setChild(node, i); } /** * Retrieves the Parameter list. * * @return The node representing the Parameter list. * @apilevel high-level * @ast method * */ public List<ParameterDeclaration> getParameters() { return getParameterList(); } /** * Retrieves the Parameter list. * <p> * <em>This method does not invoke AST transformations.</em> * </p> * * @return The node representing the Parameter list. * @apilevel low-level * @ast method * */ public List<ParameterDeclaration> getParametersNoTransform() { return getParameterListNoTransform(); } /** * Retrieves the Parameter list. * * @return The node representing the Parameter list. * @apilevel high-level * @ast method * */ @SuppressWarnings({ "unchecked", "cast" }) public List<ParameterDeclaration> getParameterList() { List<ParameterDeclaration> list = (List<ParameterDeclaration>) getChild(2); list.getNumChild(); return list; } /** * Retrieves the Parameter list. * <p> * <em>This method does not invoke AST transformations.</em> * </p> * * @return The node representing the Parameter list. * @apilevel low-level * @ast method * */ @SuppressWarnings({ "unchecked", "cast" }) public List<ParameterDeclaration> getParameterListNoTransform() { return (List<ParameterDeclaration>) getChildNoTransform(2); } /** * Replaces the Exception list. * * @param list * The new list node to be used as the Exception list. * @apilevel high-level * @ast method * */ public void setExceptionList(List<Access> list) { setChild(list, 3); } /** * Retrieves the number of children in the Exception list. * * @return Number of children in the Exception list. * @apilevel high-level * @ast method * */ public int getNumException() { return getExceptionList().getNumChild(); } /** * Retrieves the number of children in the Exception list. Calling this * method will not trigger rewrites.. * * @return Number of children in the Exception list. * @apilevel low-level * @ast method * */ public int getNumExceptionNoTransform() { return getExceptionListNoTransform().getNumChildNoTransform(); } /** * Retrieves the element at index {@code i} in the Exception list.. * * @param i * Index of the element to return. * @return The element at position {@code i} in the Exception list. * @apilevel high-level * @ast method * */ @SuppressWarnings({ "unchecked", "cast" }) public Access getException(int i) { return (Access) getExceptionList().getChild(i); } /** * Append an element to the Exception list. * * @param node * The element to append to the Exception list. * @apilevel high-level * @ast method * */ public void addException(Access node) { List<Access> list = (parent == null || state == null) ? getExceptionListNoTransform() : getExceptionList(); list.addChild(node); } /** * @apilevel low-level * @ast method * */ public void addExceptionNoTransform(Access node) { List<Access> list = getExceptionListNoTransform(); list.addChild(node); } /** * Replaces the Exception list element at index {@code i} with the new node * {@code node}. * * @param node * The new node to replace the old list element. * @param i * The list index of the node to be replaced. * @apilevel high-level * @ast method * */ public void setException(Access node, int i) { List<Access> list = getExceptionList(); list.setChild(node, i); } /** * Retrieves the Exception list. * * @return The node representing the Exception list. * @apilevel high-level * @ast method * */ public List<Access> getExceptions() { return getExceptionList(); } /** * Retrieves the Exception list. * <p> * <em>This method does not invoke AST transformations.</em> * </p> * * @return The node representing the Exception list. * @apilevel low-level * @ast method * */ public List<Access> getExceptionsNoTransform() { return getExceptionListNoTransform(); } /** * Retrieves the Exception list. * * @return The node representing the Exception list. * @apilevel high-level * @ast method * */ @SuppressWarnings({ "unchecked", "cast" }) public List<Access> getExceptionList() { List<Access> list = (List<Access>) getChild(3); list.getNumChild(); return list; } /** * Retrieves the Exception list. * <p> * <em>This method does not invoke AST transformations.</em> * </p> * * @return The node representing the Exception list. * @apilevel low-level * @ast method * */ @SuppressWarnings({ "unchecked", "cast" }) public List<Access> getExceptionListNoTransform() { return (List<Access>) getChildNoTransform(3); } /** * Replaces the optional node for the Block child. This is the {@code Opt} * node containing the child Block, not the actual child! * * @param opt * The new node to be used as the optional node for the Block * child. * @apilevel low-level * @ast method * */ public void setBlockOpt(Opt<Block> opt) { setChild(opt, 4); } /** * Check whether the optional Block child exists. * * @return {@code true} if the optional Block child exists, {@code false} if * it does not. * @apilevel high-level * @ast method * */ public boolean hasBlock() { return getBlockOpt().getNumChild() != 0; } /** * Retrieves the (optional) Block child. * * @return The Block child, if it exists. Returns {@code null} otherwise. * @apilevel low-level * @ast method * */ @SuppressWarnings({ "unchecked", "cast" }) public Block getBlock() { return (Block) getBlockOpt().getChild(0); } /** * Replaces the (optional) Block child. * * @param node * The new node to be used as the Block child. * @apilevel high-level * @ast method * */ public void setBlock(Block node) { getBlockOpt().setChild(node, 0); } /** * @apilevel low-level * @ast method * */ @SuppressWarnings({ "unchecked", "cast" }) public Opt<Block> getBlockOpt() { return (Opt<Block>) getChild(4); } /** * Retrieves the optional node for child Block. This is the {@code Opt} node * containing the child Block, not the actual child! * <p> * <em>This method does not invoke AST transformations.</em> * </p> * * @return The optional node for child Block. * @apilevel low-level * @ast method * */ @SuppressWarnings({ "unchecked", "cast" }) public Opt<Block> getBlockOptNoTransform() { return (Opt<Block>) getChildNoTransform(4); } /** * @ast method * @aspect Enums * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Enums.jrag:717 */ public void checkModifiers() { super.checkModifiers(); if (hostType().isClassDecl()) { // 8.4.3.1 if (!hostType().isEnumDecl() && isAbstract() && !hostType().isAbstract()) error("class must be abstract to include abstract methods"); // 8.4.3.1 if (isAbstract() && isPrivate()) error("method may not be abstract and private"); // 8.4.3.1 // 8.4.3.2 if (isAbstract() && isStatic()) error("method may not be abstract and static"); if (isAbstract() && isSynchronized()) error("method may not be abstract and synchronized"); // 8.4.3.4 if (isAbstract() && isNative()) error("method may not be abstract and native"); if (isAbstract() && isStrictfp()) error("method may not be abstract and strictfp"); if (isNative() && isStrictfp()) error("method may not be native and strictfp"); } if (hostType().isInterfaceDecl()) { // 9.4 if (isStatic()) error("interface method " + signature() + " in " + hostType().typeName() + " may not be static"); if (isStrictfp()) error("interface method " + signature() + " in " + hostType().typeName() + " may not be strictfp"); if (isNative()) error("interface method " + signature() + " in " + hostType().typeName() + " may not be native"); if (isSynchronized()) error("interface method " + signature() + " in " + hostType().typeName() + " may not be synchronized"); if (isProtected()) error("interface method " + signature() + " in " + hostType().typeName() + " may not be protected"); if (isPrivate()) error("interface method " + signature() + " in " + hostType().typeName() + " may not be private"); else if (isFinal()) error("interface method " + signature() + " in " + hostType().typeName() + " may not be final"); } } /** * @ast method * @aspect EmitJimpleRefinements * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/SootJastAddJ/EmitJimpleRefinements.jrag:100 */ public void jimplify2() { if (!generate() || sootMethod().hasActiveBody() || (sootMethod().getSource() != null && (sootMethod().getSource() instanceof soot.coffi.CoffiMethodSource))) return; try { if (hasBlock() && !(hostType().isInterfaceDecl())) { JimpleBody body = Jimple.v().newBody(sootMethod()); sootMethod().setActiveBody(body); Body b = new Body(hostType(), body, this); b.setLine(this); for (int i = 0; i < getNumParameter(); i++) getParameter(i).jimplify2(b); getBlock().jimplify2(b); if (type() instanceof VoidType) b.add(Jimple.v().newReturnVoidStmt()); } } catch (RuntimeException e) { System.err.println("Error generating " + hostType().typeName() + ": " + this); throw e; } } /** * @ast method * @aspect MethodDecl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupMethod.jrag:148 */ private boolean refined_MethodDecl_MethodDecl_moreSpecificThan_MethodDecl(MethodDecl m) { if (getNumParameter() == 0) return false; for (int i = 0; i < getNumParameter(); i++) { if (!getParameter(i).type().instanceOf(m.getParameter(i).type())) return false; } return true; } /** * @ast method * @aspect EmitJimple * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/EmitJimple.jrag:107 */ private int refined_EmitJimple_MethodDecl_sootTypeModifiers() { int result = 0; if (isPublic()) result |= soot.Modifier.PUBLIC; if (isProtected()) result |= soot.Modifier.PROTECTED; if (isPrivate()) result |= soot.Modifier.PRIVATE; if (isFinal()) result |= soot.Modifier.FINAL; if (isStatic()) result |= soot.Modifier.STATIC; if (isAbstract()) result |= soot.Modifier.ABSTRACT; if (isSynchronized()) result |= soot.Modifier.SYNCHRONIZED; if (isStrictfp()) result |= soot.Modifier.STRICTFP; if (isNative()) result |= soot.Modifier.NATIVE; return result; } protected java.util.Map accessibleFrom_TypeDecl_values; /** * @attribute syn * @aspect AccessControl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/AccessControl.jrag:77 */ @SuppressWarnings({ "unchecked", "cast" }) public boolean accessibleFrom(TypeDecl type) { Object _parameters = type; if (accessibleFrom_TypeDecl_values == null) accessibleFrom_TypeDecl_values = new java.util.HashMap(4); if (accessibleFrom_TypeDecl_values.containsKey(_parameters)) { return ((Boolean) accessibleFrom_TypeDecl_values.get(_parameters)).booleanValue(); } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); boolean accessibleFrom_TypeDecl_value = accessibleFrom_compute(type); if (isFinal && num == state().boundariesCrossed) accessibleFrom_TypeDecl_values.put(_parameters, Boolean.valueOf(accessibleFrom_TypeDecl_value)); return accessibleFrom_TypeDecl_value; } /** * @apilevel internal */ private boolean accessibleFrom_compute(TypeDecl type) { if (isPublic()) { return true; } else if (isProtected()) { if (hostPackage().equals(type.hostPackage())) return true; if (type.withinBodyThatSubclasses(hostType()) != null) return true; return false; } else if (isPrivate()) return hostType().topLevelType() == type.topLevelType(); else return hostPackage().equals(type.hostPackage()); } /** * @attribute syn * @aspect DataStructures * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DataStructures.jrag:152 */ public int size() { ASTNode$State state = state(); try { return 1; } finally { } } /** * @attribute syn * @aspect DataStructures * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DataStructures.jrag:153 */ public boolean isEmpty() { ASTNode$State state = state(); try { return false; } finally { } } /** * @attribute syn * @aspect DataStructures * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DataStructures.jrag:157 */ public boolean contains(Object o) { ASTNode$State state = state(); try { return this == o; } finally { } } /** * @attribute syn * @aspect ErrorCheck * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/ErrorCheck.jrag:22 */ public int lineNumber() { ASTNode$State state = state(); try { return getLine(IDstart); } finally { } } protected java.util.Map throwsException_TypeDecl_values; /** * @attribute syn * @aspect ExceptionHandling * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/ExceptionHandling.jrag:146 */ @SuppressWarnings({ "unchecked", "cast" }) public boolean throwsException(TypeDecl exceptionType) { Object _parameters = exceptionType; if (throwsException_TypeDecl_values == null) throwsException_TypeDecl_values = new java.util.HashMap(4); if (throwsException_TypeDecl_values.containsKey(_parameters)) { return ((Boolean) throwsException_TypeDecl_values.get(_parameters)).booleanValue(); } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); boolean throwsException_TypeDecl_value = throwsException_compute(exceptionType); if (isFinal && num == state().boundariesCrossed) throwsException_TypeDecl_values.put(_parameters, Boolean.valueOf(throwsException_TypeDecl_value)); return throwsException_TypeDecl_value; } /** * @apilevel internal */ private boolean throwsException_compute(TypeDecl exceptionType) { for (int i = 0; i < getNumException(); i++) if (exceptionType.instanceOf(getException(i).type())) return true; return false; } /** * @attribute syn * @aspect MethodDecl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupMethod.jrag:131 */ public String name() { ASTNode$State state = state(); try { return getID(); } finally { } } /** * @apilevel internal */ protected boolean signature_computed = false; /** * @apilevel internal */ protected String signature_value; /** * @attribute syn * @aspect MethodSignature15 * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/MethodSignature.jrag:347 */ @SuppressWarnings({ "unchecked", "cast" }) public String signature() { if (signature_computed) { return signature_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); signature_value = signature_compute(); if (isFinal && num == state().boundariesCrossed) signature_computed = true; return signature_value; } /** * @apilevel internal */ private String signature_compute() { StringBuffer s = new StringBuffer(); s.append(name() + "("); for (int i = 0; i < getNumParameter(); i++) { if (i != 0) s.append(", "); s.append(getParameter(i).type().erasure().typeName()); } s.append(")"); return s.toString(); } /** * @attribute syn * @aspect MethodDecl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupMethod.jrag:146 */ public boolean sameSignature(MethodDecl m) { ASTNode$State state = state(); try { return signature().equals(m.signature()); } finally { } } protected java.util.Map moreSpecificThan_MethodDecl_values; /** * @attribute syn * @aspect MethodSignature15 * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/MethodSignature.jrag:155 */ @SuppressWarnings({ "unchecked", "cast" }) public boolean moreSpecificThan(MethodDecl m) { Object _parameters = m; if (moreSpecificThan_MethodDecl_values == null) moreSpecificThan_MethodDecl_values = new java.util.HashMap(4); if (moreSpecificThan_MethodDecl_values.containsKey(_parameters)) { return ((Boolean) moreSpecificThan_MethodDecl_values.get(_parameters)).booleanValue(); } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); boolean moreSpecificThan_MethodDecl_value = moreSpecificThan_compute(m); if (isFinal && num == state().boundariesCrossed) moreSpecificThan_MethodDecl_values.put(_parameters, Boolean.valueOf(moreSpecificThan_MethodDecl_value)); return moreSpecificThan_MethodDecl_value; } /** * @apilevel internal */ private boolean moreSpecificThan_compute(MethodDecl m) { if (!isVariableArity() && !m.isVariableArity()) return refined_MethodDecl_MethodDecl_moreSpecificThan_MethodDecl(m); int num = Math.max(getNumParameter(), m.getNumParameter()); for (int i = 0; i < num; i++) { TypeDecl t1 = i < getNumParameter() - 1 ? getParameter(i).type() : getParameter(getNumParameter() - 1).type().componentType(); TypeDecl t2 = i < m.getNumParameter() - 1 ? m.getParameter(i).type() : m.getParameter(m.getNumParameter() - 1).type().componentType(); if (!t1.instanceOf(t2)) return false; } return true; } protected java.util.Map overrides_MethodDecl_values; /** * @attribute syn * @aspect MethodDecl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupMethod.jrag:200 */ @SuppressWarnings({ "unchecked", "cast" }) public boolean overrides(MethodDecl m) { Object _parameters = m; if (overrides_MethodDecl_values == null) overrides_MethodDecl_values = new java.util.HashMap(4); if (overrides_MethodDecl_values.containsKey(_parameters)) { return ((Boolean) overrides_MethodDecl_values.get(_parameters)).booleanValue(); } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); boolean overrides_MethodDecl_value = overrides_compute(m); if (isFinal && num == state().boundariesCrossed) overrides_MethodDecl_values.put(_parameters, Boolean.valueOf(overrides_MethodDecl_value)); return overrides_MethodDecl_value; } /** * @apilevel internal */ private boolean overrides_compute(MethodDecl m) { return !isStatic() && !m.isPrivate() && m.accessibleFrom(hostType()) && hostType().instanceOf(m.hostType()) && m.signature().equals(signature()); } protected java.util.Map hides_MethodDecl_values; /** * @attribute syn * @aspect MethodDecl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupMethod.jrag:204 */ @SuppressWarnings({ "unchecked", "cast" }) public boolean hides(MethodDecl m) { Object _parameters = m; if (hides_MethodDecl_values == null) hides_MethodDecl_values = new java.util.HashMap(4); if (hides_MethodDecl_values.containsKey(_parameters)) { return ((Boolean) hides_MethodDecl_values.get(_parameters)).booleanValue(); } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); boolean hides_MethodDecl_value = hides_compute(m); if (isFinal && num == state().boundariesCrossed) hides_MethodDecl_values.put(_parameters, Boolean.valueOf(hides_MethodDecl_value)); return hides_MethodDecl_value; } /** * @apilevel internal */ private boolean hides_compute(MethodDecl m) { return isStatic() && !m.isPrivate() && m.accessibleFrom(hostType()) && hostType().instanceOf(m.hostType()) && m.signature().equals(signature()); } protected java.util.Map parameterDeclaration_String_values; /** * @attribute syn * @aspect VariableScope * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupVariable.jrag:99 */ @SuppressWarnings({ "unchecked", "cast" }) public SimpleSet parameterDeclaration(String name) { Object _parameters = name; if (parameterDeclaration_String_values == null) parameterDeclaration_String_values = new java.util.HashMap(4); if (parameterDeclaration_String_values.containsKey(_parameters)) { return (SimpleSet) parameterDeclaration_String_values.get(_parameters); } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); SimpleSet parameterDeclaration_String_value = parameterDeclaration_compute(name); if (isFinal && num == state().boundariesCrossed) parameterDeclaration_String_values.put(_parameters, parameterDeclaration_String_value); return parameterDeclaration_String_value; } /** * @apilevel internal */ private SimpleSet parameterDeclaration_compute(String name) { for (int i = 0; i < getNumParameter(); i++) if (getParameter(i).name().equals(name)) return (ParameterDeclaration) getParameter(i); return SimpleSet.emptySet; } /** * @attribute syn * @aspect Modifiers * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/Modifiers.jrag:214 */ public boolean isSynthetic() { ASTNode$State state = state(); try { return getModifiers().isSynthetic(); } finally { } } /** * @attribute syn * @aspect Modifiers * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/Modifiers.jrag:224 */ public boolean isPublic() { ASTNode$State state = state(); try { return getModifiers().isPublic() || hostType().isInterfaceDecl(); } finally { } } /** * @attribute syn * @aspect Modifiers * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/Modifiers.jrag:225 */ public boolean isPrivate() { ASTNode$State state = state(); try { return getModifiers().isPrivate(); } finally { } } /** * @attribute syn * @aspect Modifiers * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/Modifiers.jrag:226 */ public boolean isProtected() { ASTNode$State state = state(); try { return getModifiers().isProtected(); } finally { } } /** * @attribute syn * @aspect Modifiers * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/Modifiers.jrag:227 */ public boolean isAbstract() { ASTNode$State state = state(); try { return getModifiers().isAbstract() || hostType().isInterfaceDecl(); } finally { } } /** * @attribute syn * @aspect Modifiers * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/Modifiers.jrag:228 */ public boolean isStatic() { ASTNode$State state = state(); try { return getModifiers().isStatic(); } finally { } } /** * @attribute syn * @aspect Modifiers * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/Modifiers.jrag:230 */ public boolean isFinal() { ASTNode$State state = state(); try { return getModifiers().isFinal() || hostType().isFinal() || isPrivate(); } finally { } } /** * @attribute syn * @aspect Modifiers * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/Modifiers.jrag:231 */ public boolean isSynchronized() { ASTNode$State state = state(); try { return getModifiers().isSynchronized(); } finally { } } /** * @attribute syn * @aspect Modifiers * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/Modifiers.jrag:232 */ public boolean isNative() { ASTNode$State state = state(); try { return getModifiers().isNative(); } finally { } } /** * @attribute syn * @aspect Modifiers * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/Modifiers.jrag:233 */ public boolean isStrictfp() { ASTNode$State state = state(); try { return getModifiers().isStrictfp(); } finally { } } /** * @attribute syn * @aspect PrettyPrint * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/PrettyPrint.jadd:800 */ public String dumpString() { ASTNode$State state = state(); try { return getClass().getName() + " [" + getID() + "]"; } finally { } } /** * @apilevel internal */ protected boolean type_computed = false; /** * @apilevel internal */ protected TypeDecl type_value; /** * @attribute syn * @aspect TypeAnalysis * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeAnalysis.jrag:269 */ @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; } /** * @apilevel internal */ private TypeDecl type_compute() { return getTypeAccess().type(); } /** * @attribute syn * @aspect TypeAnalysis * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeAnalysis.jrag:271 */ public boolean isVoid() { ASTNode$State state = state(); try { return type().isVoid(); } finally { } } /** * @attribute syn * @aspect TypeHierarchyCheck * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeHierarchyCheck.jrag:237 */ public boolean mayOverrideReturn(MethodDecl m) { ASTNode$State state = state(); try { return type().instanceOf(m.type()); } finally { } } /* * It is also a compile-time error if any method declared in an annotation * type has a signature that is override-equivalent to that of any public or * protected method declared in class Object or in the interface * annotation.Annotation* @attribute syn * * @aspect Annotations * * @declaredat * /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/ * Annotations.jrag:139 */ public boolean annotationMethodOverride() { ASTNode$State state = state(); try { return !hostType().ancestorMethods(signature()).isEmpty(); } finally { } } /** * @attribute syn * @aspect Annotations * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Annotations.jrag:283 */ public boolean hasAnnotationSuppressWarnings(String s) { ASTNode$State state = state(); try { return getModifiers().hasAnnotationSuppressWarnings(s); } finally { } } /** * @attribute syn * @aspect Annotations * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Annotations.jrag:323 */ public boolean isDeprecated() { ASTNode$State state = state(); try { return getModifiers().hasDeprecatedAnnotation(); } finally { } } /** * @apilevel internal */ protected boolean usesTypeVariable_computed = false; /** * @apilevel internal */ protected boolean usesTypeVariable_value; /** * @attribute syn * @aspect LookupParTypeDecl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:1062 */ @SuppressWarnings({ "unchecked", "cast" }) public boolean usesTypeVariable() { if (usesTypeVariable_computed) { return usesTypeVariable_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); usesTypeVariable_value = usesTypeVariable_compute(); if (isFinal && num == state().boundariesCrossed) usesTypeVariable_computed = true; return usesTypeVariable_value; } /** * @apilevel internal */ private boolean usesTypeVariable_compute() { return getModifiers().usesTypeVariable() || getTypeAccess().usesTypeVariable() || getParameterList().usesTypeVariable() || getExceptionList().usesTypeVariable(); } /** * @apilevel internal */ protected boolean sourceMethodDecl_computed = false; /** * @apilevel internal */ protected MethodDecl sourceMethodDecl_value; /** * @attribute syn * @aspect SourceDeclarations * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:1511 */ @SuppressWarnings({ "unchecked", "cast" }) public MethodDecl sourceMethodDecl() { if (sourceMethodDecl_computed) { return sourceMethodDecl_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); sourceMethodDecl_value = sourceMethodDecl_compute(); if (isFinal && num == state().boundariesCrossed) sourceMethodDecl_computed = true; return sourceMethodDecl_value; } /** * @apilevel internal */ private MethodDecl sourceMethodDecl_compute() { return this; } /** * @attribute syn * @aspect GenericsParTypeDecl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericsParTypeDecl.jrag:67 */ public boolean visibleTypeParameters() { ASTNode$State state = state(); try { return !isStatic(); } finally { } } /** * @attribute syn * @aspect MethodSignature15 * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/MethodSignature.jrag:284 */ public int arity() { ASTNode$State state = state(); try { return getNumParameter(); } finally { } } /* * The method is then a variable arity method. Otherwise, it is a fixed * arity method.* @attribute syn * * @aspect VariableArityParameters * * @declaredat * /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/ * VariableArityParameters.jrag:33 */ public boolean isVariableArity() { ASTNode$State state = state(); try { return getNumParameter() == 0 ? false : getParameter(getNumParameter() - 1).isVariableArity(); } finally { } } /** * @attribute syn * @aspect VariableArityParameters * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/VariableArityParameters.jrag:38 */ public ParameterDeclaration lastParameter() { ASTNode$State state = state(); try { return getParameter(getNumParameter() - 1); } finally { } } /** * @attribute syn * @aspect EmitJimple * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/EmitJimple.jrag:107 */ public int sootTypeModifiers() { ASTNode$State state = state(); try { int res = refined_EmitJimple_MethodDecl_sootTypeModifiers(); if (isVariableArity()) res |= Modifiers.ACC_VARARGS; return res; } finally { } } /** * @apilevel internal */ protected boolean sootMethod_computed = false; /** * @apilevel internal */ protected SootMethod sootMethod_value; /** * @attribute syn * @aspect EmitJimple * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/EmitJimple.jrag:269 */ @SuppressWarnings({ "unchecked", "cast" }) public SootMethod sootMethod() { if (sootMethod_computed) { return sootMethod_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); sootMethod_value = sootMethod_compute(); if (isFinal && num == state().boundariesCrossed) sootMethod_computed = true; return sootMethod_value; } /** * @apilevel internal */ private SootMethod sootMethod_compute() { ArrayList list = new ArrayList(); for (int i = 0; i < getNumParameter(); i++) list.add(getParameter(i).type().getSootType()); if (hostType().isArrayDecl()) return typeObject().getSootClassDecl().getMethod(name(), list, type().getSootType()); return hostType().getSootClassDecl().getMethod(name(), list, type().getSootType()); } /** * @apilevel internal */ protected boolean sootRef_computed = false; /** * @apilevel internal */ protected SootMethodRef sootRef_value; /** * @attribute syn * @aspect EmitJimple * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/EmitJimple.jrag:279 */ @SuppressWarnings({ "unchecked", "cast" }) public SootMethodRef sootRef() { if (sootRef_computed) { return sootRef_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); sootRef_value = sootRef_compute(); if (isFinal && num == state().boundariesCrossed) sootRef_computed = true; return sootRef_value; } /** * @apilevel internal */ private SootMethodRef sootRef_compute() { ArrayList parameters = new ArrayList(); for (int i = 0; i < getNumParameter(); i++) parameters.add(getParameter(i).type().getSootType()); SootMethodRef ref = Scene.v().makeMethodRef(hostType().getSootClassDecl(), name(), parameters, type().getSootType(), isStatic()); return ref; } /** * @apilevel internal */ protected boolean offsetBeforeParameters_computed = false; /** * @apilevel internal */ protected int offsetBeforeParameters_value; /** * @attribute syn * @aspect LocalNum * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/LocalNum.jrag:17 */ @SuppressWarnings({ "unchecked", "cast" }) public int offsetBeforeParameters() { if (offsetBeforeParameters_computed) { return offsetBeforeParameters_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); offsetBeforeParameters_value = offsetBeforeParameters_compute(); if (isFinal && num == state().boundariesCrossed) offsetBeforeParameters_computed = true; return offsetBeforeParameters_value; } /** * @apilevel internal */ private int offsetBeforeParameters_compute() { return 0; } /** * @apilevel internal */ protected boolean offsetAfterParameters_computed = false; /** * @apilevel internal */ protected int offsetAfterParameters_value; /** * @attribute syn * @aspect LocalNum * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/LocalNum.jrag:19 */ @SuppressWarnings({ "unchecked", "cast" }) public int offsetAfterParameters() { if (offsetAfterParameters_computed) { return offsetAfterParameters_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); offsetAfterParameters_value = offsetAfterParameters_compute(); if (isFinal && num == state().boundariesCrossed) offsetAfterParameters_computed = true; return offsetAfterParameters_value; } /** * @apilevel internal */ private int offsetAfterParameters_compute() { if (getNumParameter() == 0) return offsetBeforeParameters(); return getParameter(getNumParameter() - 1).localNum() + getParameter(getNumParameter() - 1).type().variableSize(); } /** * @attribute syn * @aspect GenericsCodegen * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/Jimple1.5Backend/GenericsCodegen.jrag:34 */ public MethodDecl erasedMethod() { ASTNode$State state = state(); try { return this; } finally { } } /** * @return true if the modifier list includes the SafeVarargs annotation * @attribute syn * @aspect SafeVarargs * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/SafeVarargs.jrag:20 */ public boolean hasAnnotationSafeVarargs() { ASTNode$State state = state(); try { return getModifiers().hasAnnotationSafeVarargs(); } finally { } } /** * It is an error if the SafeVarargs annotation is used on something that is * not a variable arity method or constructor. * * @attribute syn * @aspect SafeVarargs * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/SafeVarargs.jrag:56 */ public boolean hasIllegalAnnotationSafeVarargs() { ASTNode$State state = state(); try { return hasAnnotationSafeVarargs() && (!isVariableArity() || (!isFinal() && !isStatic())); } finally { } } /** * @attribute syn * @aspect SuppressWarnings * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/SuppressWarnings.jrag:24 */ public boolean suppressWarnings(String type) { ASTNode$State state = state(); try { return hasAnnotationSuppressWarnings(type) || withinSuppressWarnings(type); } finally { } } protected java.util.Map handlesException_TypeDecl_values; /** * @attribute inh * @aspect ExceptionHandling * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/ExceptionHandling.jrag:51 */ @SuppressWarnings({ "unchecked", "cast" }) public boolean handlesException(TypeDecl exceptionType) { Object _parameters = exceptionType; if (handlesException_TypeDecl_values == null) handlesException_TypeDecl_values = new java.util.HashMap(4); if (handlesException_TypeDecl_values.containsKey(_parameters)) { return ((Boolean) handlesException_TypeDecl_values.get(_parameters)).booleanValue(); } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); boolean handlesException_TypeDecl_value = getParent().Define_boolean_handlesException(this, null, exceptionType); if (isFinal && num == state().boundariesCrossed) handlesException_TypeDecl_values.put(_parameters, Boolean.valueOf(handlesException_TypeDecl_value)); return handlesException_TypeDecl_value; } /** * @attribute inh * @aspect LookupMethod * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupMethod.jrag:14 */ @SuppressWarnings({ "unchecked", "cast" }) public MethodDecl unknownMethod() { ASTNode$State state = state(); MethodDecl unknownMethod_value = getParent().Define_MethodDecl_unknownMethod(this, null); return unknownMethod_value; } /** * @attribute inh * @aspect EmitJimple * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/EmitJimple.jrag:277 */ @SuppressWarnings({ "unchecked", "cast" }) public TypeDecl typeObject() { ASTNode$State state = state(); TypeDecl typeObject_value = getParent().Define_TypeDecl_typeObject(this, null); return typeObject_value; } /** * @attribute inh * @aspect SuppressWarnings * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/SuppressWarnings.jrag:17 */ @SuppressWarnings({ "unchecked", "cast" }) public boolean withinSuppressWarnings(String s) { ASTNode$State state = state(); boolean withinSuppressWarnings_String_value = getParent().Define_boolean_withinSuppressWarnings(this, null, s); return withinSuppressWarnings_String_value; } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DefiniteAssignment.jrag:437 * @apilevel internal */ public boolean Define_boolean_isDAbefore(ASTNode caller, ASTNode child, Variable v) { if (caller == getBlockOptNoTransform()) { return v.isFinal() && (v.isClassVariable() || v.isInstanceVariable()) ? true : isDAbefore(v); } else { return getParent().Define_boolean_isDAbefore(this, caller, v); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DefiniteAssignment.jrag:868 * @apilevel internal */ public boolean Define_boolean_isDUbefore(ASTNode caller, ASTNode child, Variable v) { if (caller == getBlockOptNoTransform()) { return v.isFinal() && (v.isClassVariable() || v.isInstanceVariable()) ? false : true; } else { return getParent().Define_boolean_isDUbefore(this, caller, v); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/ExceptionHandling.jrag:143 * @apilevel internal */ public boolean Define_boolean_handlesException(ASTNode caller, ASTNode child, TypeDecl exceptionType) { if (caller == getBlockOptNoTransform()) { return throwsException(exceptionType) || handlesException(exceptionType); } else { return getParent().Define_boolean_handlesException(this, caller, exceptionType); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupVariable.jrag:46 * @apilevel internal */ public SimpleSet Define_SimpleSet_lookupVariable(ASTNode caller, ASTNode child, String name) { if (caller == getParameterListNoTransform()) { int childIndex = caller.getIndexOfChild(child); return parameterDeclaration(name); } else if (caller == getBlockOptNoTransform()) { SimpleSet set = parameterDeclaration(name); // A declaration of a method parameter name shadows any other // variable declarations if (!set.isEmpty()) return set; // Delegate to other declarations in scope return lookupVariable(name); } else { return getParent().Define_SimpleSet_lookupVariable(this, caller, name); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/Modifiers.jrag:271 * @apilevel internal */ public boolean Define_boolean_mayBePublic(ASTNode caller, ASTNode child) { if (caller == getModifiersNoTransform()) { return true; } else { return getParent().Define_boolean_mayBePublic(this, caller); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/Modifiers.jrag:272 * @apilevel internal */ public boolean Define_boolean_mayBeProtected(ASTNode caller, ASTNode child) { if (caller == getModifiersNoTransform()) { return true; } else { return getParent().Define_boolean_mayBeProtected(this, caller); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/Modifiers.jrag:273 * @apilevel internal */ public boolean Define_boolean_mayBePrivate(ASTNode caller, ASTNode child) { if (caller == getModifiersNoTransform()) { return true; } else { return getParent().Define_boolean_mayBePrivate(this, caller); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/Modifiers.jrag:274 * @apilevel internal */ public boolean Define_boolean_mayBeAbstract(ASTNode caller, ASTNode child) { if (caller == getModifiersNoTransform()) { return true; } else { return getParent().Define_boolean_mayBeAbstract(this, caller); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/Modifiers.jrag:275 * @apilevel internal */ public boolean Define_boolean_mayBeStatic(ASTNode caller, ASTNode child) { if (caller == getModifiersNoTransform()) { return true; } else { return getParent().Define_boolean_mayBeStatic(this, caller); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/Modifiers.jrag:276 * @apilevel internal */ public boolean Define_boolean_mayBeFinal(ASTNode caller, ASTNode child) { if (caller == getModifiersNoTransform()) { return true; } else { return getParent().Define_boolean_mayBeFinal(this, caller); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/Modifiers.jrag:277 * @apilevel internal */ public boolean Define_boolean_mayBeSynchronized(ASTNode caller, ASTNode child) { if (caller == getModifiersNoTransform()) { return true; } else { return getParent().Define_boolean_mayBeSynchronized(this, caller); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/Modifiers.jrag:278 * @apilevel internal */ public boolean Define_boolean_mayBeNative(ASTNode caller, ASTNode child) { if (caller == getModifiersNoTransform()) { return true; } else { return getParent().Define_boolean_mayBeNative(this, caller); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/Modifiers.jrag:279 * @apilevel internal */ public boolean Define_boolean_mayBeStrictfp(ASTNode caller, ASTNode child) { if (caller == getModifiersNoTransform()) { return true; } else { return getParent().Define_boolean_mayBeStrictfp(this, caller); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/NameCheck.jrag:246 * @apilevel internal */ public ASTNode Define_ASTNode_enclosingBlock(ASTNode caller, ASTNode child) { if (caller == getBlockOptNoTransform()) { return this; } else { return getParent().Define_ASTNode_enclosingBlock(this, caller); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/SyntacticClassification.jrag:82 * @apilevel internal */ public NameType Define_NameType_nameType(ASTNode caller, ASTNode child) { if (caller == getExceptionListNoTransform()) { int childIndex = caller.getIndexOfChild(child); return NameType.TYPE_NAME; } else if (caller == getParameterListNoTransform()) { int childIndex = caller.getIndexOfChild(child); return NameType.TYPE_NAME; } else if (caller == getTypeAccessNoTransform()) { return NameType.TYPE_NAME; } else { return getParent().Define_NameType_nameType(this, caller); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeCheck.jrag:405 * @apilevel internal */ public TypeDecl Define_TypeDecl_returnType(ASTNode caller, ASTNode child) { if (caller == getBlockOptNoTransform()) { return type(); } else { return getParent().Define_TypeDecl_returnType(this, caller); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeHierarchyCheck.jrag:142 * @apilevel internal */ public boolean Define_boolean_inStaticContext(ASTNode caller, ASTNode child) { if (caller == getBlockOptNoTransform()) { return isStatic(); } else { return getParent().Define_boolean_inStaticContext(this, caller); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/UnreachableStatements.jrag:33 * @apilevel internal */ public boolean Define_boolean_reachable(ASTNode caller, ASTNode child) { if (caller == getBlockOptNoTransform()) { return true; } else { return getParent().Define_boolean_reachable(this, caller); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/VariableDeclaration.jrag:61 * @apilevel internal */ public boolean Define_boolean_isMethodParameter(ASTNode caller, ASTNode child) { if (caller == getParameterListNoTransform()) { int childIndex = caller.getIndexOfChild(child); return true; } else { return getParent().Define_boolean_isMethodParameter(this, caller); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/VariableDeclaration.jrag:62 * @apilevel internal */ public boolean Define_boolean_isConstructorParameter(ASTNode caller, ASTNode child) { if (caller == getParameterListNoTransform()) { int childIndex = caller.getIndexOfChild(child); return false; } else { return getParent().Define_boolean_isConstructorParameter(this, caller); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/VariableDeclaration.jrag:63 * @apilevel internal */ public boolean Define_boolean_isExceptionHandlerParameter(ASTNode caller, ASTNode child) { if (caller == getParameterListNoTransform()) { int childIndex = caller.getIndexOfChild(child); return false; } else { return getParent().Define_boolean_isExceptionHandlerParameter(this, caller); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Annotations.jrag:86 * @apilevel internal */ public boolean Define_boolean_mayUseAnnotationTarget(ASTNode caller, ASTNode child, String name) { if (caller == getModifiersNoTransform()) { return name.equals("METHOD"); } else { return getParent().Define_boolean_mayUseAnnotationTarget(this, caller, name); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/VariableArityParameters.jrag:22 * @apilevel internal */ public boolean Define_boolean_variableArityValid(ASTNode caller, ASTNode child) { if (caller == getParameterListNoTransform()) { int i = caller.getIndexOfChild(child); return i == getNumParameter() - 1; } else { return getParent().Define_boolean_variableArityValid(this, caller); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/LocalNum.jrag:26 * @apilevel internal */ public int Define_int_localNum(ASTNode caller, ASTNode child) { if (caller == getParameterListNoTransform()) { int index = caller.getIndexOfChild(child); { if (index == 0) return offsetBeforeParameters(); return getParameter(index - 1).localNum() + getParameter(index - 1).type().variableSize(); } } else { return getParent().Define_int_localNum(this, caller); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/Statements.jrag:351 * @apilevel internal */ public boolean Define_boolean_enclosedByExceptionHandler(ASTNode caller, ASTNode child) { if (caller == getBlockOptNoTransform()) { return getNumException() != 0; } else { return getParent().Define_boolean_enclosedByExceptionHandler(this, caller); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/PreciseRethrow.jrag:50 * @apilevel internal */ public boolean Define_boolean_inhModifiedInScope(ASTNode caller, ASTNode child, Variable var) { if (caller == getParameterListNoTransform()) { int childIndex = caller.getIndexOfChild(child); return getBlock().modifiedInScope(var); } else { return getParent().Define_boolean_inhModifiedInScope(this, caller, var); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/PreciseRethrow.jrag:124 * @apilevel internal */ public boolean Define_boolean_isCatchParam(ASTNode caller, ASTNode child) { if (caller == getParameterListNoTransform()) { int childIndex = caller.getIndexOfChild(child); return false; } else { return getParent().Define_boolean_isCatchParam(this, caller); } } /** * @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); } }
77,554
27.895306
122
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/MethodDeclSubstituted.java
/* This file was generated with JastAdd2 (http://jastadd.org) version R20130212 (r1031) */ package soot.JastAddJ; import java.util.HashSet; 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; /** * @production MethodDeclSubstituted : {@link MethodDecl} ::= <span class="component">&lt;Original:MethodDecl&gt;</span>; * @ast node * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.ast:30 */ public class MethodDeclSubstituted extends MethodDecl implements Cloneable { /** * @apilevel low-level */ public void flushCache() { super.flushCache(); sourceMethodDecl_computed = false; sourceMethodDecl_value = null; } /** * @apilevel internal */ public void flushCollectionCache() { super.flushCollectionCache(); } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public MethodDeclSubstituted clone() throws CloneNotSupportedException { MethodDeclSubstituted node = (MethodDeclSubstituted)super.clone(); node.sourceMethodDecl_computed = false; node.sourceMethodDecl_value = null; node.in$Circle(false); node.is$Final(false); return node; } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public MethodDeclSubstituted copy() { try { MethodDeclSubstituted node = (MethodDeclSubstituted) clone(); node.parent = null; if(children != null) node.children = (ASTNode[]) children.clone(); return node; } catch (CloneNotSupportedException e) { throw new Error("Error: clone not supported for " + getClass().getName()); } } /** * Create a deep copy of the AST subtree at this node. * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level */ @SuppressWarnings({"unchecked", "cast"}) public MethodDeclSubstituted fullCopy() { MethodDeclSubstituted tree = (MethodDeclSubstituted) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) children[i]; if(child != null) { child = child.fullCopy(); tree.setChild(child, i); } } } return tree; } /** * @ast method * @aspect GenericsCodegen * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/Jimple1.5Backend/GenericsCodegen.jrag:321 */ public void transformation() { } /** * @ast method * */ public MethodDeclSubstituted() { super(); } /** * Initializes the child array to the correct size. * Initializes List and Opt nta children. * @apilevel internal * @ast method * @ast method * */ public void init$Children() { children = new ASTNode[5]; setChild(new List(), 2); setChild(new List(), 3); setChild(new Opt(), 4); } /** * @ast method * */ public MethodDeclSubstituted(Modifiers p0, Access p1, String p2, List<ParameterDeclaration> p3, List<Access> p4, Opt<Block> p5, MethodDecl p6) { setChild(p0, 0); setChild(p1, 1); setID(p2); setChild(p3, 2); setChild(p4, 3); setChild(p5, 4); setOriginal(p6); } /** * @ast method * */ public MethodDeclSubstituted(Modifiers p0, Access p1, beaver.Symbol p2, List<ParameterDeclaration> p3, List<Access> p4, Opt<Block> p5, MethodDecl p6) { setChild(p0, 0); setChild(p1, 1); setID(p2); setChild(p3, 2); setChild(p4, 3); setChild(p5, 4); setOriginal(p6); } /** * @apilevel low-level * @ast method * */ protected int numChildren() { return 5; } /** * @apilevel internal * @ast method * */ public boolean mayHaveRewrite() { return false; } /** * Replaces the Modifiers child. * @param node The new node to replace the Modifiers child. * @apilevel high-level * @ast method * */ public void setModifiers(Modifiers node) { setChild(node, 0); } /** * Retrieves the Modifiers child. * @return The current node used as the Modifiers child. * @apilevel high-level * @ast method * */ public Modifiers getModifiers() { return (Modifiers)getChild(0); } /** * Retrieves the Modifiers child. * <p><em>This method does not invoke AST transformations.</em></p> * @return The current node used as the Modifiers child. * @apilevel low-level * @ast method * */ public Modifiers getModifiersNoTransform() { return (Modifiers)getChildNoTransform(0); } /** * Replaces the TypeAccess child. * @param node The new node to replace the TypeAccess child. * @apilevel high-level * @ast method * */ public void setTypeAccess(Access node) { setChild(node, 1); } /** * Retrieves the TypeAccess child. * @return The current node used as the TypeAccess child. * @apilevel high-level * @ast method * */ public Access getTypeAccess() { return (Access)getChild(1); } /** * Retrieves the TypeAccess child. * <p><em>This method does not invoke AST transformations.</em></p> * @return The current node used as the TypeAccess child. * @apilevel low-level * @ast method * */ public Access getTypeAccessNoTransform() { return (Access)getChildNoTransform(1); } /** * Replaces the lexeme ID. * @param value The new value for the lexeme ID. * @apilevel high-level * @ast method * */ public void setID(String value) { tokenString_ID = value; } /** * JastAdd-internal setter for lexeme ID using the Beaver parser. * @apilevel internal * @ast method * */ 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(); } /** * Retrieves the value for the lexeme ID. * @return The value for the lexeme ID. * @apilevel high-level * @ast method * */ public String getID() { return tokenString_ID != null ? tokenString_ID : ""; } /** * Replaces the Parameter list. * @param list The new list node to be used as the Parameter list. * @apilevel high-level * @ast method * */ public void setParameterList(List<ParameterDeclaration> list) { setChild(list, 2); } /** * Retrieves the number of children in the Parameter list. * @return Number of children in the Parameter list. * @apilevel high-level * @ast method * */ public int getNumParameter() { return getParameterList().getNumChild(); } /** * Retrieves the number of children in the Parameter list. * Calling this method will not trigger rewrites.. * @return Number of children in the Parameter list. * @apilevel low-level * @ast method * */ public int getNumParameterNoTransform() { return getParameterListNoTransform().getNumChildNoTransform(); } /** * Retrieves the element at index {@code i} in the Parameter list.. * @param i Index of the element to return. * @return The element at position {@code i} in the Parameter list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public ParameterDeclaration getParameter(int i) { return (ParameterDeclaration)getParameterList().getChild(i); } /** * Append an element to the Parameter list. * @param node The element to append to the Parameter list. * @apilevel high-level * @ast method * */ public void addParameter(ParameterDeclaration node) { List<ParameterDeclaration> list = (parent == null || state == null) ? getParameterListNoTransform() : getParameterList(); list.addChild(node); } /** * @apilevel low-level * @ast method * */ public void addParameterNoTransform(ParameterDeclaration node) { List<ParameterDeclaration> list = getParameterListNoTransform(); list.addChild(node); } /** * Replaces the Parameter list element at index {@code i} with the new node {@code node}. * @param node The new node to replace the old list element. * @param i The list index of the node to be replaced. * @apilevel high-level * @ast method * */ public void setParameter(ParameterDeclaration node, int i) { List<ParameterDeclaration> list = getParameterList(); list.setChild(node, i); } /** * Retrieves the Parameter list. * @return The node representing the Parameter list. * @apilevel high-level * @ast method * */ public List<ParameterDeclaration> getParameters() { return getParameterList(); } /** * Retrieves the Parameter list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the Parameter list. * @apilevel low-level * @ast method * */ public List<ParameterDeclaration> getParametersNoTransform() { return getParameterListNoTransform(); } /** * Retrieves the Parameter list. * @return The node representing the Parameter list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<ParameterDeclaration> getParameterList() { List<ParameterDeclaration> list = (List<ParameterDeclaration>)getChild(2); list.getNumChild(); return list; } /** * Retrieves the Parameter list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the Parameter list. * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<ParameterDeclaration> getParameterListNoTransform() { return (List<ParameterDeclaration>)getChildNoTransform(2); } /** * Replaces the Exception list. * @param list The new list node to be used as the Exception list. * @apilevel high-level * @ast method * */ public void setExceptionList(List<Access> list) { setChild(list, 3); } /** * Retrieves the number of children in the Exception list. * @return Number of children in the Exception list. * @apilevel high-level * @ast method * */ public int getNumException() { return getExceptionList().getNumChild(); } /** * Retrieves the number of children in the Exception list. * Calling this method will not trigger rewrites.. * @return Number of children in the Exception list. * @apilevel low-level * @ast method * */ public int getNumExceptionNoTransform() { return getExceptionListNoTransform().getNumChildNoTransform(); } /** * Retrieves the element at index {@code i} in the Exception list.. * @param i Index of the element to return. * @return The element at position {@code i} in the Exception list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public Access getException(int i) { return (Access)getExceptionList().getChild(i); } /** * Append an element to the Exception list. * @param node The element to append to the Exception list. * @apilevel high-level * @ast method * */ public void addException(Access node) { List<Access> list = (parent == null || state == null) ? getExceptionListNoTransform() : getExceptionList(); list.addChild(node); } /** * @apilevel low-level * @ast method * */ public void addExceptionNoTransform(Access node) { List<Access> list = getExceptionListNoTransform(); list.addChild(node); } /** * Replaces the Exception list element at index {@code i} with the new node {@code node}. * @param node The new node to replace the old list element. * @param i The list index of the node to be replaced. * @apilevel high-level * @ast method * */ public void setException(Access node, int i) { List<Access> list = getExceptionList(); list.setChild(node, i); } /** * Retrieves the Exception list. * @return The node representing the Exception list. * @apilevel high-level * @ast method * */ public List<Access> getExceptions() { return getExceptionList(); } /** * Retrieves the Exception list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the Exception list. * @apilevel low-level * @ast method * */ public List<Access> getExceptionsNoTransform() { return getExceptionListNoTransform(); } /** * Retrieves the Exception list. * @return The node representing the Exception list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<Access> getExceptionList() { List<Access> list = (List<Access>)getChild(3); list.getNumChild(); return list; } /** * Retrieves the Exception list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the Exception list. * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<Access> getExceptionListNoTransform() { return (List<Access>)getChildNoTransform(3); } /** * Replaces the optional node for the Block child. This is the {@code Opt} node containing the child Block, not the actual child! * @param opt The new node to be used as the optional node for the Block child. * @apilevel low-level * @ast method * */ public void setBlockOpt(Opt<Block> opt) { setChild(opt, 4); } /** * Check whether the optional Block child exists. * @return {@code true} if the optional Block child exists, {@code false} if it does not. * @apilevel high-level * @ast method * */ public boolean hasBlock() { return getBlockOpt().getNumChild() != 0; } /** * Retrieves the (optional) Block child. * @return The Block child, if it exists. Returns {@code null} otherwise. * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public Block getBlock() { return (Block)getBlockOpt().getChild(0); } /** * Replaces the (optional) Block child. * @param node The new node to be used as the Block child. * @apilevel high-level * @ast method * */ public void setBlock(Block node) { getBlockOpt().setChild(node, 0); } /** * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public Opt<Block> getBlockOpt() { return (Opt<Block>)getChild(4); } /** * Retrieves the optional node for child Block. This is the {@code Opt} node containing the child Block, not the actual child! * <p><em>This method does not invoke AST transformations.</em></p> * @return The optional node for child Block. * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public Opt<Block> getBlockOptNoTransform() { return (Opt<Block>)getChildNoTransform(4); } /** * Replaces the lexeme Original. * @param value The new value for the lexeme Original. * @apilevel high-level * @ast method * */ public void setOriginal(MethodDecl value) { tokenMethodDecl_Original = value; } /** * @apilevel internal * @ast method * */ /** * @apilevel internal */ protected MethodDecl tokenMethodDecl_Original; /** * Retrieves the value for the lexeme Original. * @return The value for the lexeme Original. * @apilevel high-level * @ast method * */ public MethodDecl getOriginal() { return tokenMethodDecl_Original; } /** * @apilevel internal */ protected boolean sourceMethodDecl_computed = false; /** * @apilevel internal */ protected MethodDecl sourceMethodDecl_value; /** * @attribute syn * @aspect SourceDeclarations * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:1513 */ @SuppressWarnings({"unchecked", "cast"}) public MethodDecl sourceMethodDecl() { if(sourceMethodDecl_computed) { return sourceMethodDecl_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); sourceMethodDecl_value = sourceMethodDecl_compute(); if(isFinal && num == state().boundariesCrossed) sourceMethodDecl_computed = true; return sourceMethodDecl_value; } /** * @apilevel internal */ private MethodDecl sourceMethodDecl_compute() { return getOriginal().sourceMethodDecl(); } /** * @attribute syn * @aspect GenericsCodegen * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/Jimple1.5Backend/GenericsCodegen.jrag:34 */ public MethodDecl erasedMethod() { ASTNode$State state = state(); try { return getOriginal().erasedMethod(); } finally { } } /** * @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); } }
17,482
26.488994
153
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/MethodDescriptor.java
package soot.JastAddJ; import java.util.HashSet; 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; /** * @ast class * */ public class MethodDescriptor extends java.lang.Object { private BytecodeParser p; private String parameterDescriptors; private String typeDescriptor; public MethodDescriptor(BytecodeParser parser, String name) { p = parser; int descriptor_index = p.u2(); String descriptor = ((CONSTANT_Utf8_Info) p.constantPool[descriptor_index]).string(); if(BytecodeParser.VERBOSE) p.println(" Method: " + name + ", " + descriptor); //String[] strings = descriptor.substring(1).split("\\)"); //parameterDescriptors = strings[0]; //typeDescriptor = strings[1]; int pos = descriptor.indexOf(')'); parameterDescriptors = descriptor.substring(1, pos); typeDescriptor = descriptor.substring(pos+1, descriptor.length()); } public List parameterList() { TypeDescriptor d = new TypeDescriptor(p, parameterDescriptors); return d.parameterList(); } public List parameterListSkipFirst() { TypeDescriptor d = new TypeDescriptor(p, parameterDescriptors); return d.parameterListSkipFirst(); } public Access type() { TypeDescriptor d = new TypeDescriptor(p, typeDescriptor); return d.type(); } }
1,733
23.083333
91
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/MethodInfo.java
package soot.JastAddJ; import java.util.HashSet; 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; /** * @ast class * */ public class MethodInfo extends java.lang.Object { private BytecodeParser p; String name; int flags; private MethodDescriptor methodDescriptor; private Attributes.MethodAttributes attributes; public MethodInfo(BytecodeParser parser) { p = parser; flags = p.u2(); if(BytecodeParser.VERBOSE) p.print(" Flags: " + Integer.toBinaryString(flags)); int name_index = p.u2(); CONSTANT_Info info = p.constantPool[name_index]; if(info == null || !(info instanceof CONSTANT_Utf8_Info)) { System.err.println("Expected CONSTANT_Utf8_Info but found: " + info.getClass().getName()); //if(info instanceof CONSTANT_Class_Info) { // System.err.println(" found CONSTANT_Class_Info: " + ((CONSTANT_Class_Info)info).name()); // name = ((CONSTANT_Class_Info)info).name(); //} } name = ((CONSTANT_Utf8_Info)info).string(); methodDescriptor = new MethodDescriptor(p, name); attributes = new Attributes.MethodAttributes(p); } public BodyDecl bodyDecl() { Signatures.MethodSignature s = attributes.methodSignature; Access returnType = (s != null && s.hasReturnType()) ? s.returnType() : methodDescriptor.type(); List parameterList; if(isConstructor() && p.isInnerClass) { parameterList = methodDescriptor.parameterListSkipFirst(); if(s != null) { Iterator iter = s.parameterTypes().iterator(); if(iter.hasNext()) iter.next(); for(int i = 0; iter.hasNext(); i++) { Access a = (Access)iter.next(); ((ParameterDeclaration)parameterList.getChildNoTransform(i)).setTypeAccess(a); } } } else { parameterList = methodDescriptor.parameterList(); if(s != null) { int i = 0; for(Iterator iter = s.parameterTypes().iterator(); iter.hasNext(); i++) { Access a = (Access)iter.next(); ((ParameterDeclaration)parameterList.getChildNoTransform(i)).setTypeAccess(a); } } } if((flags & Flags.ACC_VARARGS) != 0) { int lastIndex = parameterList.getNumChildNoTransform() - 1; ParameterDeclaration p = (ParameterDeclaration)parameterList.getChildNoTransform(lastIndex); parameterList.setChild( new VariableArityParameterDeclaration( p.getModifiersNoTransform(), ((ArrayTypeAccess)p.getTypeAccessNoTransform()).getAccessNoTransform(), p.getID() ), lastIndex ); } List exceptionList = (s != null && s.hasExceptionList()) ? s.exceptionList() : attributes.exceptionList(); if(attributes.parameterAnnotations != null) { for(int i = 0; i < attributes.parameterAnnotations.length; i++) { ParameterDeclaration p = (ParameterDeclaration)parameterList.getChildNoTransform(i); for(Iterator iter = attributes.parameterAnnotations[i].iterator(); iter.hasNext(); ) { Modifier m = (Modifier)iter.next(); p.getModifiersNoTransform().addModifier(m); } } } BodyDecl b; if(isConstructor()) { b = new ConstructorDecl(BytecodeParser.modifiers(flags), name, parameterList, exceptionList, new Opt(), new Block()); } else if(attributes.elementValue() != null) { b = new AnnotationMethodDecl(BytecodeParser.modifiers(flags), returnType, name, parameterList, exceptionList, new Opt(new Block()), new Opt(attributes.elementValue())); } else if(s != null && s.hasFormalTypeParameters()) { b = new GenericMethodDecl(BytecodeParser.modifiers(flags), returnType, name, parameterList, exceptionList, new Opt(new Block()), s.typeParameters()); } else { b = new MethodDecl(BytecodeParser.modifiers(flags), returnType, name, parameterList, exceptionList, new Opt(new Block())); } if(attributes.annotations != null) { for(Iterator iter = attributes.annotations.iterator(); iter.hasNext(); ) { if(b instanceof MethodDecl) ((MethodDecl)b).getModifiers().addModifier((Modifier)iter.next()); else if(b instanceof ConstructorDecl) ((ConstructorDecl)b).getModifiers().addModifier((Modifier)iter.next()); } } return b; } private boolean isConstructor() { return name.equals("<init>"); } public boolean isSynthetic() { return attributes.isSynthetic() || (flags & 0x1000) != 0; } }
5,135
32.350649
112
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/MinusExpr.java
/* This file was generated with JastAdd2 (http://jastadd.org) version R20130212 (r1031) */ package soot.JastAddJ; import java.util.HashSet; 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; /** * @production MinusExpr : {@link Unary}; * @ast node * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/java.ast:139 */ public class MinusExpr extends Unary implements Cloneable { /** * @apilevel low-level */ public void flushCache() { super.flushCache(); type_computed = false; type_value = null; } /** * @apilevel internal */ public void flushCollectionCache() { super.flushCollectionCache(); } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public MinusExpr clone() throws CloneNotSupportedException { MinusExpr node = (MinusExpr)super.clone(); node.type_computed = false; node.type_value = null; node.in$Circle(false); node.is$Final(false); return node; } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public MinusExpr copy() { try { MinusExpr node = (MinusExpr) clone(); node.parent = null; if(children != null) node.children = (ASTNode[]) children.clone(); return node; } catch (CloneNotSupportedException e) { throw new Error("Error: clone not supported for " + getClass().getName()); } } /** * Create a deep copy of the AST subtree at this node. * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level */ @SuppressWarnings({"unchecked", "cast"}) public MinusExpr fullCopy() { MinusExpr tree = (MinusExpr) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) children[i]; if(child != null) { child = child.fullCopy(); tree.setChild(child, i); } } } return tree; } /** * @ast method * @aspect TypeCheck * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeCheck.jrag:275 */ public void typeCheck() { if(!getOperand().type().isNumericType()) error("unary minus only operates on numeric types"); } /** * @ast method * @aspect Expressions * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/Expressions.jrag:692 */ public soot.Value eval(Body b) { return b.newNegExpr(asImmediate(b, getOperand().eval(b)), this); } /** * @ast method * */ public MinusExpr() { super(); } /** * Initializes the child array to the correct size. * Initializes List and Opt nta children. * @apilevel internal * @ast method * @ast method * */ public void init$Children() { children = new ASTNode[1]; } /** * @ast method * */ public MinusExpr(Expr p0) { setChild(p0, 0); } /** * @apilevel low-level * @ast method * */ protected int numChildren() { return 1; } /** * @apilevel internal * @ast method * */ public boolean mayHaveRewrite() { return true; } /** * Replaces the Operand child. * @param node The new node to replace the Operand child. * @apilevel high-level * @ast method * */ public void setOperand(Expr node) { setChild(node, 0); } /** * Retrieves the Operand child. * @return The current node used as the Operand child. * @apilevel high-level * @ast method * */ public Expr getOperand() { return (Expr)getChild(0); } /** * Retrieves the Operand child. * <p><em>This method does not invoke AST transformations.</em></p> * @return The current node used as the Operand child. * @apilevel low-level * @ast method * */ public Expr getOperandNoTransform() { return (Expr)getChildNoTransform(0); } /** * @attribute syn * @aspect ConstantExpression * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/ConstantExpression.jrag:91 */ public Constant constant() { ASTNode$State state = state(); try { return type().minus(getOperand().constant()); } finally { } } /** * @attribute syn * @aspect ConstantExpression * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/ConstantExpression.jrag:336 */ public boolean isConstant() { ASTNode$State state = state(); try { return getOperand().isConstant(); } finally { } } /** * @attribute syn * @aspect PrettyPrint * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/PrettyPrint.jadd:376 */ public String printPreOp() { ASTNode$State state = state(); try { return "-"; } finally { } } /** * @apilevel internal */ protected boolean type_computed = false; /** * @apilevel internal */ protected TypeDecl type_value; /** * @attribute syn * @aspect TypeAnalysis * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeAnalysis.jrag:316 */ @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; } /** * @apilevel internal */ private TypeDecl type_compute() { return getOperand().type().unaryNumericPromotion(); } /** * @apilevel internal */ public ASTNode rewriteTo() { // Declared in /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/Literals.jrag at line 341 if(getOperand() instanceof IntegerLiteral && ((IntegerLiteral)getOperand()).isDecimal() && getOperand().isPositive()) { state().duringLiterals++; ASTNode result = rewriteRule0(); state().duringLiterals--; return result; } // Declared in /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/Literals.jrag at line 353 if(getOperand() instanceof LongLiteral && ((LongLiteral)getOperand()).isDecimal() && getOperand().isPositive()) { state().duringLiterals++; ASTNode result = rewriteRule1(); state().duringLiterals--; return result; } return super.rewriteTo(); } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/Literals.jrag:341 * @apilevel internal */ private IntegerLiteral rewriteRule0() { { IntegerLiteral original = (IntegerLiteral) getOperand(); IntegerLiteral literal = new IntegerLiteral("-"+ original.getLITERAL()); literal.setDigits(original.getDigits()); literal.setKind(original.getKind()); return literal; } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/Literals.jrag:353 * @apilevel internal */ private LongLiteral rewriteRule1() { { LongLiteral original = (LongLiteral) getOperand(); LongLiteral literal = new LongLiteral("-"+ original.getLITERAL()); literal.setDigits(original.getDigits()); literal.setKind(original.getKind()); return literal; } } }
7,740
25.785467
123
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/ModExpr.java
/* This file was generated with JastAdd2 (http://jastadd.org) version R20130212 (r1031) */ package soot.JastAddJ; import java.util.HashSet; 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; /** * @production ModExpr : {@link MultiplicativeExpr}; * @ast node * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/java.ast:156 */ public class ModExpr extends MultiplicativeExpr implements Cloneable { /** * @apilevel low-level */ public void flushCache() { super.flushCache(); isConstant_visited = -1; isConstant_computed = false; isConstant_initialized = false; } /** * @apilevel internal */ public void flushCollectionCache() { super.flushCollectionCache(); } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public ModExpr clone() throws CloneNotSupportedException { ModExpr node = (ModExpr)super.clone(); node.isConstant_visited = -1; node.isConstant_computed = false; node.isConstant_initialized = false; node.in$Circle(false); node.is$Final(false); return node; } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public ModExpr copy() { try { ModExpr node = (ModExpr) clone(); node.parent = null; if(children != null) node.children = (ASTNode[]) children.clone(); return node; } catch (CloneNotSupportedException e) { throw new Error("Error: clone not supported for " + getClass().getName()); } } /** * Create a deep copy of the AST subtree at this node. * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level */ @SuppressWarnings({"unchecked", "cast"}) public ModExpr fullCopy() { ModExpr tree = (ModExpr) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) children[i]; if(child != null) { child = child.fullCopy(); tree.setChild(child, i); } } } return tree; } /** * @ast method * @aspect Expressions * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/Expressions.jrag:817 */ public soot.Value emitOperation(Body b, soot.Value left, soot.Value right) { return asLocal(b, b.newRemExpr(asImmediate(b, left), asImmediate(b, right), this)); } /** * @ast method * */ public ModExpr() { super(); } /** * Initializes the child array to the correct size. * Initializes List and Opt nta children. * @apilevel internal * @ast method * @ast method * */ public void init$Children() { children = new ASTNode[2]; } /** * @ast method * */ public ModExpr(Expr p0, Expr p1) { setChild(p0, 0); setChild(p1, 1); } /** * @apilevel low-level * @ast method * */ protected int numChildren() { return 2; } /** * @apilevel internal * @ast method * */ public boolean mayHaveRewrite() { return false; } /** * Replaces the LeftOperand child. * @param node The new node to replace the LeftOperand child. * @apilevel high-level * @ast method * */ public void setLeftOperand(Expr node) { setChild(node, 0); } /** * Retrieves the LeftOperand child. * @return The current node used as the LeftOperand child. * @apilevel high-level * @ast method * */ public Expr getLeftOperand() { return (Expr)getChild(0); } /** * Retrieves the LeftOperand child. * <p><em>This method does not invoke AST transformations.</em></p> * @return The current node used as the LeftOperand child. * @apilevel low-level * @ast method * */ public Expr getLeftOperandNoTransform() { return (Expr)getChildNoTransform(0); } /** * Replaces the RightOperand child. * @param node The new node to replace the RightOperand child. * @apilevel high-level * @ast method * */ public void setRightOperand(Expr node) { setChild(node, 1); } /** * Retrieves the RightOperand child. * @return The current node used as the RightOperand child. * @apilevel high-level * @ast method * */ public Expr getRightOperand() { return (Expr)getChild(1); } /** * Retrieves the RightOperand child. * <p><em>This method does not invoke AST transformations.</em></p> * @return The current node used as the RightOperand child. * @apilevel low-level * @ast method * */ public Expr getRightOperandNoTransform() { return (Expr)getChildNoTransform(1); } /** * @attribute syn * @aspect ConstantExpression * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/ConstantExpression.jrag:91 */ public Constant constant() { ASTNode$State state = state(); try { return type().mod(getLeftOperand().constant(), getRightOperand().constant()); } finally { } } /** * @apilevel internal */ protected int isConstant_visited = -1; /** * @apilevel internal */ protected boolean isConstant_computed = false; /** * @apilevel internal */ protected boolean isConstant_initialized = false; /** * @apilevel internal */ protected boolean isConstant_value; /** * @attribute syn * @aspect ConstantExpression * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/ConstantExpression.jrag:352 */ @SuppressWarnings({"unchecked", "cast"}) public boolean isConstant() { if(isConstant_computed) { return isConstant_value; } ASTNode$State state = state(); if (!isConstant_initialized) { isConstant_initialized = true; isConstant_value = false; } if (!state.IN_CIRCLE) { state.IN_CIRCLE = true; int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); do { isConstant_visited = state.CIRCLE_INDEX; state.CHANGE = false; boolean new_isConstant_value = isConstant_compute(); if (new_isConstant_value!=isConstant_value) state.CHANGE = true; isConstant_value = new_isConstant_value; state.CIRCLE_INDEX++; } while (state.CHANGE); if(isFinal && num == state().boundariesCrossed) { isConstant_computed = true; } else { state.RESET_CYCLE = true; isConstant_compute(); state.RESET_CYCLE = false; isConstant_computed = false; isConstant_initialized = false; } state.IN_CIRCLE = false; return isConstant_value; } if(isConstant_visited != state.CIRCLE_INDEX) { isConstant_visited = state.CIRCLE_INDEX; if (state.RESET_CYCLE) { isConstant_computed = false; isConstant_initialized = false; isConstant_visited = -1; return isConstant_value; } boolean new_isConstant_value = isConstant_compute(); if (new_isConstant_value!=isConstant_value) state.CHANGE = true; isConstant_value = new_isConstant_value; return isConstant_value; } return isConstant_value; } /** * @apilevel internal */ private boolean isConstant_compute() { return getLeftOperand().isConstant() && getRightOperand().isConstant() && !(getRightOperand().type().isInt() && getRightOperand().constant().intValue() == 0); } /** * @attribute syn * @aspect PrettyPrint * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/PrettyPrint.jadd:400 */ public String printOp() { ASTNode$State state = state(); try { return " % "; } finally { } } /** * @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); } }
8,194
25.350482
203
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/Modifier.java
/* This file was generated with JastAdd2 (http://jastadd.org) version R20130212 (r1031) */ package soot.JastAddJ; import java.util.HashSet; 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; /** * @production Modifier : {@link ASTNode} ::= <span class="component">&lt;ID:String&gt;</span>; * @ast node * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/java.ast:191 */ public class Modifier extends ASTNode<ASTNode> implements Cloneable { /** * @apilevel low-level */ public void flushCache() { super.flushCache(); } /** * @apilevel internal */ public void flushCollectionCache() { super.flushCollectionCache(); } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public Modifier clone() throws CloneNotSupportedException { Modifier node = (Modifier)super.clone(); node.in$Circle(false); node.is$Final(false); return node; } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public Modifier copy() { try { Modifier node = (Modifier) clone(); node.parent = null; if(children != null) node.children = (ASTNode[]) children.clone(); return node; } catch (CloneNotSupportedException e) { throw new Error("Error: clone not supported for " + getClass().getName()); } } /** * Create a deep copy of the AST subtree at this node. * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level */ @SuppressWarnings({"unchecked", "cast"}) public Modifier fullCopy() { Modifier tree = (Modifier) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) children[i]; if(child != null) { child = child.fullCopy(); tree.setChild(child, i); } } } return tree; } /** * @ast method * @aspect PrettyPrint * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/PrettyPrint.jadd:442 */ public void toString(StringBuffer s) { s.append(getID()); } /** * @ast method * */ public Modifier() { super(); } /** * Initializes the child array to the correct size. * Initializes List and Opt nta children. * @apilevel internal * @ast method * @ast method * */ public void init$Children() { } /** * @ast method * */ public Modifier(String p0) { setID(p0); } /** * @ast method * */ public Modifier(beaver.Symbol p0) { setID(p0); } /** * @apilevel low-level * @ast method * */ protected int numChildren() { return 0; } /** * @apilevel internal * @ast method * */ public boolean mayHaveRewrite() { return false; } /** * Replaces the lexeme ID. * @param value The new value for the lexeme ID. * @apilevel high-level * @ast method * */ public void setID(String value) { tokenString_ID = value; } /** * @apilevel internal * @ast method * */ /** * @apilevel internal */ protected String tokenString_ID; /** * @ast method * */ public int IDstart; /** * @ast method * */ public int IDend; /** * JastAdd-internal setter for lexeme ID using the Beaver parser. * @apilevel internal * @ast method * */ 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(); } /** * Retrieves the value for the lexeme ID. * @return The value for the lexeme ID. * @apilevel high-level * @ast method * */ public String getID() { return tokenString_ID != null ? tokenString_ID : ""; } /** * @attribute syn * @aspect PrettyPrint * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/PrettyPrint.jadd:800 */ public String dumpString() { ASTNode$State state = state(); try { return getClass().getName() + " [" + getID() + "]"; } finally { } } /** * @attribute syn * @aspect AnnotationsCodegen * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/Jimple1.5Backend/AnnotationsCodegen.jrag:143 */ public boolean isRuntimeVisible() { ASTNode$State state = state(); try { return false; } finally { } } /** * @attribute syn * @aspect AnnotationsCodegen * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/Jimple1.5Backend/AnnotationsCodegen.jrag:153 */ public boolean isRuntimeInvisible() { ASTNode$State state = state(); try { return false; } finally { } } /** * @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); } }
5,431
21.919831
123
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/Modifiers.java
/* This file was generated with JastAdd2 (http://jastadd.org) version R20130212 (r1031) */ package soot.JastAddJ; import java.util.HashSet; 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; /** * @production Modifiers : {@link ASTNode} ::= <span class="component">{@link Modifier}*</span>; * @ast node * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/java.ast:190 */ public class Modifiers extends ASTNode<ASTNode> implements Cloneable { /** * @apilevel low-level */ public void flushCache() { super.flushCache(); isPublic_computed = false; isPrivate_computed = false; isProtected_computed = false; isStatic_computed = false; isFinal_computed = false; isAbstract_computed = false; isVolatile_computed = false; isTransient_computed = false; isStrictfp_computed = false; isSynchronized_computed = false; isNative_computed = false; isSynthetic_computed = false; numModifier_String_values = null; } /** * @apilevel internal */ public void flushCollectionCache() { super.flushCollectionCache(); } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public Modifiers clone() throws CloneNotSupportedException { Modifiers node = (Modifiers)super.clone(); node.isPublic_computed = false; node.isPrivate_computed = false; node.isProtected_computed = false; node.isStatic_computed = false; node.isFinal_computed = false; node.isAbstract_computed = false; node.isVolatile_computed = false; node.isTransient_computed = false; node.isStrictfp_computed = false; node.isSynchronized_computed = false; node.isNative_computed = false; node.isSynthetic_computed = false; node.numModifier_String_values = null; node.in$Circle(false); node.is$Final(false); return node; } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public Modifiers copy() { try { Modifiers node = (Modifiers) clone(); node.parent = null; if(children != null) node.children = (ASTNode[]) children.clone(); return node; } catch (CloneNotSupportedException e) { throw new Error("Error: clone not supported for " + getClass().getName()); } } /** * Create a deep copy of the AST subtree at this node. * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level */ @SuppressWarnings({"unchecked", "cast"}) public Modifiers fullCopy() { Modifiers tree = (Modifiers) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) children[i]; if(child != null) { child = child.fullCopy(); tree.setChild(child, i); } } } return tree; } /** * @ast method * @aspect Modifiers * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/Modifiers.jrag:314 */ public void checkModifiers() { super.checkModifiers(); if(numProtectionModifiers() > 1) error("only one public, protected, private allowed"); if(numModifier("static") > 1) error("only one static allowed"); // 8.4.3.1 // 8.4.3.2 // 8.1.1.2 if(numCompletenessModifiers() > 1) error("only one of final, abstract, volatile allowed"); if(numModifier("synchronized") > 1) error("only one synchronized allowed"); if(numModifier("transient") > 1) error("only one transient allowed"); if(numModifier("native") > 1) error("only one native allowed"); if(numModifier("strictfp") > 1) error("only one strictfp allowed"); if(isPublic() && !mayBePublic()) error("modifier public not allowed in this context"); if(isPrivate() && !mayBePrivate()) error("modifier private not allowed in this context"); if(isProtected() && !mayBeProtected()) error("modifier protected not allowed in this context"); if(isStatic() && !mayBeStatic()) error("modifier static not allowed in this context"); if(isFinal() && !mayBeFinal()) error("modifier final not allowed in this context"); if(isAbstract() && !mayBeAbstract()) error("modifier abstract not allowed in this context"); if(isVolatile() && !mayBeVolatile()) error("modifier volatile not allowed in this context"); if(isTransient() && !mayBeTransient()) error("modifier transient not allowed in this context"); if(isStrictfp() && !mayBeStrictfp()) error("modifier strictfp not allowed in this context"); if(isSynchronized() && !mayBeSynchronized()) error("modifier synchronized not allowed in this context"); if(isNative() && !mayBeNative()) error("modifier native not allowed in this context"); } /** * @ast method * @aspect PrettyPrint * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/PrettyPrint.jadd:435 */ public void toString(StringBuffer s) { for(int i = 0; i < getNumModifier(); i++) { getModifier(i).toString(s); s.append(" "); } } /** * @ast method * @aspect AnnotationsCodegen * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/Jimple1.5Backend/AnnotationsCodegen.jrag:83 */ public void addSourceOnlyAnnotations(Collection c) { if(new soot.options.JBOptions(soot.PhaseOptions.v().getPhaseOptions("jb")). preserve_source_annotations()) { for(int i = 0; i < getNumModifier(); i++) { if(getModifier(i) instanceof Annotation) { Annotation a = (Annotation)getModifier(i); if(!a.isRuntimeVisible() && !a.isRuntimeInvisible()) { soot.tagkit.VisibilityAnnotationTag tag = new soot.tagkit.VisibilityAnnotationTag(soot.tagkit.AnnotationConstants.SOURCE_VISIBLE); ArrayList elements = new ArrayList(1); a.appendAsAttributeTo(elements); tag.addAnnotation((soot.tagkit.AnnotationTag)elements.get(0)); c.add(tag); } } } } } /** * @ast method * @aspect AnnotationsCodegen * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/Jimple1.5Backend/AnnotationsCodegen.jrag:101 */ public void addAllAnnotations(Collection c) { for(int i = 0; i < getNumModifier(); i++) { if(getModifier(i) instanceof Annotation) { Annotation a = (Annotation)getModifier(i); a.appendAsAttributeTo(c); } } } /** * @ast method * @aspect AnnotationsCodegen * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/Jimple1.5Backend/AnnotationsCodegen.jrag:110 */ public void addRuntimeVisibleAnnotationsAttribute(Collection c) { Collection annotations = runtimeVisibleAnnotations(); if(!annotations.isEmpty()) { soot.tagkit.VisibilityAnnotationTag tag = new soot.tagkit.VisibilityAnnotationTag(soot.tagkit.AnnotationConstants.RUNTIME_VISIBLE); for(Iterator iter = annotations.iterator(); iter.hasNext(); ) { Annotation annotation = (Annotation)iter.next(); ArrayList elements = new ArrayList(1); annotation.appendAsAttributeTo(elements); tag.addAnnotation((soot.tagkit.AnnotationTag)elements.get(0)); } c.add(tag); } } /** * @ast method * @aspect AnnotationsCodegen * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/Jimple1.5Backend/AnnotationsCodegen.jrag:125 */ public void addRuntimeInvisibleAnnotationsAttribute(Collection c) { Collection annotations = runtimeInvisibleAnnotations(); if(!annotations.isEmpty()) { soot.tagkit.VisibilityAnnotationTag tag = new soot.tagkit.VisibilityAnnotationTag(soot.tagkit.AnnotationConstants.RUNTIME_INVISIBLE); for(Iterator iter = annotations.iterator(); iter.hasNext(); ) { Annotation annotation = (Annotation)iter.next(); ArrayList elements = new ArrayList(1); annotation.appendAsAttributeTo(elements); tag.addAnnotation((soot.tagkit.AnnotationTag)elements.get(0)); } c.add(tag); } } /** * @ast method * @aspect AnnotationsCodegen * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/Jimple1.5Backend/AnnotationsCodegen.jrag:210 */ public Collection runtimeVisibleAnnotations() { Collection annotations = new ArrayList(); for(int i = 0; i < getNumModifier(); i++) if(getModifier(i).isRuntimeVisible()) annotations.add(getModifier(i)); return annotations; } /** * @ast method * @aspect AnnotationsCodegen * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/Jimple1.5Backend/AnnotationsCodegen.jrag:266 */ public Collection runtimeInvisibleAnnotations() { Collection annotations = new ArrayList(); for(int i = 0; i < getNumModifier(); i++) if(getModifier(i).isRuntimeInvisible()) annotations.add(getModifier(i)); return annotations; } /** * @ast method * @aspect AnnotationsCodegen * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/Jimple1.5Backend/AnnotationsCodegen.jrag:290 */ // Add ACC_ANNOTATION flag to generated class file public static final int ACC_ANNOTATION = 0x2000; /** * @ast method * @aspect EnumsCodegen * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/Jimple1.5Backend/EnumsCodegen.jrag:12 */ // add flags to enums public static final int ACC_ENUM = 0x4000; /** * @ast method * @aspect GenericsCodegen * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/Jimple1.5Backend/GenericsCodegen.jrag:325 */ public static final int ACC_BRIDGE = 0x0040; /** * @ast method * @aspect VariableArityParametersCodegen * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/Jimple1.5Backend/VariableArityParametersCodegen.jrag:78 */ public static final int ACC_VARARGS = 0x0080; /** * @ast method * */ public Modifiers() { super(); } /** * Initializes the child array to the correct size. * Initializes List and Opt nta children. * @apilevel internal * @ast method * @ast method * */ public void init$Children() { children = new ASTNode[1]; setChild(new List(), 0); } /** * @ast method * */ public Modifiers(List<Modifier> p0) { setChild(p0, 0); } /** * @apilevel low-level * @ast method * */ protected int numChildren() { return 1; } /** * @apilevel internal * @ast method * */ public boolean mayHaveRewrite() { return false; } /** * Replaces the Modifier list. * @param list The new list node to be used as the Modifier list. * @apilevel high-level * @ast method * */ public void setModifierList(List<Modifier> list) { setChild(list, 0); } /** * Retrieves the number of children in the Modifier list. * @return Number of children in the Modifier list. * @apilevel high-level * @ast method * */ public int getNumModifier() { return getModifierList().getNumChild(); } /** * Retrieves the number of children in the Modifier list. * Calling this method will not trigger rewrites.. * @return Number of children in the Modifier list. * @apilevel low-level * @ast method * */ public int getNumModifierNoTransform() { return getModifierListNoTransform().getNumChildNoTransform(); } /** * Retrieves the element at index {@code i} in the Modifier list.. * @param i Index of the element to return. * @return The element at position {@code i} in the Modifier list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public Modifier getModifier(int i) { return (Modifier)getModifierList().getChild(i); } /** * Append an element to the Modifier list. * @param node The element to append to the Modifier list. * @apilevel high-level * @ast method * */ public void addModifier(Modifier node) { List<Modifier> list = (parent == null || state == null) ? getModifierListNoTransform() : getModifierList(); list.addChild(node); } /** * @apilevel low-level * @ast method * */ public void addModifierNoTransform(Modifier node) { List<Modifier> list = getModifierListNoTransform(); list.addChild(node); } /** * Replaces the Modifier list element at index {@code i} with the new node {@code node}. * @param node The new node to replace the old list element. * @param i The list index of the node to be replaced. * @apilevel high-level * @ast method * */ public void setModifier(Modifier node, int i) { List<Modifier> list = getModifierList(); list.setChild(node, i); } /** * Retrieves the Modifier list. * @return The node representing the Modifier list. * @apilevel high-level * @ast method * */ public List<Modifier> getModifiers() { return getModifierList(); } /** * Retrieves the Modifier list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the Modifier list. * @apilevel low-level * @ast method * */ public List<Modifier> getModifiersNoTransform() { return getModifierListNoTransform(); } /** * Retrieves the Modifier list. * @return The node representing the Modifier list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<Modifier> getModifierList() { List<Modifier> list = (List<Modifier>)getChild(0); list.getNumChild(); return list; } /** * Retrieves the Modifier list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the Modifier list. * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<Modifier> getModifierListNoTransform() { return (List<Modifier>)getChildNoTransform(0); } /** * @apilevel internal */ protected boolean isPublic_computed = false; /** * @apilevel internal */ protected boolean isPublic_value; /** * @attribute syn * @aspect Modifiers * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/Modifiers.jrag:372 */ @SuppressWarnings({"unchecked", "cast"}) public boolean isPublic() { if(isPublic_computed) { return isPublic_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); isPublic_value = isPublic_compute(); if(isFinal && num == state().boundariesCrossed) isPublic_computed = true; return isPublic_value; } /** * @apilevel internal */ private boolean isPublic_compute() { return numModifier("public") != 0; } /** * @apilevel internal */ protected boolean isPrivate_computed = false; /** * @apilevel internal */ protected boolean isPrivate_value; /** * @attribute syn * @aspect Modifiers * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/Modifiers.jrag:373 */ @SuppressWarnings({"unchecked", "cast"}) public boolean isPrivate() { if(isPrivate_computed) { return isPrivate_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); isPrivate_value = isPrivate_compute(); if(isFinal && num == state().boundariesCrossed) isPrivate_computed = true; return isPrivate_value; } /** * @apilevel internal */ private boolean isPrivate_compute() { return numModifier("private") != 0; } /** * @apilevel internal */ protected boolean isProtected_computed = false; /** * @apilevel internal */ protected boolean isProtected_value; /** * @attribute syn * @aspect Modifiers * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/Modifiers.jrag:374 */ @SuppressWarnings({"unchecked", "cast"}) public boolean isProtected() { if(isProtected_computed) { return isProtected_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); isProtected_value = isProtected_compute(); if(isFinal && num == state().boundariesCrossed) isProtected_computed = true; return isProtected_value; } /** * @apilevel internal */ private boolean isProtected_compute() { return numModifier("protected") != 0; } /** * @apilevel internal */ protected boolean isStatic_computed = false; /** * @apilevel internal */ protected boolean isStatic_value; /** * @attribute syn * @aspect Modifiers * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/Modifiers.jrag:375 */ @SuppressWarnings({"unchecked", "cast"}) public boolean isStatic() { if(isStatic_computed) { return isStatic_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); isStatic_value = isStatic_compute(); if(isFinal && num == state().boundariesCrossed) isStatic_computed = true; return isStatic_value; } /** * @apilevel internal */ private boolean isStatic_compute() { return numModifier("static") != 0; } /** * @apilevel internal */ protected boolean isFinal_computed = false; /** * @apilevel internal */ protected boolean isFinal_value; /** * @attribute syn * @aspect Modifiers * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/Modifiers.jrag:376 */ @SuppressWarnings({"unchecked", "cast"}) public boolean isFinal() { if(isFinal_computed) { return isFinal_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); isFinal_value = isFinal_compute(); if(isFinal && num == state().boundariesCrossed) isFinal_computed = true; return isFinal_value; } /** * @apilevel internal */ private boolean isFinal_compute() { return numModifier("final") != 0; } /** * @apilevel internal */ protected boolean isAbstract_computed = false; /** * @apilevel internal */ protected boolean isAbstract_value; /** * @attribute syn * @aspect Modifiers * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/Modifiers.jrag:377 */ @SuppressWarnings({"unchecked", "cast"}) public boolean isAbstract() { if(isAbstract_computed) { return isAbstract_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); isAbstract_value = isAbstract_compute(); if(isFinal && num == state().boundariesCrossed) isAbstract_computed = true; return isAbstract_value; } /** * @apilevel internal */ private boolean isAbstract_compute() { return numModifier("abstract") != 0; } /** * @apilevel internal */ protected boolean isVolatile_computed = false; /** * @apilevel internal */ protected boolean isVolatile_value; /** * @attribute syn * @aspect Modifiers * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/Modifiers.jrag:378 */ @SuppressWarnings({"unchecked", "cast"}) public boolean isVolatile() { if(isVolatile_computed) { return isVolatile_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); isVolatile_value = isVolatile_compute(); if(isFinal && num == state().boundariesCrossed) isVolatile_computed = true; return isVolatile_value; } /** * @apilevel internal */ private boolean isVolatile_compute() { return numModifier("volatile") != 0; } /** * @apilevel internal */ protected boolean isTransient_computed = false; /** * @apilevel internal */ protected boolean isTransient_value; /** * @attribute syn * @aspect Modifiers * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/Modifiers.jrag:379 */ @SuppressWarnings({"unchecked", "cast"}) public boolean isTransient() { if(isTransient_computed) { return isTransient_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); isTransient_value = isTransient_compute(); if(isFinal && num == state().boundariesCrossed) isTransient_computed = true; return isTransient_value; } /** * @apilevel internal */ private boolean isTransient_compute() { return numModifier("transient") != 0; } /** * @apilevel internal */ protected boolean isStrictfp_computed = false; /** * @apilevel internal */ protected boolean isStrictfp_value; /** * @attribute syn * @aspect Modifiers * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/Modifiers.jrag:380 */ @SuppressWarnings({"unchecked", "cast"}) public boolean isStrictfp() { if(isStrictfp_computed) { return isStrictfp_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); isStrictfp_value = isStrictfp_compute(); if(isFinal && num == state().boundariesCrossed) isStrictfp_computed = true; return isStrictfp_value; } /** * @apilevel internal */ private boolean isStrictfp_compute() { return numModifier("strictfp") != 0; } /** * @apilevel internal */ protected boolean isSynchronized_computed = false; /** * @apilevel internal */ protected boolean isSynchronized_value; /** * @attribute syn * @aspect Modifiers * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/Modifiers.jrag:381 */ @SuppressWarnings({"unchecked", "cast"}) public boolean isSynchronized() { if(isSynchronized_computed) { return isSynchronized_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); isSynchronized_value = isSynchronized_compute(); if(isFinal && num == state().boundariesCrossed) isSynchronized_computed = true; return isSynchronized_value; } /** * @apilevel internal */ private boolean isSynchronized_compute() { return numModifier("synchronized") != 0; } /** * @apilevel internal */ protected boolean isNative_computed = false; /** * @apilevel internal */ protected boolean isNative_value; /** * @attribute syn * @aspect Modifiers * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/Modifiers.jrag:382 */ @SuppressWarnings({"unchecked", "cast"}) public boolean isNative() { if(isNative_computed) { return isNative_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); isNative_value = isNative_compute(); if(isFinal && num == state().boundariesCrossed) isNative_computed = true; return isNative_value; } /** * @apilevel internal */ private boolean isNative_compute() { return numModifier("native") != 0; } /** * @apilevel internal */ protected boolean isSynthetic_computed = false; /** * @apilevel internal */ protected boolean isSynthetic_value; /** * @attribute syn * @aspect Modifiers * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/Modifiers.jrag:384 */ @SuppressWarnings({"unchecked", "cast"}) public boolean isSynthetic() { if(isSynthetic_computed) { return isSynthetic_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); isSynthetic_value = isSynthetic_compute(); if(isFinal && num == state().boundariesCrossed) isSynthetic_computed = true; return isSynthetic_value; } /** * @apilevel internal */ private boolean isSynthetic_compute() { return numModifier("synthetic") != 0; } /** * @attribute syn * @aspect Modifiers * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/Modifiers.jrag:386 */ public int numProtectionModifiers() { ASTNode$State state = state(); try { return numModifier("public") + numModifier("protected") + numModifier("private"); } finally { } } /** * @attribute syn * @aspect Modifiers * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/Modifiers.jrag:389 */ public int numCompletenessModifiers() { ASTNode$State state = state(); try { return numModifier("abstract") + numModifier("final") + numModifier("volatile"); } finally { } } protected java.util.Map numModifier_String_values; /** * @attribute syn * @aspect Modifiers * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/Modifiers.jrag:392 */ @SuppressWarnings({"unchecked", "cast"}) public int numModifier(String name) { Object _parameters = name; if(numModifier_String_values == null) numModifier_String_values = new java.util.HashMap(4); if(numModifier_String_values.containsKey(_parameters)) { return ((Integer)numModifier_String_values.get(_parameters)).intValue(); } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); int numModifier_String_value = numModifier_compute(name); if(isFinal && num == state().boundariesCrossed) numModifier_String_values.put(_parameters, Integer.valueOf(numModifier_String_value)); return numModifier_String_value; } /** * @apilevel internal */ private int numModifier_compute(String name) { int n = 0; for(int i = 0; i < getNumModifier(); i++) { String s = getModifier(i).getID(); if(s.equals(name)) n++; } return n; } /** * @attribute syn * @aspect Annotations * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Annotations.jrag:214 */ public Annotation annotation(TypeDecl typeDecl) { ASTNode$State state = state(); try { for(int i = 0; i < getNumModifier(); i++) { if(getModifier(i) instanceof Annotation) { Annotation a = (Annotation)getModifier(i); if(a.type() == typeDecl) return a; } } return null; } finally { } } /** * @attribute syn * @aspect Annotations * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Annotations.jrag:289 */ public boolean hasAnnotationSuppressWarnings(String s) { ASTNode$State state = state(); try { Annotation a = annotation(lookupType("java.lang", "SuppressWarnings")); if(a != null && a.getNumElementValuePair() == 1 && a.getElementValuePair(0).getName().equals("value")) return a.getElementValuePair(0).getElementValue().hasValue(s); return false; } finally { } } /** * @attribute syn * @aspect Annotations * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Annotations.jrag:319 */ public boolean hasDeprecatedAnnotation() { ASTNode$State state = state(); try { return annotation(lookupType("java.lang", "Deprecated")) != null; } finally { } } /** * @return true if the modifier list includes the SafeVarargs annotation * @attribute syn * @aspect SafeVarargs * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/SafeVarargs.jrag:49 */ public boolean hasAnnotationSafeVarargs() { ASTNode$State state = state(); try { return annotation(lookupType("java.lang", "SafeVarargs")) != null; } finally { } } /** * @attribute inh * @aspect Modifiers * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/Modifiers.jrag:358 */ @SuppressWarnings({"unchecked", "cast"}) public TypeDecl hostType() { ASTNode$State state = state(); TypeDecl hostType_value = getParent().Define_TypeDecl_hostType(this, null); return hostType_value; } /** * @attribute inh * @aspect Modifiers * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/Modifiers.jrag:360 */ @SuppressWarnings({"unchecked", "cast"}) public boolean mayBePublic() { ASTNode$State state = state(); boolean mayBePublic_value = getParent().Define_boolean_mayBePublic(this, null); return mayBePublic_value; } /** * @attribute inh * @aspect Modifiers * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/Modifiers.jrag:361 */ @SuppressWarnings({"unchecked", "cast"}) public boolean mayBePrivate() { ASTNode$State state = state(); boolean mayBePrivate_value = getParent().Define_boolean_mayBePrivate(this, null); return mayBePrivate_value; } /** * @attribute inh * @aspect Modifiers * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/Modifiers.jrag:362 */ @SuppressWarnings({"unchecked", "cast"}) public boolean mayBeProtected() { ASTNode$State state = state(); boolean mayBeProtected_value = getParent().Define_boolean_mayBeProtected(this, null); return mayBeProtected_value; } /** * @attribute inh * @aspect Modifiers * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/Modifiers.jrag:363 */ @SuppressWarnings({"unchecked", "cast"}) public boolean mayBeStatic() { ASTNode$State state = state(); boolean mayBeStatic_value = getParent().Define_boolean_mayBeStatic(this, null); return mayBeStatic_value; } /** * @attribute inh * @aspect Modifiers * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/Modifiers.jrag:364 */ @SuppressWarnings({"unchecked", "cast"}) public boolean mayBeFinal() { ASTNode$State state = state(); boolean mayBeFinal_value = getParent().Define_boolean_mayBeFinal(this, null); return mayBeFinal_value; } /** * @attribute inh * @aspect Modifiers * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/Modifiers.jrag:365 */ @SuppressWarnings({"unchecked", "cast"}) public boolean mayBeAbstract() { ASTNode$State state = state(); boolean mayBeAbstract_value = getParent().Define_boolean_mayBeAbstract(this, null); return mayBeAbstract_value; } /** * @attribute inh * @aspect Modifiers * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/Modifiers.jrag:366 */ @SuppressWarnings({"unchecked", "cast"}) public boolean mayBeVolatile() { ASTNode$State state = state(); boolean mayBeVolatile_value = getParent().Define_boolean_mayBeVolatile(this, null); return mayBeVolatile_value; } /** * @attribute inh * @aspect Modifiers * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/Modifiers.jrag:367 */ @SuppressWarnings({"unchecked", "cast"}) public boolean mayBeTransient() { ASTNode$State state = state(); boolean mayBeTransient_value = getParent().Define_boolean_mayBeTransient(this, null); return mayBeTransient_value; } /** * @attribute inh * @aspect Modifiers * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/Modifiers.jrag:368 */ @SuppressWarnings({"unchecked", "cast"}) public boolean mayBeStrictfp() { ASTNode$State state = state(); boolean mayBeStrictfp_value = getParent().Define_boolean_mayBeStrictfp(this, null); return mayBeStrictfp_value; } /** * @attribute inh * @aspect Modifiers * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/Modifiers.jrag:369 */ @SuppressWarnings({"unchecked", "cast"}) public boolean mayBeSynchronized() { ASTNode$State state = state(); boolean mayBeSynchronized_value = getParent().Define_boolean_mayBeSynchronized(this, null); return mayBeSynchronized_value; } /** * @attribute inh * @aspect Modifiers * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/Modifiers.jrag:370 */ @SuppressWarnings({"unchecked", "cast"}) public boolean mayBeNative() { ASTNode$State state = state(); boolean mayBeNative_value = getParent().Define_boolean_mayBeNative(this, null); return mayBeNative_value; } /** * @attribute inh * @aspect Annotations * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Annotations.jrag:56 */ @SuppressWarnings({"unchecked", "cast"}) public TypeDecl lookupType(String packageName, String typeName) { ASTNode$State state = state(); TypeDecl lookupType_String_String_value = getParent().Define_TypeDecl_lookupType(this, null, packageName, typeName); return lookupType_String_String_value; } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Annotations.jrag:424 * @apilevel internal */ public Annotation Define_Annotation_lookupAnnotation(ASTNode caller, ASTNode child, TypeDecl typeDecl) { if(caller == getModifierListNoTransform()) { int index = caller.getIndexOfChild(child); { return annotation(typeDecl); } } else { return getParent().Define_Annotation_lookupAnnotation(this, caller, typeDecl); } } /** * @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); } }
34,281
30.480257
142
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/MulExpr.java
/* This file was generated with JastAdd2 (http://jastadd.org) version R20130212 (r1031) */ package soot.JastAddJ; import java.util.HashSet; 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; /** * @production MulExpr : {@link MultiplicativeExpr}; * @ast node * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/java.ast:154 */ public class MulExpr extends MultiplicativeExpr implements Cloneable { /** * @apilevel low-level */ public void flushCache() { super.flushCache(); } /** * @apilevel internal */ public void flushCollectionCache() { super.flushCollectionCache(); } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public MulExpr clone() throws CloneNotSupportedException { MulExpr node = (MulExpr)super.clone(); node.in$Circle(false); node.is$Final(false); return node; } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public MulExpr copy() { try { MulExpr node = (MulExpr) clone(); node.parent = null; if(children != null) node.children = (ASTNode[]) children.clone(); return node; } catch (CloneNotSupportedException e) { throw new Error("Error: clone not supported for " + getClass().getName()); } } /** * Create a deep copy of the AST subtree at this node. * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level */ @SuppressWarnings({"unchecked", "cast"}) public MulExpr fullCopy() { MulExpr tree = (MulExpr) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) children[i]; if(child != null) { child = child.fullCopy(); tree.setChild(child, i); } } } return tree; } /** * @ast method * @aspect Expressions * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/Expressions.jrag:811 */ public soot.Value emitOperation(Body b, soot.Value left, soot.Value right) { return asLocal(b, b.newMulExpr(asImmediate(b, left), asImmediate(b, right), this)); } /** * @ast method * */ public MulExpr() { super(); } /** * Initializes the child array to the correct size. * Initializes List and Opt nta children. * @apilevel internal * @ast method * @ast method * */ public void init$Children() { children = new ASTNode[2]; } /** * @ast method * */ public MulExpr(Expr p0, Expr p1) { setChild(p0, 0); setChild(p1, 1); } /** * @apilevel low-level * @ast method * */ protected int numChildren() { return 2; } /** * @apilevel internal * @ast method * */ public boolean mayHaveRewrite() { return false; } /** * Replaces the LeftOperand child. * @param node The new node to replace the LeftOperand child. * @apilevel high-level * @ast method * */ public void setLeftOperand(Expr node) { setChild(node, 0); } /** * Retrieves the LeftOperand child. * @return The current node used as the LeftOperand child. * @apilevel high-level * @ast method * */ public Expr getLeftOperand() { return (Expr)getChild(0); } /** * Retrieves the LeftOperand child. * <p><em>This method does not invoke AST transformations.</em></p> * @return The current node used as the LeftOperand child. * @apilevel low-level * @ast method * */ public Expr getLeftOperandNoTransform() { return (Expr)getChildNoTransform(0); } /** * Replaces the RightOperand child. * @param node The new node to replace the RightOperand child. * @apilevel high-level * @ast method * */ public void setRightOperand(Expr node) { setChild(node, 1); } /** * Retrieves the RightOperand child. * @return The current node used as the RightOperand child. * @apilevel high-level * @ast method * */ public Expr getRightOperand() { return (Expr)getChild(1); } /** * Retrieves the RightOperand child. * <p><em>This method does not invoke AST transformations.</em></p> * @return The current node used as the RightOperand child. * @apilevel low-level * @ast method * */ public Expr getRightOperandNoTransform() { return (Expr)getChildNoTransform(1); } /** * @attribute syn * @aspect ConstantExpression * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/ConstantExpression.jrag:91 */ public Constant constant() { ASTNode$State state = state(); try { return type().mul(getLeftOperand().constant(), getRightOperand().constant()); } finally { } } /** * @attribute syn * @aspect PrettyPrint * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/PrettyPrint.jadd:400 */ public String printOp() { ASTNode$State state = state(); try { return " * "; } finally { } } /** * @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); } }
5,580
23.47807
113
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/MultiCatch.java
/* This file was generated with JastAdd2 (http://jastadd.org) version R20130212 (r1031) */ package soot.JastAddJ; import java.util.HashSet; 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; /** * A catch clause that can catch a multiple exception types. * @production MultiCatch : {@link CatchClause} ::= <span class="component">Parameter:{@link CatchParameterDeclaration}</span> <span class="component">{@link Block}</span>; * @ast node * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/MultiCatch.ast:14 */ public class MultiCatch extends CatchClause implements Cloneable { /** * @apilevel low-level */ public void flushCache() { super.flushCache(); parameterDeclaration_String_values = null; } /** * @apilevel internal */ public void flushCollectionCache() { super.flushCollectionCache(); } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public MultiCatch clone() throws CloneNotSupportedException { MultiCatch node = (MultiCatch)super.clone(); node.parameterDeclaration_String_values = null; node.in$Circle(false); node.is$Final(false); return node; } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public MultiCatch copy() { try { MultiCatch node = (MultiCatch) clone(); node.parent = null; if(children != null) node.children = (ASTNode[]) children.clone(); return node; } catch (CloneNotSupportedException e) { throw new Error("Error: clone not supported for " + getClass().getName()); } } /** * Create a deep copy of the AST subtree at this node. * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level */ @SuppressWarnings({"unchecked", "cast"}) public MultiCatch fullCopy() { MultiCatch tree = (MultiCatch) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) children[i]; if(child != null) { child = child.fullCopy(); tree.setChild(child, i); } } } return tree; } /** * Pretty printing of multi-catch clause. * @ast method * @aspect MultiCatch * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/MultiCatch.jrag:146 */ public void toString(StringBuffer sb) { sb.append("catch ("); getParameter().toString(sb); sb.append(") "); getBlock().toString(sb); } /** * @ast method * @aspect PreciseRethrow * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/PreciseRethrow.jrag:204 */ void checkUnreachableStmt() { if (!getBlock().reachable() && reportUnreachable()) error("the exception "+getParameter().type().fullName()+ " is not thrown in the body of the try statement"); } /** * @ast method * */ public MultiCatch() { super(); } /** * Initializes the child array to the correct size. * Initializes List and Opt nta children. * @apilevel internal * @ast method * @ast method * */ public void init$Children() { children = new ASTNode[2]; } /** * @ast method * */ public MultiCatch(CatchParameterDeclaration p0, Block p1) { setChild(p0, 0); setChild(p1, 1); } /** * @apilevel low-level * @ast method * */ protected int numChildren() { return 2; } /** * @apilevel internal * @ast method * */ public boolean mayHaveRewrite() { return false; } /** * Replaces the Parameter child. * @param node The new node to replace the Parameter child. * @apilevel high-level * @ast method * */ public void setParameter(CatchParameterDeclaration node) { setChild(node, 0); } /** * Retrieves the Parameter child. * @return The current node used as the Parameter child. * @apilevel high-level * @ast method * */ public CatchParameterDeclaration getParameter() { return (CatchParameterDeclaration)getChild(0); } /** * Retrieves the Parameter child. * <p><em>This method does not invoke AST transformations.</em></p> * @return The current node used as the Parameter child. * @apilevel low-level * @ast method * */ public CatchParameterDeclaration getParameterNoTransform() { return (CatchParameterDeclaration)getChildNoTransform(0); } /** * Replaces the Block child. * @param node The new node to replace the Block child. * @apilevel high-level * @ast method * */ public void setBlock(Block node) { setChild(node, 1); } /** * Retrieves the Block child. * @return The current node used as the Block child. * @apilevel high-level * @ast method * */ public Block getBlock() { return (Block)getChild(1); } /** * Retrieves the Block child. * <p><em>This method does not invoke AST transformations.</em></p> * @return The current node used as the Block child. * @apilevel low-level * @ast method * */ public Block getBlockNoTransform() { return (Block)getChildNoTransform(1); } protected java.util.Map parameterDeclaration_String_values; /** * Variable lookup in catch parameter scope. * @attribute syn * @aspect MultiCatch * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/MultiCatch.jrag:86 */ @SuppressWarnings({"unchecked", "cast"}) public SimpleSet parameterDeclaration(String name) { Object _parameters = name; if(parameterDeclaration_String_values == null) parameterDeclaration_String_values = new java.util.HashMap(4); if(parameterDeclaration_String_values.containsKey(_parameters)) { return (SimpleSet)parameterDeclaration_String_values.get(_parameters); } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); SimpleSet parameterDeclaration_String_value = parameterDeclaration_compute(name); if(isFinal && num == state().boundariesCrossed) parameterDeclaration_String_values.put(_parameters, parameterDeclaration_String_value); return parameterDeclaration_String_value; } /** * @apilevel internal */ private SimpleSet parameterDeclaration_compute(String name) { return getParameter().name().equals(name) ? getParameter() : SimpleSet.emptySet; } /** * @attribute syn * @aspect ExceptionHandling * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/ExceptionHandling.jrag:212 */ public boolean handles(TypeDecl exceptionType) { ASTNode$State state = state(); try { CatchParameterDeclaration param = getParameter(); for (int i = 0; i < param.getNumTypeAccess(); ++i) { TypeDecl type = param.getTypeAccess(i).type(); if (!type.isUnknown() && exceptionType.instanceOf(type)) return true; } return false; } finally { } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/MultiCatch.jrag:27 * @apilevel internal */ public boolean Define_boolean_isMethodParameter(ASTNode caller, ASTNode child) { if(caller == getParameterNoTransform()) { return false; } else { return getParent().Define_boolean_isMethodParameter(this, caller); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/MultiCatch.jrag:28 * @apilevel internal */ public boolean Define_boolean_isConstructorParameter(ASTNode caller, ASTNode child) { if(caller == getParameterNoTransform()) { return false; } else { return getParent().Define_boolean_isConstructorParameter(this, caller); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/MultiCatch.jrag:29 * @apilevel internal */ public boolean Define_boolean_isExceptionHandlerParameter(ASTNode caller, ASTNode child) { if(caller == getParameterNoTransform()) { return true; } else { return getParent().Define_boolean_isExceptionHandlerParameter(this, caller); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/MultiCatch.jrag:80 * @apilevel internal */ public SimpleSet Define_SimpleSet_lookupVariable(ASTNode caller, ASTNode child, String name) { if(caller == getParameterNoTransform()) { return parameterDeclaration(name); } else { return super.Define_SimpleSet_lookupVariable(caller, child, name); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/MultiCatch.jrag:128 * @apilevel internal */ public boolean Define_boolean_reachable(ASTNode caller, ASTNode child) { if(caller == getBlockNoTransform()){ boolean anyReachable = false; CatchParameterDeclaration param = getParameter(); for (int i = 0; i < param.getNumTypeAccess(); ++i) { TypeDecl type = param.getTypeAccess(i).type(); if (!reachableCatchClause(type)) error("The exception type "+type.fullName()+ " can not be caught "+ "by this multi-catch clause"); else anyReachable = true; } return anyReachable; } else { return getParent().Define_boolean_reachable(this, caller); } } /** * @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); } }
9,826
28.510511
172
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/MultiplicativeExpr.java
/* This file was generated with JastAdd2 (http://jastadd.org) version R20130212 (r1031) */ package soot.JastAddJ; import java.util.HashSet; 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; /** * @production MultiplicativeExpr : {@link ArithmeticExpr}; * @ast node * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/java.ast:153 */ public abstract class MultiplicativeExpr extends ArithmeticExpr implements Cloneable { /** * @apilevel low-level */ public void flushCache() { super.flushCache(); type_computed = false; type_value = null; } /** * @apilevel internal */ public void flushCollectionCache() { super.flushCollectionCache(); } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public MultiplicativeExpr clone() throws CloneNotSupportedException { MultiplicativeExpr node = (MultiplicativeExpr)super.clone(); node.type_computed = false; node.type_value = null; node.in$Circle(false); node.is$Final(false); return node; } /** * @ast method * @aspect TypeCheck * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeCheck.jrag:156 */ public void typeCheck() { if(!getLeftOperand().type().isNumericType()) error(getLeftOperand().type().typeName() + " is not numeric"); if(!getRightOperand().type().isNumericType()) error(getRightOperand().type().typeName() + " is not numeric"); } /** * @ast method * */ public MultiplicativeExpr() { super(); } /** * Initializes the child array to the correct size. * Initializes List and Opt nta children. * @apilevel internal * @ast method * @ast method * */ public void init$Children() { children = new ASTNode[2]; } /** * @ast method * */ public MultiplicativeExpr(Expr p0, Expr p1) { setChild(p0, 0); setChild(p1, 1); } /** * @apilevel low-level * @ast method * */ protected int numChildren() { return 2; } /** * @apilevel internal * @ast method * */ public boolean mayHaveRewrite() { return false; } /** * Replaces the LeftOperand child. * @param node The new node to replace the LeftOperand child. * @apilevel high-level * @ast method * */ public void setLeftOperand(Expr node) { setChild(node, 0); } /** * Retrieves the LeftOperand child. * @return The current node used as the LeftOperand child. * @apilevel high-level * @ast method * */ public Expr getLeftOperand() { return (Expr)getChild(0); } /** * Retrieves the LeftOperand child. * <p><em>This method does not invoke AST transformations.</em></p> * @return The current node used as the LeftOperand child. * @apilevel low-level * @ast method * */ public Expr getLeftOperandNoTransform() { return (Expr)getChildNoTransform(0); } /** * Replaces the RightOperand child. * @param node The new node to replace the RightOperand child. * @apilevel high-level * @ast method * */ public void setRightOperand(Expr node) { setChild(node, 1); } /** * Retrieves the RightOperand child. * @return The current node used as the RightOperand child. * @apilevel high-level * @ast method * */ public Expr getRightOperand() { return (Expr)getChild(1); } /** * Retrieves the RightOperand child. * <p><em>This method does not invoke AST transformations.</em></p> * @return The current node used as the RightOperand child. * @apilevel low-level * @ast method * */ public Expr getRightOperandNoTransform() { return (Expr)getChildNoTransform(1); } /** * @apilevel internal */ protected boolean type_computed = false; /** * @apilevel internal */ protected TypeDecl type_value; /** * @attribute syn * @aspect TypeAnalysis * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeAnalysis.jrag:323 */ @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; } /** * @apilevel internal */ private TypeDecl type_compute() { return getLeftOperand().type().binaryNumericPromotion(getRightOperand().type()); } /** * @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); } }
5,061
23.572816
120
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/NEExpr.java
/* This file was generated with JastAdd2 (http://jastadd.org) version R20130212 (r1031) */ package soot.JastAddJ; import java.util.HashSet; 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; /** * @production NEExpr : {@link EqualityExpr}; * @ast node * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/java.ast:183 */ public class NEExpr extends EqualityExpr implements Cloneable { /** * @apilevel low-level */ public void flushCache() { super.flushCache(); } /** * @apilevel internal */ public void flushCollectionCache() { super.flushCollectionCache(); } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public NEExpr clone() throws CloneNotSupportedException { NEExpr node = (NEExpr)super.clone(); node.in$Circle(false); node.is$Final(false); return node; } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public NEExpr copy() { try { NEExpr node = (NEExpr) clone(); node.parent = null; if(children != null) node.children = (ASTNode[]) children.clone(); return node; } catch (CloneNotSupportedException e) { throw new Error("Error: clone not supported for " + getClass().getName()); } } /** * Create a deep copy of the AST subtree at this node. * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level */ @SuppressWarnings({"unchecked", "cast"}) public NEExpr fullCopy() { NEExpr tree = (NEExpr) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) children[i]; if(child != null) { child = child.fullCopy(); tree.setChild(child, i); } } } return tree; } /** * @ast method * @aspect BooleanExpressions * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/BooleanExpressions.jrag:297 */ public soot.Value comparison(Body b, soot.Value left, soot.Value right) { return b.newNeExpr(asImmediate(b, left), asImmediate(b, right), this); } /** * @ast method * @aspect BooleanExpressions * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/BooleanExpressions.jrag:319 */ public soot.Value comparisonInv(Body b, soot.Value left, soot.Value right) { return b.newEqExpr(asImmediate(b, left), asImmediate(b, right), this); } /** * @ast method * */ public NEExpr() { super(); } /** * Initializes the child array to the correct size. * Initializes List and Opt nta children. * @apilevel internal * @ast method * @ast method * */ public void init$Children() { children = new ASTNode[2]; } /** * @ast method * */ public NEExpr(Expr p0, Expr p1) { setChild(p0, 0); setChild(p1, 1); } /** * @apilevel low-level * @ast method * */ protected int numChildren() { return 2; } /** * @apilevel internal * @ast method * */ public boolean mayHaveRewrite() { return false; } /** * Replaces the LeftOperand child. * @param node The new node to replace the LeftOperand child. * @apilevel high-level * @ast method * */ public void setLeftOperand(Expr node) { setChild(node, 0); } /** * Retrieves the LeftOperand child. * @return The current node used as the LeftOperand child. * @apilevel high-level * @ast method * */ public Expr getLeftOperand() { return (Expr)getChild(0); } /** * Retrieves the LeftOperand child. * <p><em>This method does not invoke AST transformations.</em></p> * @return The current node used as the LeftOperand child. * @apilevel low-level * @ast method * */ public Expr getLeftOperandNoTransform() { return (Expr)getChildNoTransform(0); } /** * Replaces the RightOperand child. * @param node The new node to replace the RightOperand child. * @apilevel high-level * @ast method * */ public void setRightOperand(Expr node) { setChild(node, 1); } /** * Retrieves the RightOperand child. * @return The current node used as the RightOperand child. * @apilevel high-level * @ast method * */ public Expr getRightOperand() { return (Expr)getChild(1); } /** * Retrieves the RightOperand child. * <p><em>This method does not invoke AST transformations.</em></p> * @return The current node used as the RightOperand child. * @apilevel low-level * @ast method * */ public Expr getRightOperandNoTransform() { return (Expr)getChildNoTransform(1); } /** * @attribute syn * @aspect ConstantExpression * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/ConstantExpression.jrag:91 */ public Constant constant() { ASTNode$State state = state(); try { return Constant.create(!binaryNumericPromotedType().eqIsTrue(left(), right())); } finally { } } /** * @attribute syn * @aspect PrettyPrint * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/PrettyPrint.jadd:400 */ public String printOp() { ASTNode$State state = state(); try { return " != "; } finally { } } /** * @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); } }
5,897
23.991525
120
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/NameType.java
package soot.JastAddJ; import java.util.HashSet; 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; /** * @ast class * */ public class NameType extends java.lang.Object { private NameType() { super(); } public static final NameType NO_NAME = new NameType(); public static final NameType PACKAGE_NAME = new NameType() { public Access reclassify(String name, int start, int end) { return new PackageAccess(name, start, end); } }; public static final NameType TYPE_NAME = new NameType() { public Access reclassify(String name, int start, int end) { return new TypeAccess(name, start, end); } }; public static final NameType PACKAGE_OR_TYPE_NAME = new NameType() { public Access reclassify(String name, int start, int end) { return new PackageOrTypeAccess(name, start, end); } }; public static final NameType AMBIGUOUS_NAME = new NameType() { public Access reclassify(String name, int start, int end) { return new AmbiguousAccess(name, start, end); } }; public static final NameType METHOD_NAME = new NameType(); public static final NameType ARRAY_TYPE_NAME = new NameType(); public static final NameType ARRAY_READ_NAME = new NameType(); public static final NameType EXPRESSION_NAME = new NameType() { public Access reclassify(String name, int start, int end) { return new VarAccess(name, start, end); } }; public Access reclassify(String name, int start, int end) { throw new Error("Can not reclassify ParseName node " + name); } }
1,945
24.605263
117
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/NullLiteral.java
/* This file was generated with JastAdd2 (http://jastadd.org) version R20130212 (r1031) */ package soot.JastAddJ; import java.util.HashSet; 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; /** * Java null literal. * @production NullLiteral : {@link Literal}; * @ast node * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/Literals.ast:42 */ public class NullLiteral extends Literal implements Cloneable { /** * @apilevel low-level */ public void flushCache() { super.flushCache(); type_computed = false; type_value = null; } /** * @apilevel internal */ public void flushCollectionCache() { super.flushCollectionCache(); } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public NullLiteral clone() throws CloneNotSupportedException { NullLiteral node = (NullLiteral)super.clone(); node.type_computed = false; node.type_value = null; node.in$Circle(false); node.is$Final(false); return node; } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public NullLiteral copy() { try { NullLiteral node = (NullLiteral) clone(); node.parent = null; if(children != null) node.children = (ASTNode[]) children.clone(); return node; } catch (CloneNotSupportedException e) { throw new Error("Error: clone not supported for " + getClass().getName()); } } /** * Create a deep copy of the AST subtree at this node. * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level */ @SuppressWarnings({"unchecked", "cast"}) public NullLiteral fullCopy() { NullLiteral tree = (NullLiteral) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) children[i]; if(child != null) { child = child.fullCopy(); tree.setChild(child, i); } } } return tree; } /** * @ast method * @aspect Expressions * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/Expressions.jrag:35 */ public soot.Value eval(Body b) { return soot.jimple.NullConstant.v(); } /** * @ast method * */ public NullLiteral() { super(); } /** * Initializes the child array to the correct size. * Initializes List and Opt nta children. * @apilevel internal * @ast method * @ast method * */ public void init$Children() { } /** * @ast method * */ public NullLiteral(String p0) { setLITERAL(p0); } /** * @ast method * */ public NullLiteral(beaver.Symbol p0) { setLITERAL(p0); } /** * @apilevel low-level * @ast method * */ protected int numChildren() { return 0; } /** * @apilevel internal * @ast method * */ public boolean mayHaveRewrite() { return false; } /** * Replaces the lexeme LITERAL. * @param value The new value for the lexeme LITERAL. * @apilevel high-level * @ast method * */ public void setLITERAL(String value) { tokenString_LITERAL = value; } /** * JastAdd-internal setter for lexeme LITERAL using the Beaver parser. * @apilevel internal * @ast method * */ 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(); } /** * Retrieves the value for the lexeme LITERAL. * @return The value for the lexeme LITERAL. * @apilevel high-level * @ast method * */ public String getLITERAL() { return tokenString_LITERAL != null ? tokenString_LITERAL : ""; } /** * @attribute syn * @aspect ConstantExpression * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/ConstantExpression.jrag:336 */ public boolean isConstant() { ASTNode$State state = state(); try { return false; } finally { } } /** * @apilevel internal */ protected boolean type_computed = false; /** * @apilevel internal */ protected TypeDecl type_value; /** * @attribute syn * @aspect TypeAnalysis * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeAnalysis.jrag:307 */ @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; } /** * @apilevel internal */ private TypeDecl type_compute() { return typeNull(); } /** * @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); } }
5,519
23.317181
112
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/NullType.java
/* This file was generated with JastAdd2 (http://jastadd.org) version R20130212 (r1031) */ package soot.JastAddJ; import java.util.HashSet; 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; /** * @production NullType : {@link TypeDecl}; * @ast node * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/java.ast:47 */ public class NullType extends TypeDecl implements Cloneable { /** * @apilevel low-level */ public void flushCache() { super.flushCache(); instanceOf_TypeDecl_values = null; subtype_TypeDecl_values = null; } /** * @apilevel internal */ public void flushCollectionCache() { super.flushCollectionCache(); } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public NullType clone() throws CloneNotSupportedException { NullType node = (NullType)super.clone(); node.instanceOf_TypeDecl_values = null; node.subtype_TypeDecl_values = null; node.in$Circle(false); node.is$Final(false); return node; } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public NullType copy() { try { NullType node = (NullType) clone(); node.parent = null; if(children != null) node.children = (ASTNode[]) children.clone(); return node; } catch (CloneNotSupportedException e) { throw new Error("Error: clone not supported for " + getClass().getName()); } } /** * Create a deep copy of the AST subtree at this node. * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level */ @SuppressWarnings({"unchecked", "cast"}) public NullType fullCopy() { NullType tree = (NullType) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) children[i]; if(child != null) { child = child.fullCopy(); tree.setChild(child, i); } } } return tree; } /** * @ast method * @aspect PrettyPrint * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/PrettyPrint.jadd:856 */ public void toString(StringBuffer s) { s.append("null"); } /** * @ast method * @aspect EmitJimple * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/EmitJimple.jrag:451 */ public soot.Value emitCastTo(Body b, soot.Value v, TypeDecl type, ASTNode location) { return v; } /** * @ast method * */ public NullType() { super(); } /** * Initializes the child array to the correct size. * Initializes List and Opt nta children. * @apilevel internal * @ast method * @ast method * */ public void init$Children() { children = new ASTNode[2]; setChild(new List(), 1); } /** * @ast method * */ public NullType(Modifiers p0, String p1, List<BodyDecl> p2) { setChild(p0, 0); setID(p1); setChild(p2, 1); } /** * @ast method * */ public NullType(Modifiers p0, beaver.Symbol p1, List<BodyDecl> p2) { setChild(p0, 0); setID(p1); setChild(p2, 1); } /** * @apilevel low-level * @ast method * */ protected int numChildren() { return 2; } /** * @apilevel internal * @ast method * */ public boolean mayHaveRewrite() { return false; } /** * Replaces the Modifiers child. * @param node The new node to replace the Modifiers child. * @apilevel high-level * @ast method * */ public void setModifiers(Modifiers node) { setChild(node, 0); } /** * Retrieves the Modifiers child. * @return The current node used as the Modifiers child. * @apilevel high-level * @ast method * */ public Modifiers getModifiers() { return (Modifiers)getChild(0); } /** * Retrieves the Modifiers child. * <p><em>This method does not invoke AST transformations.</em></p> * @return The current node used as the Modifiers child. * @apilevel low-level * @ast method * */ public Modifiers getModifiersNoTransform() { return (Modifiers)getChildNoTransform(0); } /** * Replaces the lexeme ID. * @param value The new value for the lexeme ID. * @apilevel high-level * @ast method * */ public void setID(String value) { tokenString_ID = value; } /** * JastAdd-internal setter for lexeme ID using the Beaver parser. * @apilevel internal * @ast method * */ 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(); } /** * Retrieves the value for the lexeme ID. * @return The value for the lexeme ID. * @apilevel high-level * @ast method * */ public String getID() { return tokenString_ID != null ? tokenString_ID : ""; } /** * Replaces the BodyDecl list. * @param list The new list node to be used as the BodyDecl list. * @apilevel high-level * @ast method * */ public void setBodyDeclList(List<BodyDecl> list) { setChild(list, 1); } /** * Retrieves the number of children in the BodyDecl list. * @return Number of children in the BodyDecl list. * @apilevel high-level * @ast method * */ public int getNumBodyDecl() { return getBodyDeclList().getNumChild(); } /** * Retrieves the number of children in the BodyDecl list. * Calling this method will not trigger rewrites.. * @return Number of children in the BodyDecl list. * @apilevel low-level * @ast method * */ public int getNumBodyDeclNoTransform() { return getBodyDeclListNoTransform().getNumChildNoTransform(); } /** * Retrieves the element at index {@code i} in the BodyDecl list.. * @param i Index of the element to return. * @return The element at position {@code i} in the BodyDecl list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public BodyDecl getBodyDecl(int i) { return (BodyDecl)getBodyDeclList().getChild(i); } /** * Append an element to the BodyDecl list. * @param node The element to append to the BodyDecl list. * @apilevel high-level * @ast method * */ public void addBodyDecl(BodyDecl node) { List<BodyDecl> list = (parent == null || state == null) ? getBodyDeclListNoTransform() : getBodyDeclList(); list.addChild(node); } /** * @apilevel low-level * @ast method * */ public void addBodyDeclNoTransform(BodyDecl node) { List<BodyDecl> list = getBodyDeclListNoTransform(); list.addChild(node); } /** * Replaces the BodyDecl list element at index {@code i} with the new node {@code node}. * @param node The new node to replace the old list element. * @param i The list index of the node to be replaced. * @apilevel high-level * @ast method * */ public void setBodyDecl(BodyDecl node, int i) { List<BodyDecl> list = getBodyDeclList(); list.setChild(node, i); } /** * Retrieves the BodyDecl list. * @return The node representing the BodyDecl list. * @apilevel high-level * @ast method * */ public List<BodyDecl> getBodyDecls() { return getBodyDeclList(); } /** * Retrieves the BodyDecl list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the BodyDecl list. * @apilevel low-level * @ast method * */ public List<BodyDecl> getBodyDeclsNoTransform() { return getBodyDeclListNoTransform(); } /** * Retrieves the BodyDecl list. * @return The node representing the BodyDecl list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<BodyDecl> getBodyDeclList() { List<BodyDecl> list = (List<BodyDecl>)getChild(1); list.getNumChild(); return list; } /** * Retrieves the BodyDecl list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the BodyDecl list. * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<BodyDecl> getBodyDeclListNoTransform() { return (List<BodyDecl>)getChildNoTransform(1); } /** * @attribute syn * @aspect TypeAnalysis * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeAnalysis.jrag:205 */ public boolean isNull() { ASTNode$State state = state(); try { return true; } finally { } } protected java.util.Map instanceOf_TypeDecl_values; /** * @attribute syn * @aspect GenericsSubtype * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericsSubtype.jrag:391 */ @SuppressWarnings({"unchecked", "cast"}) public boolean instanceOf(TypeDecl type) { Object _parameters = type; if(instanceOf_TypeDecl_values == null) instanceOf_TypeDecl_values = new java.util.HashMap(4); if(instanceOf_TypeDecl_values.containsKey(_parameters)) { return ((Boolean)instanceOf_TypeDecl_values.get(_parameters)).booleanValue(); } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); boolean instanceOf_TypeDecl_value = instanceOf_compute(type); if(isFinal && num == state().boundariesCrossed) instanceOf_TypeDecl_values.put(_parameters, Boolean.valueOf(instanceOf_TypeDecl_value)); return instanceOf_TypeDecl_value; } /** * @apilevel internal */ private boolean instanceOf_compute(TypeDecl type) { return subtype(type); } /** * @attribute syn * @aspect TypeWideningAndIdentity * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeAnalysis.jrag:482 */ public boolean isSupertypeOfNullType(NullType type) { ASTNode$State state = state(); try { return true; } finally { } } protected java.util.Map subtype_TypeDecl_values; /** * @attribute syn * @aspect GenericsSubtype * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericsSubtype.jrag:411 */ @SuppressWarnings({"unchecked", "cast"}) public boolean subtype(TypeDecl type) { Object _parameters = type; if(subtype_TypeDecl_values == null) subtype_TypeDecl_values = new java.util.HashMap(4); ASTNode$State.CircularValue _value; if(subtype_TypeDecl_values.containsKey(_parameters)) { Object _o = subtype_TypeDecl_values.get(_parameters); if(!(_o instanceof ASTNode$State.CircularValue)) { return ((Boolean)_o).booleanValue(); } else _value = (ASTNode$State.CircularValue)_o; } else { _value = new ASTNode$State.CircularValue(); subtype_TypeDecl_values.put(_parameters, _value); _value.value = Boolean.valueOf(true); } ASTNode$State state = state(); if (!state.IN_CIRCLE) { state.IN_CIRCLE = true; int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); boolean new_subtype_TypeDecl_value; do { _value.visited = new Integer(state.CIRCLE_INDEX); state.CHANGE = false; new_subtype_TypeDecl_value = subtype_compute(type); if (new_subtype_TypeDecl_value!=((Boolean)_value.value).booleanValue()) { state.CHANGE = true; _value.value = Boolean.valueOf(new_subtype_TypeDecl_value); } state.CIRCLE_INDEX++; } while (state.CHANGE); if(isFinal && num == state().boundariesCrossed) { subtype_TypeDecl_values.put(_parameters, new_subtype_TypeDecl_value); } else { subtype_TypeDecl_values.remove(_parameters); state.RESET_CYCLE = true; subtype_compute(type); state.RESET_CYCLE = false; } state.IN_CIRCLE = false; return new_subtype_TypeDecl_value; } if(!new Integer(state.CIRCLE_INDEX).equals(_value.visited)) { _value.visited = new Integer(state.CIRCLE_INDEX); boolean new_subtype_TypeDecl_value = subtype_compute(type); if (state.RESET_CYCLE) { subtype_TypeDecl_values.remove(_parameters); } else if (new_subtype_TypeDecl_value!=((Boolean)_value.value).booleanValue()) { state.CHANGE = true; _value.value = new_subtype_TypeDecl_value; } return new_subtype_TypeDecl_value; } return ((Boolean)_value.value).booleanValue(); } /** * @apilevel internal */ private boolean subtype_compute(TypeDecl type) { return type.supertypeNullType(this); } /** * @attribute syn * @aspect GenericsSubtype * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericsSubtype.jrag:479 */ public boolean supertypeNullType(NullType type) { ASTNode$State state = state(); try { return true; } finally { } } /** * @attribute syn * @aspect InnerClasses * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Backend/InnerClasses.jrag:82 */ public TypeDecl stringPromotion() { ASTNode$State state = state(); try { return typeObject(); } finally { } } /** * @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); } }
13,931
27.374745
142
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/NumericLiteral.java
/* This file was generated with JastAdd2 (http://jastadd.org) version R20130212 (r1031) */ package soot.JastAddJ; import java.util.HashSet; 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; /** * A NumericLiteral is a raw literal, produced by the parser. * NumericLiterals are rewritten to the best matching concrete * numeric literal kind, or IllegalLiteral. * @production NumericLiteral : {@link Literal}; * @ast node * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/Literals.ast:18 */ public class NumericLiteral extends Literal implements Cloneable { /** * @apilevel low-level */ public void flushCache() { super.flushCache(); type_computed = false; type_value = null; } /** * @apilevel internal */ public void flushCollectionCache() { super.flushCollectionCache(); } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public NumericLiteral clone() throws CloneNotSupportedException { NumericLiteral node = (NumericLiteral)super.clone(); node.type_computed = false; node.type_value = null; node.in$Circle(false); node.is$Final(false); return node; } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public NumericLiteral copy() { try { NumericLiteral node = (NumericLiteral) clone(); node.parent = null; if(children != null) node.children = (ASTNode[]) children.clone(); return node; } catch (CloneNotSupportedException e) { throw new Error("Error: clone not supported for " + getClass().getName()); } } /** * Create a deep copy of the AST subtree at this node. * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level */ @SuppressWarnings({"unchecked", "cast"}) public NumericLiteral fullCopy() { NumericLiteral tree = (NumericLiteral) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) children[i]; if(child != null) { child = child.fullCopy(); tree.setChild(child, i); } } } return tree; } /** * @ast method * @aspect Literals * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/Literals.jrag:321 */ public static final int DECIMAL = 0; /** * @ast method * @aspect Literals * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/Literals.jrag:322 */ public static final int HEXADECIMAL = 1; /** * @ast method * @aspect Literals * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/Literals.jrag:323 */ public static final int OCTAL = 2; /** * @ast method * @aspect Literals * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/Literals.jrag:324 */ public static final int BINARY = 3; /** * The trimmed digits. * @ast method * @aspect Literals * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/Literals.jrag:382 */ /** * The trimmed digits. */ protected String digits = ""; /** * Sets the trimmed digits of this literal. * @ast method * @aspect Literals * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/Literals.jrag:387 */ public void setDigits(String digits) { this.digits = digits; } /** * The literal kind tells which kind of literal it is; * it's either a DECIMAL, HEXADECIMAL, OCTAL or BINARY literal. * @ast method * @aspect Literals * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/Literals.jrag:401 */ /** * The literal kind tells which kind of literal it is; * it's either a DECIMAL, HEXADECIMAL, OCTAL or BINARY literal. */ protected int kind = NumericLiteral.DECIMAL; /** * Sets the literal kind. * @ast method * @aspect Literals * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/Literals.jrag:406 */ public void setKind(int kind) { this.kind = kind; } /** * @ast method * @aspect Literals * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/Literals.jrag:489 */ private StringBuffer buf = new StringBuffer(); /** * @ast method * @aspect Literals * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/Literals.jrag:490 */ private int idx = 0; /** * @ast method * @aspect Literals * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/Literals.jrag:491 */ private boolean whole; /** * @ast method * @aspect Literals * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/Literals.jrag:492 */ // have whole part? private boolean fraction; /** * @ast method * @aspect Literals * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/Literals.jrag:493 */ // have fraction part? private boolean exponent; /** * @ast method * @aspect Literals * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/Literals.jrag:494 */ // have exponent part? private boolean floating; /** * @ast method * @aspect Literals * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/Literals.jrag:495 */ // is floating point? private boolean isFloat; /** * @ast method * @aspect Literals * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/Literals.jrag:496 */ private boolean isLong; /** * @return a readable name to describe this literal. * @ast method * @aspect Literals * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/Literals.jrag:501 */ /** * @return a readable name to describe this literal. */ private String name() { String name; switch (kind) { case DECIMAL: name = "decimal"; break; case HEXADECIMAL: name = "hexadecimal"; break; case OCTAL: name = "octal"; break; case BINARY: default: name = "binary"; break; } if (floating) return name+" floating point"; else return name; } /** * The next character in the literal is a significant character; * push it onto the buffer. * @ast method * @aspect Literals * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/Literals.jrag:528 */ /** * The next character in the literal is a significant character; * push it onto the buffer. */ private void pushChar() { buf.append(getLITERAL().charAt(idx++)); } /** * Skip ahead n chracters in the literal. * @ast method * @aspect Literals * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/Literals.jrag:535 */ /** * Skip ahead n chracters in the literal. */ private void skip(int n) { idx += n; } /** * @return true if there exists at least n more characters * in the literal * @ast method * @aspect Literals * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/Literals.jrag:543 */ /** * @return true if there exists at least n more characters * in the literal */ private boolean have(int n) { return getLITERAL().length() >= idx+n; } /** * Look at the n'th next character. * @ast method * @aspect Literals * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/Literals.jrag:550 */ /** * Look at the n'th next character. */ private char peek(int n) { return getLITERAL().charAt(idx+n); } /** * @return true if the character c is a decimal digit * @ast method * @aspect Literals * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/Literals.jrag:557 */ /** * @return true if the character c is a decimal digit */ private static final boolean isDecimalDigit(char c) { return c == '_' || c >= '0' && c <= '9'; } /** * @return true if the character c is a hexadecimal digit * @ast method * @aspect Literals * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/Literals.jrag:564 */ /** * @return true if the character c is a hexadecimal digit */ private static final boolean isHexadecimalDigit(char c) { return c == '_' || c >= '0' && c <= '9' || c >= 'a' && c <= 'f' || c >= 'A' && c <= 'F'; } /** * @return true if the character c is a binary digit * @ast method * @aspect Literals * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/Literals.jrag:573 */ /** * @return true if the character c is a binary digit */ private static final boolean isBinaryDigit(char c) { return c == '_' || c == '0' || c == '1'; } /** * @return true if the character c is an underscore * @ast method * @aspect Literals * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/Literals.jrag:580 */ /** * @return true if the character c is an underscore */ private static final boolean isUnderscore(char c) { return c == '_'; } /** * Parse a literal. If there is a syntax error in the literal, * an IllegalLiteral will be returned. * @ast method * @aspect Literals * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/Literals.jrag:588 */ /** * Parse a literal. If there is a syntax error in the literal, * an IllegalLiteral will be returned. */ public Literal parse() { if (getLITERAL().length() == 0) throw new IllegalStateException("Empty NumericLiteral"); kind = classifyLiteral(); Literal literal; if (!floating) literal = parseDigits(); else literal = parseFractionPart(); literal.setStart(LITERALstart); literal.setEnd(LITERALend); return literal; } /** * Classify the literal. * * @return either DECIMAL, HEXADECIMAL or BINARY * @ast method * @aspect Literals * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/Literals.jrag:609 */ /** * Classify the literal. * * @return either DECIMAL, HEXADECIMAL or BINARY */ private int classifyLiteral() { if (peek(0) == '.') { floating = true; return DECIMAL; } else if (peek(0) == '0') { if (!have(2)) { // the only 1-length string that starts with 0 (obvious!) return DECIMAL; } else if (peek(1) == 'x' || peek(1) == 'X') { skip(2); return HEXADECIMAL; } else if (peek(1) == 'b' || peek(1) == 'B') { skip(2); return BINARY; } else { return DECIMAL; } } else { return DECIMAL; } } /** * If the current character is an underscore, the previous and next * characters need to be valid digits or underscores. * * @return true if the underscore is misplaced * @ast method * @aspect Literals * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/Literals.jrag:637 */ /** * If the current character is an underscore, the previous and next * characters need to be valid digits or underscores. * * @return true if the underscore is misplaced */ private boolean misplacedUnderscore() { // first and last characters are never allowed to be an underscore if (idx == 0 || idx+1 == getLITERAL().length()) return true; switch (kind) { case DECIMAL: return !(isDecimalDigit(peek(-1)) && isDecimalDigit(peek(1))); case HEXADECIMAL: return !(isHexadecimalDigit(peek(-1)) && isHexadecimalDigit(peek(1))); case BINARY: return !(isBinaryDigit(peek(-1)) && isBinaryDigit(peek(1))); } throw new IllegalStateException("Unexpected literal kind"); } /** * Report an illegal digit. * @ast method * @aspect Literals * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/Literals.jrag:656 */ /** * Report an illegal digit. */ private Literal syntaxError(String msg) { String err = "in "+name()+" literal "+ "\""+getLITERAL()+"\""+": "+msg; return new IllegalLiteral(err); } /** * @ast method * @aspect Literals * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/Literals.jrag:662 */ private Literal unexpectedCharacter(char c) { return syntaxError("unexpected character '"+c+"'; not a valid digit"); } /** * Returns a string of only the lower case digits of the * parsed numeric literal. * @ast method * @aspect Literals * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/Literals.jrag:670 */ /** * Returns a string of only the lower case digits of the * parsed numeric literal. */ private String getLiteralString() { return buf.toString().toLowerCase(); } /** * Parse and build an IntegerLiteral, LongLiteral, * FloatingPointLiteral or DoubleLiteral. Returns an * IllegalLiteral if the numeric literal can not be * parsed. * * Note: does not perform bounds checks. * * @return a concrete literal on success, or an IllegalLiteral if there is a syntax error * @ast method * @aspect Literals * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/Literals.jrag:684 */ /** * Parse and build an IntegerLiteral, LongLiteral, * FloatingPointLiteral or DoubleLiteral. Returns an * IllegalLiteral if the numeric literal can not be * parsed. * * Note: does not perform bounds checks. * * @return a concrete literal on success, or an IllegalLiteral if there is a syntax error */ private Literal buildLiteral() { NumericLiteral literal; setDigits(buf.toString().toLowerCase()); if (!floating) { if (!whole) return syntaxError("at least one digit is required"); // check if the literal is octal, and if so report illegal digits if (kind == DECIMAL) { if (digits.charAt(0) == '0') { kind = OCTAL; for (int idx = 1; idx < digits.length(); ++idx) { char c = digits.charAt(idx); if (c < '0' || c > '7') return unexpectedCharacter(c); } } } if (isLong) literal = new LongLiteral(getLITERAL()); else literal = new IntegerLiteral(getLITERAL()); } else { if (kind == HEXADECIMAL && !exponent) return syntaxError("exponent is required"); if (!(whole || fraction)) return syntaxError("at least one digit is required in "+ "either the whole or fraction part"); if (kind == HEXADECIMAL) digits = "0x"+digits;// digits parsed with Float or Double if (isFloat) literal = new FloatingPointLiteral(getLITERAL()); else literal = new DoubleLiteral(getLITERAL()); } literal.setDigits(getDigits()); literal.setKind(getKind()); return literal; } /** * @ast method * @aspect Literals * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/Literals.jrag:730 */ private Literal parseDigits() { // while we have at least one more character/digit while (have(1)) { char c = peek(0); switch (c) { case '_': if (misplacedUnderscore()) return syntaxError("misplaced underscore - underscores may only "+ "be used within sequences of digits"); skip(1); continue; case '.': if (kind != DECIMAL && kind != HEXADECIMAL) return unexpectedCharacter(c); return parseFractionPart(); case 'l': case 'L': if (have(2)) return syntaxError("extra digits/characters "+ "after suffix "+c); isLong = true; skip(1); continue; case 'f': case 'F': if (kind == BINARY) return unexpectedCharacter(c); isFloat = true; case 'd': case 'D': if (kind == BINARY) return unexpectedCharacter(c); if (kind != HEXADECIMAL) { if (have(2)) return syntaxError("extra digits/characters "+ "after type suffix "+c); floating = true; skip(1); } else { whole = true; pushChar(); } continue; } switch (kind) { case DECIMAL: if (c == 'e' || c == 'E') { return parseExponentPart(); } else if (c == 'f' || c == 'F') { if (have(2)) return syntaxError("extra digits/characters "+ "after type suffix "+c); floating = true; isFloat = true; skip(1); } else if (c == 'd' || c == 'D') { if (have(2)) return syntaxError("extra digits/characters "+ "after type suffix "+c); floating = true; skip(1); } else { if (!isDecimalDigit(c)) return unexpectedCharacter(c); whole = true; pushChar(); } continue; case HEXADECIMAL: if (c == 'p' || c == 'P') return parseExponentPart(); if (!isHexadecimalDigit(c)) return unexpectedCharacter(c); whole = true; pushChar(); continue; case BINARY: if (!isBinaryDigit(c)) return unexpectedCharacter(c); whole = true; pushChar(); continue; } } return buildLiteral(); } /** * @ast method * @aspect Literals * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/Literals.jrag:821 */ private Literal parseFractionPart() { floating = true; // current char is the decimal period pushChar(); // while we have at least one more character/digit while (have(1)) { char c = peek(0); switch (c) { case '_': if (misplacedUnderscore()) return syntaxError("misplaced underscore - underscores may only "+ "be used as separators within sequences of valid digits"); skip(1); continue; case '.': return syntaxError("multiple decimal periods are not allowed"); } if (kind == DECIMAL) { if (c == 'e' || c == 'E') { return parseExponentPart(); } else if (c == 'f' || c == 'F') { if (have(2)) return syntaxError("extra digits/characters "+ "after type suffix "+c); floating = true; isFloat = true; skip(1); } else if (c == 'd' || c == 'D') { if (have(2)) return syntaxError("extra digits/characters "+ "after type suffix "+c); floating = true; skip(1); } else { if (!isDecimalDigit(c)) return unexpectedCharacter(c); pushChar(); fraction = true; } } else { // kind == HEXADECIMAL if (c == 'p' || c == 'P') return parseExponentPart(); if (!isHexadecimalDigit(c)) return unexpectedCharacter(c); fraction = true; pushChar(); } } return buildLiteral(); } /** * @ast method * @aspect Literals * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/Literals.jrag:878 */ private Literal parseExponentPart() { floating = true; // current char is the exponent specifier char pushChar(); // exponent sign if (have(1) && (peek(0) == '+' || peek(0) == '-')) pushChar(); // while we have at least one more character/digit while (have(1)) { char c = peek(0); switch (c) { case '_': if (misplacedUnderscore()) return syntaxError("misplaced underscore - underscores may only "+ "be used as separators within sequences of valid digits"); skip(1); continue; case '-': case '+': return syntaxError("exponent sign character is only allowed as "+ "the first character of the exponent part of a "+ "floating point literal"); case '.': return syntaxError("multiple decimal periods are not allowed"); case 'p': case 'P': return syntaxError("multiple exponent specifiers are not allowed"); case 'f': case 'F': isFloat = true; case 'd': case 'D': if (have(2)) return syntaxError("extra digits/characters "+ "after type suffix "+c); skip(1); continue; } // exponent is a signed integer if (!isDecimalDigit(c)) return unexpectedCharacter(c); pushChar(); exponent = true; } return buildLiteral(); } /** * @ast method * */ public NumericLiteral() { super(); } /** * Initializes the child array to the correct size. * Initializes List and Opt nta children. * @apilevel internal * @ast method * @ast method * */ public void init$Children() { } /** * @ast method * */ public NumericLiteral(String p0) { setLITERAL(p0); } /** * @ast method * */ public NumericLiteral(beaver.Symbol p0) { setLITERAL(p0); } /** * @apilevel low-level * @ast method * */ protected int numChildren() { return 0; } /** * @apilevel internal * @ast method * */ public boolean mayHaveRewrite() { return true; } /** * Replaces the lexeme LITERAL. * @param value The new value for the lexeme LITERAL. * @apilevel high-level * @ast method * */ public void setLITERAL(String value) { tokenString_LITERAL = value; } /** * JastAdd-internal setter for lexeme LITERAL using the Beaver parser. * @apilevel internal * @ast method * */ 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(); } /** * Retrieves the value for the lexeme LITERAL. * @return The value for the lexeme LITERAL. * @apilevel high-level * @ast method * */ public String getLITERAL() { return tokenString_LITERAL != null ? tokenString_LITERAL : ""; } /** * This is a refactored version of Literal.parseLong which supports * binary literals. This version of parseLong is implemented as an * attribute rather than a static method. Perhaps some slight * performance boost could be gained from keeping it static, but with * the loss of declarative- and ReRAGness. * * There exists only a parseLong, and not a parseInteger. Parsing * of regular integer literals works the same, but with stricter * bounds requirements on the resulting parsed value. * @attribute syn * @aspect Literals * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/Literals.jrag:212 */ public long parseLong() { ASTNode$State state = state(); try { switch (getKind()) { case HEXADECIMAL: return parseLongHexadecimal(); case OCTAL: return parseLongOctal(); case BINARY: return parseLongBinary(); case DECIMAL: default: return parseLongDecimal(); } } finally { } } /** * Parse a hexadecimal long literal. * * @throws NumberFormatException if the literal is too large. * @attribute syn * @aspect Literals * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/Literals.jrag:231 */ public long parseLongHexadecimal() { ASTNode$State state = state(); try { long val = 0; if (digits.length() > 16) { for (int i = 0; i < digits.length()-16; i++) if (digits.charAt(i) != '0') throw new NumberFormatException(""); } for (int i = 0; i < digits.length(); i++) { int c = digits.charAt(i); if (c >= 'a' && c <= 'f') c = c - 'a' + 10; else c = c - '0'; val = val * 16 + c; } return val; } finally { } } /** * Parse an octal long literal. * * @throws NumberFormatException if the literal is too large. * @attribute syn * @aspect Literals * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/Literals.jrag:254 */ public long parseLongOctal() { ASTNode$State state = state(); try { long val = 0; if (digits.length() > 21) { for (int i = 0; i < digits.length() - 21; i++) if (i == digits.length() - 21 - 1) { if(digits.charAt(i) != '0' && digits.charAt(i) != '1') throw new NumberFormatException(""); } else { if(digits.charAt(i) != '0') throw new NumberFormatException(""); } } for (int i = 0; i < digits.length(); i++) { int c = digits.charAt(i) - '0'; val = val * 8 + c; } return val; } finally { } } /** * Parse a binary long literal. * * @throws NumberFormatException if the literal is too large. * @attribute syn * @aspect Literals * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/Literals.jrag:278 */ public long parseLongBinary() { ASTNode$State state = state(); try { long val = 0; if (digits.length() > 64) { for (int i = 0; i < digits.length()-64; i++) if (digits.charAt(i) != '0') throw new NumberFormatException(""); } for (int i = 0; i < digits.length(); ++i) { if (digits.charAt(i) == '1') val |= 1L << (digits.length()-i-1); } return val; } finally { } } /** * Parse an octal long literal. * @throws NumberFormatException if the literal is too large. * @attribute syn * @aspect Literals * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/Literals.jrag:296 */ public long parseLongDecimal() { ASTNode$State state = state(); try { long val = 0; long prev = 0; for (int i = 0; i < digits.length(); i++) { prev = val; int c = digits.charAt(i); if(c >= '0' && c <= '9') c = c - '0'; else throw new NumberFormatException(""); val = val * 10 + c; if (val < prev) { boolean negMinValue = i == (digits.length()-1) && isNegative() && val == Long.MIN_VALUE; if (!negMinValue) throw new NumberFormatException(""); } } if (val == Long.MIN_VALUE) return val; if (val < 0) throw new NumberFormatException(""); return isNegative() ? -val : val; } finally { } } /** * Utility attribute for literal rewriting. * Any of the NumericLiteral subclasses have already * been rewritten and/or parsed, and should not be * rewritten again. * * @return true if this literal is a "raw", not-yet-parsed NumericLiteral * @attribute syn * @aspect Literals * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/Literals.jrag:334 */ public boolean needsRewrite() { ASTNode$State state = state(); try { return true; } finally { } } /** * @attribute syn * @aspect Literals * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/Literals.jrag:371 */ public boolean isNegative() { ASTNode$State state = state(); try { return getLITERAL().charAt(0) == '-'; } finally { } } /** * Get the trimmed digits of this literal, excluding * underscore, prefix and suffix. * @attribute syn * @aspect Literals * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/Literals.jrag:377 */ public String getDigits() { ASTNode$State state = state(); try { return digits; } finally { } } /** * The literal kind tells which kind of literal it is; * it's either a DECIMAL, HEXADECIMAL, OCTAL or BINARY literal. * @attribute syn * @aspect Literals * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/Literals.jrag:395 */ public int getKind() { ASTNode$State state = state(); try { return kind; } finally { } } /** * Get the radix of this literal. * @return 16 (hex), 10 (decimal), 8 (octal) or 2 (binary) * @attribute syn * @aspect Literals * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/Literals.jrag:414 */ public int getRadix() { ASTNode$State state = state(); try { switch (kind) { case HEXADECIMAL: return 16; case OCTAL: return 8; case BINARY: return 2; case DECIMAL: default: return 10; } } finally { } } /** * @return true if the literal is a decimal literal * @attribute syn * @aspect Literals * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/Literals.jrag:431 */ public boolean isDecimal() { ASTNode$State state = state(); try { return kind == DECIMAL; } finally { } } /** * @return true if the literal is a hexadecimal literal * @attribute syn * @aspect Literals * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/Literals.jrag:436 */ public boolean isHex() { ASTNode$State state = state(); try { return kind == HEXADECIMAL; } finally { } } /** * @return true if the literal is an octal literal * @attribute syn * @aspect Literals * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/Literals.jrag:441 */ public boolean isOctal() { ASTNode$State state = state(); try { return kind == OCTAL; } finally { } } /** * @return true if the literal is a binary literal * @attribute syn * @aspect Literals * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/Literals.jrag:446 */ public boolean isBinary() { ASTNode$State state = state(); try { return kind == BINARY; } finally { } } /** * @apilevel internal */ protected boolean type_computed = false; /** * @apilevel internal */ protected TypeDecl type_value; /** * The type of a NumericLiteral is undefined. * The literal must be parsed before it can have a type. * @attribute syn * @aspect Literals * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/Literals.jrag:463 */ @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; } /** * @apilevel internal */ private TypeDecl type_compute() { return unknownType(); } /** * @apilevel internal */ public ASTNode rewriteTo() { // Declared in /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/Literals.jrag at line 365 if(needsRewrite()) { state().duringLiterals++; ASTNode result = rewriteRule0(); state().duringLiterals--; return result; } return super.rewriteTo(); } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/Literals.jrag:365 * @apilevel internal */ private Literal rewriteRule0() { { return parse(); } } }
31,770
25.148971
111
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/NumericType.java
/* This file was generated with JastAdd2 (http://jastadd.org) version R20130212 (r1031) */ package soot.JastAddJ; import java.util.HashSet; 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; /** * @production NumericType : {@link PrimitiveType}; * @ast node * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/java.ast:53 */ public abstract class NumericType extends PrimitiveType implements Cloneable { /** * @apilevel low-level */ public void flushCache() { super.flushCache(); unaryNumericPromotion_computed = false; unaryNumericPromotion_value = null; binaryNumericPromotion_TypeDecl_values = null; } /** * @apilevel internal */ public void flushCollectionCache() { super.flushCollectionCache(); } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public NumericType clone() throws CloneNotSupportedException { NumericType node = (NumericType)super.clone(); node.unaryNumericPromotion_computed = false; node.unaryNumericPromotion_value = null; node.binaryNumericPromotion_TypeDecl_values = null; node.in$Circle(false); node.is$Final(false); return node; } /** * @ast method * @aspect AutoBoxingCodegen * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/Jimple1.5Backend/AutoBoxingCodegen.jrag:20 */ public soot.Value emitCastTo(Body b, soot.Value v, TypeDecl type, ASTNode location) { if(type.isUnknown()) throw new Error("Trying to cast to Unknown"); if(type == this) return v; if((isLong() || this instanceof FloatingPointType) && type.isIntegralType()) { v = b.newCastExpr( asImmediate(b, v), typeInt().getSootType(), location); return typeInt().emitCastTo(b, v, type, location); } else if(type instanceof NumericType) { return b.newCastExpr( asImmediate(b, v), type.getSootType(), location ); } else if(!type.isNumericType()) return emitCastTo(b, v, boxed(), location); else return boxed().emitBoxingOperation(b, emitCastTo(b, v, type.unboxed(), location), location); } /** * @ast method * */ public NumericType() { super(); } /** * Initializes the child array to the correct size. * Initializes List and Opt nta children. * @apilevel internal * @ast method * @ast method * */ public void init$Children() { children = new ASTNode[3]; setChild(new Opt(), 1); setChild(new List(), 2); } /** * @ast method * */ public NumericType(Modifiers p0, String p1, Opt<Access> p2, List<BodyDecl> p3) { setChild(p0, 0); setID(p1); setChild(p2, 1); setChild(p3, 2); } /** * @ast method * */ public NumericType(Modifiers p0, beaver.Symbol p1, Opt<Access> p2, List<BodyDecl> p3) { setChild(p0, 0); setID(p1); setChild(p2, 1); setChild(p3, 2); } /** * @apilevel low-level * @ast method * */ protected int numChildren() { return 3; } /** * @apilevel internal * @ast method * */ public boolean mayHaveRewrite() { return false; } /** * Replaces the Modifiers child. * @param node The new node to replace the Modifiers child. * @apilevel high-level * @ast method * */ public void setModifiers(Modifiers node) { setChild(node, 0); } /** * Retrieves the Modifiers child. * @return The current node used as the Modifiers child. * @apilevel high-level * @ast method * */ public Modifiers getModifiers() { return (Modifiers)getChild(0); } /** * Retrieves the Modifiers child. * <p><em>This method does not invoke AST transformations.</em></p> * @return The current node used as the Modifiers child. * @apilevel low-level * @ast method * */ public Modifiers getModifiersNoTransform() { return (Modifiers)getChildNoTransform(0); } /** * Replaces the lexeme ID. * @param value The new value for the lexeme ID. * @apilevel high-level * @ast method * */ public void setID(String value) { tokenString_ID = value; } /** * JastAdd-internal setter for lexeme ID using the Beaver parser. * @apilevel internal * @ast method * */ 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(); } /** * Retrieves the value for the lexeme ID. * @return The value for the lexeme ID. * @apilevel high-level * @ast method * */ public String getID() { return tokenString_ID != null ? tokenString_ID : ""; } /** * Replaces the optional node for the SuperClassAccess child. This is the {@code Opt} node containing the child SuperClassAccess, not the actual child! * @param opt The new node to be used as the optional node for the SuperClassAccess child. * @apilevel low-level * @ast method * */ public void setSuperClassAccessOpt(Opt<Access> opt) { setChild(opt, 1); } /** * Check whether the optional SuperClassAccess child exists. * @return {@code true} if the optional SuperClassAccess child exists, {@code false} if it does not. * @apilevel high-level * @ast method * */ public boolean hasSuperClassAccess() { return getSuperClassAccessOpt().getNumChild() != 0; } /** * Retrieves the (optional) SuperClassAccess child. * @return The SuperClassAccess child, if it exists. Returns {@code null} otherwise. * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public Access getSuperClassAccess() { return (Access)getSuperClassAccessOpt().getChild(0); } /** * Replaces the (optional) SuperClassAccess child. * @param node The new node to be used as the SuperClassAccess child. * @apilevel high-level * @ast method * */ public void setSuperClassAccess(Access node) { getSuperClassAccessOpt().setChild(node, 0); } /** * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public Opt<Access> getSuperClassAccessOpt() { return (Opt<Access>)getChild(1); } /** * Retrieves the optional node for child SuperClassAccess. This is the {@code Opt} node containing the child SuperClassAccess, not the actual child! * <p><em>This method does not invoke AST transformations.</em></p> * @return The optional node for child SuperClassAccess. * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public Opt<Access> getSuperClassAccessOptNoTransform() { return (Opt<Access>)getChildNoTransform(1); } /** * Replaces the BodyDecl list. * @param list The new list node to be used as the BodyDecl list. * @apilevel high-level * @ast method * */ public void setBodyDeclList(List<BodyDecl> list) { setChild(list, 2); } /** * Retrieves the number of children in the BodyDecl list. * @return Number of children in the BodyDecl list. * @apilevel high-level * @ast method * */ public int getNumBodyDecl() { return getBodyDeclList().getNumChild(); } /** * Retrieves the number of children in the BodyDecl list. * Calling this method will not trigger rewrites.. * @return Number of children in the BodyDecl list. * @apilevel low-level * @ast method * */ public int getNumBodyDeclNoTransform() { return getBodyDeclListNoTransform().getNumChildNoTransform(); } /** * Retrieves the element at index {@code i} in the BodyDecl list.. * @param i Index of the element to return. * @return The element at position {@code i} in the BodyDecl list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public BodyDecl getBodyDecl(int i) { return (BodyDecl)getBodyDeclList().getChild(i); } /** * Append an element to the BodyDecl list. * @param node The element to append to the BodyDecl list. * @apilevel high-level * @ast method * */ public void addBodyDecl(BodyDecl node) { List<BodyDecl> list = (parent == null || state == null) ? getBodyDeclListNoTransform() : getBodyDeclList(); list.addChild(node); } /** * @apilevel low-level * @ast method * */ public void addBodyDeclNoTransform(BodyDecl node) { List<BodyDecl> list = getBodyDeclListNoTransform(); list.addChild(node); } /** * Replaces the BodyDecl list element at index {@code i} with the new node {@code node}. * @param node The new node to replace the old list element. * @param i The list index of the node to be replaced. * @apilevel high-level * @ast method * */ public void setBodyDecl(BodyDecl node, int i) { List<BodyDecl> list = getBodyDeclList(); list.setChild(node, i); } /** * Retrieves the BodyDecl list. * @return The node representing the BodyDecl list. * @apilevel high-level * @ast method * */ public List<BodyDecl> getBodyDecls() { return getBodyDeclList(); } /** * Retrieves the BodyDecl list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the BodyDecl list. * @apilevel low-level * @ast method * */ public List<BodyDecl> getBodyDeclsNoTransform() { return getBodyDeclListNoTransform(); } /** * Retrieves the BodyDecl list. * @return The node representing the BodyDecl list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<BodyDecl> getBodyDeclList() { List<BodyDecl> list = (List<BodyDecl>)getChild(2); list.getNumChild(); return list; } /** * Retrieves the BodyDecl list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the BodyDecl list. * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<BodyDecl> getBodyDeclListNoTransform() { return (List<BodyDecl>)getChildNoTransform(2); } /** * @ast method * @aspect NumericPromotion * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeAnalysis.jrag:155 */ private TypeDecl refined_NumericPromotion_NumericType_binaryNumericPromotion_TypeDecl(TypeDecl type) { if(!type.isNumericType()) return unknownType(); return unaryNumericPromotion().instanceOf(type) ? type : unaryNumericPromotion(); } /** * @apilevel internal */ protected boolean unaryNumericPromotion_computed = false; /** * @apilevel internal */ protected TypeDecl unaryNumericPromotion_value; /** * @attribute syn * @aspect NumericPromotion * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeAnalysis.jrag:148 */ @SuppressWarnings({"unchecked", "cast"}) public TypeDecl unaryNumericPromotion() { if(unaryNumericPromotion_computed) { return unaryNumericPromotion_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); unaryNumericPromotion_value = unaryNumericPromotion_compute(); if(isFinal && num == state().boundariesCrossed) unaryNumericPromotion_computed = true; return unaryNumericPromotion_value; } /** * @apilevel internal */ private TypeDecl unaryNumericPromotion_compute() { return this; } protected java.util.Map binaryNumericPromotion_TypeDecl_values; /** * @attribute syn * @aspect AutoBoxing * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/AutoBoxing.jrag:175 */ @SuppressWarnings({"unchecked", "cast"}) public TypeDecl binaryNumericPromotion(TypeDecl type) { Object _parameters = type; if(binaryNumericPromotion_TypeDecl_values == null) binaryNumericPromotion_TypeDecl_values = new java.util.HashMap(4); if(binaryNumericPromotion_TypeDecl_values.containsKey(_parameters)) { return (TypeDecl)binaryNumericPromotion_TypeDecl_values.get(_parameters); } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); TypeDecl binaryNumericPromotion_TypeDecl_value = binaryNumericPromotion_compute(type); if(isFinal && num == state().boundariesCrossed) binaryNumericPromotion_TypeDecl_values.put(_parameters, binaryNumericPromotion_TypeDecl_value); return binaryNumericPromotion_TypeDecl_value; } /** * @apilevel internal */ private TypeDecl binaryNumericPromotion_compute(TypeDecl type) { if(type.isReferenceType()) type = type.unboxed(); return refined_NumericPromotion_NumericType_binaryNumericPromotion_TypeDecl(type); } /** * @attribute syn * @aspect TypeAnalysis * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeAnalysis.jrag:173 */ public boolean isNumericType() { ASTNode$State state = state(); try { return true; } finally { } } /** * @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); } }
13,750
28.071882
153
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/Opt.java
/* This file was generated with JastAdd2 (http://jastadd.org) version R20130212 (r1031) */ package soot.JastAddJ; import java.util.HashSet; 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; /** * @production Opt : {@link ASTNode}; * @ast node * */ public class Opt<T extends ASTNode> extends ASTNode<T> implements Cloneable { /** * @apilevel low-level */ public void flushCache() { super.flushCache(); } /** * @apilevel internal */ public void flushCollectionCache() { super.flushCollectionCache(); } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public Opt<T> clone() throws CloneNotSupportedException { Opt node = (Opt)super.clone(); node.in$Circle(false); node.is$Final(false); return node; } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public Opt<T> copy() { try { Opt node = (Opt) clone(); node.parent = null; if(children != null) node.children = (ASTNode[]) children.clone(); return node; } catch (CloneNotSupportedException e) { throw new Error("Error: clone not supported for " + getClass().getName()); } } /** * Create a deep copy of the AST subtree at this node. * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level */ @SuppressWarnings({"unchecked", "cast"}) public Opt<T> fullCopy() { Opt tree = (Opt) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) children[i]; if(child != null) { child = child.fullCopy(); tree.setChild(child, i); } } } return tree; } /** * @ast method * */ public Opt() { super(); } /** * Initializes the child array to the correct size. * Initializes List and Opt nta children. * @apilevel internal * @ast method * @ast method * */ public void init$Children() { } /** * @ast method * */ public Opt(T opt) { setChild(opt, 0); } /** * @apilevel internal * @ast method * */ public boolean mayHaveRewrite() { return false; } /** * @attribute syn * @aspect BooleanExpressions * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/BooleanExpressions.jrag:21 */ public boolean definesLabel() { ASTNode$State state = state(); try { return getParent().definesLabel(); } finally { } } /** * @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); } }
3,054
21.29927
119
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/Options.java
package soot.JastAddJ; import java.util.HashSet; 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; /** * @ast class * */ public class Options extends java.lang.Object { static class Option { public String name; public boolean hasValue; public boolean isCollection; public Option(String name, boolean hasValue, boolean isCollection) { this.name = name; this.hasValue = hasValue; this.isCollection = isCollection; } } private Map options = new HashMap(); private Map optionDescriptions = new HashMap(); private HashSet files = new HashSet(); public Collection files() { return files; } public void initOptions() { options = new HashMap(); optionDescriptions = new HashMap(); files = new HashSet(); } public void addKeyOption(String name) { if(optionDescriptions.containsKey(name)) throw new Error("Command line definition error: option description for " + name + " is multiply declared"); optionDescriptions.put(name, new Option(name, false, false)); } public void addKeyValueOption(String name) { if(optionDescriptions.containsKey(name)) throw new Error("Command line definition error: option description for " + name + " is multiply declared"); optionDescriptions.put(name, new Option(name, true, false)); } public void addKeyCollectionOption(String name) { if(optionDescriptions.containsKey(name)) throw new Error("Command line definition error: option description for " + name + " is multiply declared"); optionDescriptions.put(name, new Option(name, true, true)); } public void addOptionDescription(String name, boolean value) { if(optionDescriptions.containsKey(name)) throw new Error("Command line definition error: option description for " + name + " is multiply declared"); optionDescriptions.put(name, new Option(name, value, false)); } public void addOptionDescription(String name, boolean value, boolean isCollection) { if(optionDescriptions.containsKey(name)) throw new Error("Command line definition error: option description for " + name + " is multiply declared"); optionDescriptions.put(name, new Option(name, value, isCollection)); } public void addOptions(String[] args) { for(int i = 0; i < args.length; i++) { String arg = args[i]; if(arg.startsWith("@")) { try { String fileName = arg.substring(1,arg.length()); java.io.FileReader r = new java.io.FileReader(fileName); java.io.StreamTokenizer tokenizer = new java.io.StreamTokenizer(r); tokenizer.resetSyntax(); tokenizer.whitespaceChars(' ',' '); tokenizer.whitespaceChars('\t','\t'); tokenizer.whitespaceChars('\f','\f'); tokenizer.whitespaceChars('\n','\n'); tokenizer.whitespaceChars('\r','\r'); tokenizer.wordChars(33,255); ArrayList list = new ArrayList(); int next = tokenizer.nextToken(); while(next != java.io.StreamTokenizer.TT_EOF) { if(next == java.io.StreamTokenizer.TT_WORD) { list.add(tokenizer.sval); } next = tokenizer.nextToken(); } String[] newArgs = new String[list.size()]; int index = 0; for(Iterator iter = list.iterator(); iter.hasNext(); index++) { newArgs[index] = (String)iter.next(); } addOptions(newArgs); r.close(); } catch (java.io.FileNotFoundException e) { System.err.println("File not found: "+arg.substring(1)); } catch (java.io.IOException e) { System.err.println("Exception: "+e.getMessage()); } } else if(arg.startsWith("-")) { if(!optionDescriptions.containsKey(arg)) throw new Error("Command line argument error: option " + arg + " is not defined"); Option o = (Option)optionDescriptions.get(arg); if(!o.isCollection && options.containsKey(arg)) throw new Error("Command line argument error: option " + arg + " is multiply defined"); if(o.hasValue && !o.isCollection) { String value = null; if(i + 1 > args.length - 1) throw new Error("Command line argument error: value missing for key " + arg); value = args[i+1]; if(value.startsWith("-")) throw new Error("Command line argument error: value missing for key " + arg); i++; options.put(arg, value); } else if(o.hasValue && o.isCollection) { String value = null; if(i + 1 > args.length - 1) throw new Error("Command line argument error: value missing for key " + arg); value = args[i+1]; if(value.startsWith("-")) throw new Error("Command line argument error: value missing for key " + arg); i++; Collection c = (Collection)options.get(arg); if(c == null) c = new ArrayList(); c.add(value); options.put(arg, c); } else { options.put(arg, null); } } else { files.add(arg); } } } public boolean hasOption(String name) { return options.containsKey(name); } public void setOption(String name) { options.put(name, null); } public boolean hasValueForOption(String name) { return options.containsKey(name) && options.get(name) != null; } public String getValueForOption(String name) { if(!hasValueForOption(name)) throw new Error("Command line argument error: key " + name + " does not have a value"); return (String)options.get(name); } public void setValueForOption(String value, String option) { options.put(option, value); } public Collection getValueCollectionForOption(String name) { if(!hasValueForOption(name)) throw new Error("Command line argument error: key " + name + " does not have a value"); return (Collection)options.get(name); } public boolean verbose() { return hasOption("-verbose"); } }
6,477
32.391753
113
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/OrBitwiseExpr.java
/* This file was generated with JastAdd2 (http://jastadd.org) version R20130212 (r1031) */ package soot.JastAddJ; import java.util.HashSet; 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; /** * @production OrBitwiseExpr : {@link BitwiseExpr}; * @ast node * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/java.ast:168 */ public class OrBitwiseExpr extends BitwiseExpr implements Cloneable { /** * @apilevel low-level */ public void flushCache() { super.flushCache(); } /** * @apilevel internal */ public void flushCollectionCache() { super.flushCollectionCache(); } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public OrBitwiseExpr clone() throws CloneNotSupportedException { OrBitwiseExpr node = (OrBitwiseExpr)super.clone(); node.in$Circle(false); node.is$Final(false); return node; } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public OrBitwiseExpr copy() { try { OrBitwiseExpr node = (OrBitwiseExpr) clone(); node.parent = null; if(children != null) node.children = (ASTNode[]) children.clone(); return node; } catch (CloneNotSupportedException e) { throw new Error("Error: clone not supported for " + getClass().getName()); } } /** * Create a deep copy of the AST subtree at this node. * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level */ @SuppressWarnings({"unchecked", "cast"}) public OrBitwiseExpr fullCopy() { OrBitwiseExpr tree = (OrBitwiseExpr) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) children[i]; if(child != null) { child = child.fullCopy(); tree.setChild(child, i); } } } return tree; } /** * @ast method * @aspect Expressions * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/Expressions.jrag:829 */ public soot.Value emitOperation(Body b, soot.Value left, soot.Value right) { return asLocal(b, b.newOrExpr(asImmediate(b, left), asImmediate(b, right), this)); } /** * @ast method * */ public OrBitwiseExpr() { super(); } /** * Initializes the child array to the correct size. * Initializes List and Opt nta children. * @apilevel internal * @ast method * @ast method * */ public void init$Children() { children = new ASTNode[2]; } /** * @ast method * */ public OrBitwiseExpr(Expr p0, Expr p1) { setChild(p0, 0); setChild(p1, 1); } /** * @apilevel low-level * @ast method * */ protected int numChildren() { return 2; } /** * @apilevel internal * @ast method * */ public boolean mayHaveRewrite() { return false; } /** * Replaces the LeftOperand child. * @param node The new node to replace the LeftOperand child. * @apilevel high-level * @ast method * */ public void setLeftOperand(Expr node) { setChild(node, 0); } /** * Retrieves the LeftOperand child. * @return The current node used as the LeftOperand child. * @apilevel high-level * @ast method * */ public Expr getLeftOperand() { return (Expr)getChild(0); } /** * Retrieves the LeftOperand child. * <p><em>This method does not invoke AST transformations.</em></p> * @return The current node used as the LeftOperand child. * @apilevel low-level * @ast method * */ public Expr getLeftOperandNoTransform() { return (Expr)getChildNoTransform(0); } /** * Replaces the RightOperand child. * @param node The new node to replace the RightOperand child. * @apilevel high-level * @ast method * */ public void setRightOperand(Expr node) { setChild(node, 1); } /** * Retrieves the RightOperand child. * @return The current node used as the RightOperand child. * @apilevel high-level * @ast method * */ public Expr getRightOperand() { return (Expr)getChild(1); } /** * Retrieves the RightOperand child. * <p><em>This method does not invoke AST transformations.</em></p> * @return The current node used as the RightOperand child. * @apilevel low-level * @ast method * */ public Expr getRightOperandNoTransform() { return (Expr)getChildNoTransform(1); } /** * @attribute syn * @aspect ConstantExpression * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/ConstantExpression.jrag:91 */ public Constant constant() { ASTNode$State state = state(); try { return type().orBitwise(getLeftOperand().constant(), getRightOperand().constant()); } finally { } } /** * @attribute syn * @aspect PrettyPrint * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/PrettyPrint.jadd:400 */ public String printOp() { ASTNode$State state = state(); try { return " | "; } finally { } } /** * @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); } }
5,649
23.780702
113
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/OrLogicalExpr.java
/* This file was generated with JastAdd2 (http://jastadd.org) version R20130212 (r1031) */ package soot.JastAddJ; import java.util.HashSet; 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; /** * @production OrLogicalExpr : {@link LogicalExpr}; * @ast node * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/java.ast:173 */ public class OrLogicalExpr extends LogicalExpr implements Cloneable { /** * @apilevel low-level */ public void flushCache() { super.flushCache(); isDAafterTrue_Variable_values = null; isDAafterFalse_Variable_values = null; isDAafter_Variable_values = null; isDUafter_Variable_values = null; next_test_label_computed = false; next_test_label_value = null; } /** * @apilevel internal */ public void flushCollectionCache() { super.flushCollectionCache(); } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public OrLogicalExpr clone() throws CloneNotSupportedException { OrLogicalExpr node = (OrLogicalExpr)super.clone(); node.isDAafterTrue_Variable_values = null; node.isDAafterFalse_Variable_values = null; node.isDAafter_Variable_values = null; node.isDUafter_Variable_values = null; node.next_test_label_computed = false; node.next_test_label_value = null; node.in$Circle(false); node.is$Final(false); return node; } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public OrLogicalExpr copy() { try { OrLogicalExpr node = (OrLogicalExpr) clone(); node.parent = null; if(children != null) node.children = (ASTNode[]) children.clone(); return node; } catch (CloneNotSupportedException e) { throw new Error("Error: clone not supported for " + getClass().getName()); } } /** * Create a deep copy of the AST subtree at this node. * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level */ @SuppressWarnings({"unchecked", "cast"}) public OrLogicalExpr fullCopy() { OrLogicalExpr tree = (OrLogicalExpr) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) children[i]; if(child != null) { child = child.fullCopy(); tree.setChild(child, i); } } } return tree; } /** * @ast method * @aspect BooleanExpressions * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/BooleanExpressions.jrag:196 */ public void emitEvalBranch(Body b) { b.setLine(this); getLeftOperand().emitEvalBranch(b); b.addLabel(next_test_label()); if(getLeftOperand().canBeFalse()) { getRightOperand().emitEvalBranch(b); if(getRightOperand().canBeFalse()) b.add(b.newGotoStmt(false_label(), this)); } } /** * @ast method * */ public OrLogicalExpr() { super(); } /** * Initializes the child array to the correct size. * Initializes List and Opt nta children. * @apilevel internal * @ast method * @ast method * */ public void init$Children() { children = new ASTNode[2]; } /** * @ast method * */ public OrLogicalExpr(Expr p0, Expr p1) { setChild(p0, 0); setChild(p1, 1); } /** * @apilevel low-level * @ast method * */ protected int numChildren() { return 2; } /** * @apilevel internal * @ast method * */ public boolean mayHaveRewrite() { return false; } /** * Replaces the LeftOperand child. * @param node The new node to replace the LeftOperand child. * @apilevel high-level * @ast method * */ public void setLeftOperand(Expr node) { setChild(node, 0); } /** * Retrieves the LeftOperand child. * @return The current node used as the LeftOperand child. * @apilevel high-level * @ast method * */ public Expr getLeftOperand() { return (Expr)getChild(0); } /** * Retrieves the LeftOperand child. * <p><em>This method does not invoke AST transformations.</em></p> * @return The current node used as the LeftOperand child. * @apilevel low-level * @ast method * */ public Expr getLeftOperandNoTransform() { return (Expr)getChildNoTransform(0); } /** * Replaces the RightOperand child. * @param node The new node to replace the RightOperand child. * @apilevel high-level * @ast method * */ public void setRightOperand(Expr node) { setChild(node, 1); } /** * Retrieves the RightOperand child. * @return The current node used as the RightOperand child. * @apilevel high-level * @ast method * */ public Expr getRightOperand() { return (Expr)getChild(1); } /** * Retrieves the RightOperand child. * <p><em>This method does not invoke AST transformations.</em></p> * @return The current node used as the RightOperand child. * @apilevel low-level * @ast method * */ public Expr getRightOperandNoTransform() { return (Expr)getChildNoTransform(1); } /** * @attribute syn * @aspect ConstantExpression * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/ConstantExpression.jrag:91 */ public Constant constant() { ASTNode$State state = state(); try { return Constant.create(left().constant().booleanValue() || right().constant().booleanValue()); } finally { } } protected java.util.Map isDAafterTrue_Variable_values; /** * @attribute syn * @aspect DA * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DefiniteAssignment.jrag:372 */ @SuppressWarnings({"unchecked", "cast"}) public boolean isDAafterTrue(Variable v) { Object _parameters = v; if(isDAafterTrue_Variable_values == null) isDAafterTrue_Variable_values = new java.util.HashMap(4); if(isDAafterTrue_Variable_values.containsKey(_parameters)) { return ((Boolean)isDAafterTrue_Variable_values.get(_parameters)).booleanValue(); } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); boolean isDAafterTrue_Variable_value = isDAafterTrue_compute(v); if(isFinal && num == state().boundariesCrossed) isDAafterTrue_Variable_values.put(_parameters, Boolean.valueOf(isDAafterTrue_Variable_value)); return isDAafterTrue_Variable_value; } /** * @apilevel internal */ private boolean isDAafterTrue_compute(Variable v) { return (getLeftOperand().isDAafterTrue(v) && getRightOperand().isDAafterTrue(v)) || isFalse(); } protected java.util.Map isDAafterFalse_Variable_values; /** * @attribute syn * @aspect DA * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DefiniteAssignment.jrag:373 */ @SuppressWarnings({"unchecked", "cast"}) public boolean isDAafterFalse(Variable v) { Object _parameters = v; if(isDAafterFalse_Variable_values == null) isDAafterFalse_Variable_values = new java.util.HashMap(4); if(isDAafterFalse_Variable_values.containsKey(_parameters)) { return ((Boolean)isDAafterFalse_Variable_values.get(_parameters)).booleanValue(); } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); boolean isDAafterFalse_Variable_value = isDAafterFalse_compute(v); if(isFinal && num == state().boundariesCrossed) isDAafterFalse_Variable_values.put(_parameters, Boolean.valueOf(isDAafterFalse_Variable_value)); return isDAafterFalse_Variable_value; } /** * @apilevel internal */ private boolean isDAafterFalse_compute(Variable v) { return getRightOperand().isDAafterFalse(v) || isTrue(); } protected java.util.Map isDAafter_Variable_values; /** * @attribute syn * @aspect DA * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DefiniteAssignment.jrag:376 */ @SuppressWarnings({"unchecked", "cast"}) public boolean isDAafter(Variable v) { Object _parameters = v; if(isDAafter_Variable_values == null) isDAafter_Variable_values = new java.util.HashMap(4); if(isDAafter_Variable_values.containsKey(_parameters)) { return ((Boolean)isDAafter_Variable_values.get(_parameters)).booleanValue(); } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); boolean isDAafter_Variable_value = isDAafter_compute(v); if(isFinal && num == state().boundariesCrossed) isDAafter_Variable_values.put(_parameters, Boolean.valueOf(isDAafter_Variable_value)); return isDAafter_Variable_value; } /** * @apilevel internal */ private boolean isDAafter_compute(Variable v) { return isDAafterTrue(v) && isDAafterFalse(v); } /** * @attribute syn * @aspect DU * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DefiniteAssignment.jrag:702 */ public boolean isDUafterTrue(Variable v) { ASTNode$State state = state(); try { return getLeftOperand().isDUafterTrue(v) && getRightOperand().isDUafterTrue(v); } finally { } } /** * @attribute syn * @aspect DU * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DefiniteAssignment.jrag:703 */ public boolean isDUafterFalse(Variable v) { ASTNode$State state = state(); try { return getRightOperand().isDUafterFalse(v); } finally { } } protected java.util.Map isDUafter_Variable_values; /** * @attribute syn * @aspect DU * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DefiniteAssignment.jrag:812 */ @SuppressWarnings({"unchecked", "cast"}) public boolean isDUafter(Variable v) { Object _parameters = v; if(isDUafter_Variable_values == null) isDUafter_Variable_values = new java.util.HashMap(4); if(isDUafter_Variable_values.containsKey(_parameters)) { return ((Boolean)isDUafter_Variable_values.get(_parameters)).booleanValue(); } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); boolean isDUafter_Variable_value = isDUafter_compute(v); if(isFinal && num == state().boundariesCrossed) isDUafter_Variable_values.put(_parameters, Boolean.valueOf(isDUafter_Variable_value)); return isDUafter_Variable_value; } /** * @apilevel internal */ private boolean isDUafter_compute(Variable v) { return isDUafterTrue(v) && isDUafterFalse(v); } /** * @attribute syn * @aspect PrettyPrint * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/PrettyPrint.jadd:400 */ public String printOp() { ASTNode$State state = state(); try { return " || "; } finally { } } /** * @attribute syn * @aspect BooleanExpressions * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/BooleanExpressions.jrag:82 */ public boolean canBeTrue() { ASTNode$State state = state(); try { return getLeftOperand().canBeTrue() || getRightOperand().canBeTrue(); } finally { } } /** * @attribute syn * @aspect BooleanExpressions * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/BooleanExpressions.jrag:92 */ public boolean canBeFalse() { ASTNode$State state = state(); try { return getLeftOperand().canBeFalse() && getRightOperand().canBeFalse(); } finally { } } /** * @apilevel internal */ protected boolean next_test_label_computed = false; /** * @apilevel internal */ protected soot.jimple.Stmt next_test_label_value; /** * @attribute syn * @aspect BooleanExpressions * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/BooleanExpressions.jrag:207 */ @SuppressWarnings({"unchecked", "cast"}) public soot.jimple.Stmt next_test_label() { if(next_test_label_computed) { return next_test_label_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); next_test_label_value = next_test_label_compute(); if(isFinal && num == state().boundariesCrossed) next_test_label_computed = true; return next_test_label_value; } /** * @apilevel internal */ private soot.jimple.Stmt next_test_label_compute() { return newLabel(); } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DefiniteAssignment.jrag:375 * @apilevel internal */ public boolean Define_boolean_isDAbefore(ASTNode caller, ASTNode child, Variable v) { if(caller == getRightOperandNoTransform()) { return getLeftOperand().isDAafterFalse(v); } else if(caller == getLeftOperandNoTransform()) { return isDAbefore(v); } else { return super.Define_boolean_isDAbefore(caller, child, v); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DefiniteAssignment.jrag:811 * @apilevel internal */ public boolean Define_boolean_isDUbefore(ASTNode caller, ASTNode child, Variable v) { if(caller == getRightOperandNoTransform()) { return getLeftOperand().isDUafterFalse(v); } else if(caller == getLeftOperandNoTransform()) { return isDUbefore(v); } else { return super.Define_boolean_isDUbefore(caller, child, v); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/BooleanExpressions.jrag:79 * @apilevel internal */ public soot.jimple.Stmt Define_soot_jimple_Stmt_condition_false_label(ASTNode caller, ASTNode child) { if(caller == getRightOperandNoTransform()) { return false_label(); } else if(caller == getLeftOperandNoTransform()) { return next_test_label(); } else { return getParent().Define_soot_jimple_Stmt_condition_false_label(this, caller); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/BooleanExpressions.jrag:80 * @apilevel internal */ public soot.jimple.Stmt Define_soot_jimple_Stmt_condition_true_label(ASTNode caller, ASTNode child) { if(caller == getRightOperandNoTransform()) { return true_label(); } else if(caller == getLeftOperandNoTransform()) { return true_label(); } else { return getParent().Define_soot_jimple_Stmt_condition_true_label(this, caller); } } /** * @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); } }
15,168
31.137712
152
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/PackageAccess.java
/* This file was generated with JastAdd2 (http://jastadd.org) version R20130212 (r1031) */ package soot.JastAddJ; import java.util.HashSet; 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; /** * @production PackageAccess : {@link Access} ::= <span class="component">&lt;Package:String&gt;</span>; * @ast node * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/java.ast:29 */ public class PackageAccess extends Access implements Cloneable { /** * @apilevel low-level */ public void flushCache() { super.flushCache(); } /** * @apilevel internal */ public void flushCollectionCache() { super.flushCollectionCache(); } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public PackageAccess clone() throws CloneNotSupportedException { PackageAccess node = (PackageAccess)super.clone(); node.in$Circle(false); node.is$Final(false); return node; } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public PackageAccess copy() { try { PackageAccess node = (PackageAccess) clone(); node.parent = null; if(children != null) node.children = (ASTNode[]) children.clone(); return node; } catch (CloneNotSupportedException e) { throw new Error("Error: clone not supported for " + getClass().getName()); } } /** * Create a deep copy of the AST subtree at this node. * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level */ @SuppressWarnings({"unchecked", "cast"}) public PackageAccess fullCopy() { PackageAccess tree = (PackageAccess) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) children[i]; if(child != null) { child = child.fullCopy(); tree.setChild(child, i); } } } return tree; } /** * @ast method * @aspect NameCheck * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/NameCheck.jrag:50 */ public void nameCheck() { if(!hasPackage(packageName())) { error(packageName() + " not found"); } } /** * @ast method * @aspect NodeConstructors * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/NodeConstructors.jrag:18 */ public PackageAccess(String name, int start, int end) { this(name); this.start = this.Packagestart = start; this.end = this.Packageend = end; } /** * @ast method * @aspect PrettyPrint * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/PrettyPrint.jadd:510 */ public void toString(StringBuffer s) { s.append(getPackage()); } /** * @ast method * */ public PackageAccess() { super(); } /** * Initializes the child array to the correct size. * Initializes List and Opt nta children. * @apilevel internal * @ast method * @ast method * */ public void init$Children() { } /** * @ast method * */ public PackageAccess(String p0) { setPackage(p0); } /** * @ast method * */ public PackageAccess(beaver.Symbol p0) { setPackage(p0); } /** * @apilevel low-level * @ast method * */ protected int numChildren() { return 0; } /** * @apilevel internal * @ast method * */ public boolean mayHaveRewrite() { return false; } /** * Replaces the lexeme Package. * @param value The new value for the lexeme Package. * @apilevel high-level * @ast method * */ public void setPackage(String value) { tokenString_Package = value; } /** * @apilevel internal * @ast method * */ /** * @apilevel internal */ protected String tokenString_Package; /** * @ast method * */ public int Packagestart; /** * @ast method * */ public int Packageend; /** * JastAdd-internal setter for lexeme Package using the Beaver parser. * @apilevel internal * @ast method * */ public void setPackage(beaver.Symbol symbol) { if(symbol.value != null && !(symbol.value instanceof String)) throw new UnsupportedOperationException("setPackage is only valid for String lexemes"); tokenString_Package = (String)symbol.value; Packagestart = symbol.getStart(); Packageend = symbol.getEnd(); } /** * Retrieves the value for the lexeme Package. * @return The value for the lexeme Package. * @apilevel high-level * @ast method * */ public String getPackage() { return tokenString_Package != null ? tokenString_Package : ""; } /** * @attribute syn * @aspect LookupFullyQualifiedTypes * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupType.jrag:83 */ public boolean hasQualifiedPackage(String packageName) { ASTNode$State state = state(); try { return hasPackage(packageName() + "." + packageName); } finally { } } /** * @attribute syn * @aspect TypeScopePropagation * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupType.jrag:430 */ public SimpleSet qualifiedLookupType(String name) { ASTNode$State state = state(); try { SimpleSet c = SimpleSet.emptySet; TypeDecl typeDecl = lookupType(packageName(), name); if(nextAccess() instanceof ClassInstanceExpr) { if(typeDecl != null && typeDecl.accessibleFrom(hostType())) c = c.add(typeDecl); return c; } else { if(typeDecl != null) { if(hostType() != null && typeDecl.accessibleFrom(hostType())) c = c.add(typeDecl); else if(hostType() == null && typeDecl.accessibleFromPackage(hostPackage())) c = c.add(typeDecl); } return c; } } finally { } } /** * @attribute syn * @aspect VariableScope * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupVariable.jrag:148 */ public SimpleSet qualifiedLookupVariable(String name) { ASTNode$State state = state(); try { return SimpleSet.emptySet; } finally { } } /** * @attribute syn * @aspect PrettyPrint * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/PrettyPrint.jadd:800 */ public String dumpString() { ASTNode$State state = state(); try { return getClass().getName() + " [" + getPackage() + "]"; } finally { } } /** * @attribute syn * @aspect Names * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/QualifiedNames.jrag:23 */ public String name() { ASTNode$State state = state(); try { return getPackage(); } finally { } } /** * @attribute syn * @aspect Names * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/QualifiedNames.jrag:25 */ public String packageName() { ASTNode$State state = state(); try { StringBuffer s = new StringBuffer(); if(hasPrevExpr()) { s.append(prevExpr().packageName()); s.append("."); } s.append(getPackage()); return s.toString(); } finally { } } /** * @attribute syn * @aspect AccessTypes * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/ResolveAmbiguousNames.jrag:37 */ public boolean isPackageAccess() { ASTNode$State state = state(); try { return true; } finally { } } /** * @attribute syn * @aspect SyntacticClassification * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/SyntacticClassification.jrag:56 */ public NameType predNameType() { ASTNode$State state = state(); try { return NameType.PACKAGE_NAME; } finally { } } /** * @attribute syn * @aspect TypeHierarchyCheck * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeHierarchyCheck.jrag:20 */ public boolean isUnknown() { ASTNode$State state = state(); try { return !hasPackage(packageName()); } finally { } } /** * @attribute inh * @aspect NameCheck * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/NameCheck.jrag:243 */ @SuppressWarnings({"unchecked", "cast"}) public boolean hasPackage(String packageName) { ASTNode$State state = state(); boolean hasPackage_String_value = getParent().Define_boolean_hasPackage(this, null, packageName); return hasPackage_String_value; } /** * @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); } }
9,219
24.682451
117
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/PackageOrTypeAccess.java
/* This file was generated with JastAdd2 (http://jastadd.org) version R20130212 (r1031) */ package soot.JastAddJ; import java.util.HashSet; 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; /** * @production PackageOrTypeAccess : {@link Access} ::= <span class="component">&lt;ID:String&gt;</span>; * @ast node * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/java.ast:34 */ public class PackageOrTypeAccess extends Access implements Cloneable { /** * @apilevel low-level */ public void flushCache() { super.flushCache(); } /** * @apilevel internal */ public void flushCollectionCache() { super.flushCollectionCache(); } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public PackageOrTypeAccess clone() throws CloneNotSupportedException { PackageOrTypeAccess node = (PackageOrTypeAccess)super.clone(); node.in$Circle(false); node.is$Final(false); return node; } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public PackageOrTypeAccess copy() { try { PackageOrTypeAccess node = (PackageOrTypeAccess) clone(); node.parent = null; if(children != null) node.children = (ASTNode[]) children.clone(); return node; } catch (CloneNotSupportedException e) { throw new Error("Error: clone not supported for " + getClass().getName()); } } /** * Create a deep copy of the AST subtree at this node. * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level */ @SuppressWarnings({"unchecked", "cast"}) public PackageOrTypeAccess fullCopy() { PackageOrTypeAccess tree = (PackageOrTypeAccess) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) children[i]; if(child != null) { child = child.fullCopy(); tree.setChild(child, i); } } } return tree; } /** * @ast method * @aspect NameCheck * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/NameCheck.jrag:60 */ public void nameCheck() { error("packageortype name " + name()); } /** * @ast method * @aspect NodeConstructors * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/NodeConstructors.jrag:28 */ public PackageOrTypeAccess(String name, int start, int end) { this(name); this.start = this.IDstart = start; this.end = this.IDend = end; } /** * @ast method * */ public PackageOrTypeAccess() { super(); } /** * Initializes the child array to the correct size. * Initializes List and Opt nta children. * @apilevel internal * @ast method * @ast method * */ public void init$Children() { } /** * @ast method * */ public PackageOrTypeAccess(String p0) { setID(p0); } /** * @ast method * */ public PackageOrTypeAccess(beaver.Symbol p0) { setID(p0); } /** * @apilevel low-level * @ast method * */ protected int numChildren() { return 0; } /** * @apilevel internal * @ast method * */ public boolean mayHaveRewrite() { return true; } /** * Replaces the lexeme ID. * @param value The new value for the lexeme ID. * @apilevel high-level * @ast method * */ public void setID(String value) { tokenString_ID = value; } /** * @apilevel internal * @ast method * */ /** * @apilevel internal */ protected String tokenString_ID; /** * @ast method * */ public int IDstart; /** * @ast method * */ public int IDend; /** * JastAdd-internal setter for lexeme ID using the Beaver parser. * @apilevel internal * @ast method * */ 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(); } /** * Retrieves the value for the lexeme ID. * @return The value for the lexeme ID. * @apilevel high-level * @ast method * */ public String getID() { return tokenString_ID != null ? tokenString_ID : ""; } /** * @attribute syn * @aspect TypeScopePropagation * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupType.jrag:430 */ public SimpleSet qualifiedLookupType(String name) { ASTNode$State state = state(); try { return SimpleSet.emptySet; } finally { } } /** * @attribute syn * @aspect VariableScope * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupVariable.jrag:148 */ public SimpleSet qualifiedLookupVariable(String name) { ASTNode$State state = state(); try { return SimpleSet.emptySet; } finally { } } /** * @attribute syn * @aspect PrettyPrint * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/PrettyPrint.jadd:800 */ public String dumpString() { ASTNode$State state = state(); try { return getClass().getName() + " [" + getID() + "]"; } finally { } } /** * @attribute syn * @aspect Names * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/QualifiedNames.jrag:15 */ public String name() { ASTNode$State state = state(); try { return getID(); } finally { } } /** * @attribute syn * @aspect Names * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/QualifiedNames.jrag:25 */ public String packageName() { ASTNode$State state = state(); try { StringBuffer s = new StringBuffer(); if(hasPrevExpr()) { s.append(prevExpr().packageName()); s.append("."); } s.append(name()); return s.toString(); } finally { } } /** * @attribute syn * @aspect SyntacticClassification * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/SyntacticClassification.jrag:56 */ public NameType predNameType() { ASTNode$State state = state(); try { return NameType.PACKAGE_OR_TYPE_NAME; } finally { } } /** * @apilevel internal */ public ASTNode rewriteTo() { // Declared in /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/ResolveAmbiguousNames.jrag at line 175 if(!duringSyntacticClassification()) { state().duringNameResolution++; ASTNode result = rewriteRule0(); state().duringNameResolution--; return result; } return super.rewriteTo(); } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/ResolveAmbiguousNames.jrag:175 * @apilevel internal */ private Access rewriteRule0() { { if(!lookupType(name()).isEmpty()) return new TypeAccess(name(), start(), end()); else return new PackageAccess(name(), start(), end()); } } }
7,653
24.013072
126
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/ParClassDecl.java
/* This file was generated with JastAdd2 (http://jastadd.org) version R20130212 (r1031) */ package soot.JastAddJ; import java.util.HashSet; 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; /** * @production ParClassDecl : {@link ClassDecl} ::= <span class="component">Argument:{@link Access}*</span> <span class="component">[SuperClassAccess:{@link Access}]</span> <span class="component">Implements:{@link Access}*</span> <span class="component">{@link BodyDecl}*</span>; * @ast node * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.ast:6 */ public class ParClassDecl extends ClassDecl implements Cloneable, ParTypeDecl, MemberSubstitutor { /** * @apilevel low-level */ public void flushCache() { super.flushCache(); involvesTypeParameters_visited = -1; involvesTypeParameters_computed = false; involvesTypeParameters_initialized = false; erasure_computed = false; erasure_value = null; getSuperClassAccessOpt_computed = false; getSuperClassAccessOpt_value = null; getImplementsList_computed = false; getImplementsList_value = null; getBodyDeclList_computed = false; getBodyDeclList_value = null; subtype_TypeDecl_values = null; sameStructure_TypeDecl_values = null; instanceOf_TypeDecl_values = null; sameSignature_ArrayList_values = null; usesTypeVariable_visited = -1; usesTypeVariable_computed = false; usesTypeVariable_initialized = false; sourceTypeDecl_computed = false; sourceTypeDecl_value = null; fullName_computed = false; fullName_value = null; typeName_computed = false; typeName_value = null; unimplementedMethods_computed = false; unimplementedMethods_value = null; localMethodsSignatureMap_computed = false; localMethodsSignatureMap_value = null; localFields_String_values = null; localTypeDecls_String_values = null; constructors_computed = false; constructors_value = null; genericDecl_computed = false; genericDecl_value = null; } /** * @apilevel internal */ public void flushCollectionCache() { super.flushCollectionCache(); } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public ParClassDecl clone() throws CloneNotSupportedException { ParClassDecl node = (ParClassDecl)super.clone(); node.involvesTypeParameters_visited = -1; node.involvesTypeParameters_computed = false; node.involvesTypeParameters_initialized = false; node.erasure_computed = false; node.erasure_value = null; node.getSuperClassAccessOpt_computed = false; node.getSuperClassAccessOpt_value = null; node.getImplementsList_computed = false; node.getImplementsList_value = null; node.getBodyDeclList_computed = false; node.getBodyDeclList_value = null; node.subtype_TypeDecl_values = null; node.sameStructure_TypeDecl_values = null; node.instanceOf_TypeDecl_values = null; node.sameSignature_ArrayList_values = null; node.usesTypeVariable_visited = -1; node.usesTypeVariable_computed = false; node.usesTypeVariable_initialized = false; node.sourceTypeDecl_computed = false; node.sourceTypeDecl_value = null; node.fullName_computed = false; node.fullName_value = null; node.typeName_computed = false; node.typeName_value = null; node.unimplementedMethods_computed = false; node.unimplementedMethods_value = null; node.localMethodsSignatureMap_computed = false; node.localMethodsSignatureMap_value = null; node.localFields_String_values = null; node.localTypeDecls_String_values = null; node.constructors_computed = false; node.constructors_value = null; node.genericDecl_computed = false; node.genericDecl_value = null; node.in$Circle(false); node.is$Final(false); return node; } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public ParClassDecl copy() { try { ParClassDecl node = (ParClassDecl) clone(); node.parent = null; if(children != null) node.children = (ASTNode[]) children.clone(); return node; } catch (CloneNotSupportedException e) { throw new Error("Error: clone not supported for " + getClass().getName()); } } /** * Create a deep copy of the AST subtree at this node. * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level */ @SuppressWarnings({"unchecked", "cast"}) public ParClassDecl fullCopy() { ParClassDecl tree = (ParClassDecl) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { switch (i) { case 3: tree.children[i] = new Opt(); continue; case 4: case 5: tree.children[i] = new List(); continue; } ASTNode child = (ASTNode) children[i]; if(child != null) { child = child.fullCopy(); tree.setChild(child, i); } } } return tree; } /** * @ast method * @aspect GenericsNameBinding * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:554 */ public void collectErrors() { // Disable error check for ParClassDecl which is an instanciated GenericClassDecl } /** * @ast method * @aspect GenericsPrettyPrint * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericsPrettyPrint.jrag:34 */ public void toString(StringBuffer s) { getModifiers().toString(s); s.append("class " + getID()); s.append('<'); if (getNumArgument() > 0) { getArgument(0).toString(s); for (int i = 1; i < getNumArgument(); i++) { s.append(", "); getArgument(i).toString(s); } } s.append('>'); if(hasSuperClassAccess()) { s.append(" extends "); getSuperClassAccess().toString(s); } if(getNumImplements() > 0) { s.append(" implements "); getImplements(0).toString(s); for(int i = 1; i < getNumImplements(); i++) { s.append(", "); getImplements(i).toString(s); } } ppBodyDecls(s); } /** * @ast method * @aspect LookupParTypeDecl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:840 */ public TypeDecl substitute(TypeVariable typeVariable) { for(int i = 0; i < numTypeParameter(); i++) if(typeParameter(i) == typeVariable) return getArgument(i).type(); return super.substitute(typeVariable); } /** * @ast method * @aspect LookupParTypeDecl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:853 */ public int numTypeParameter() { return ((GenericTypeDecl)original()).getNumTypeParameter(); } /** * @ast method * @aspect LookupParTypeDecl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:856 */ public TypeVariable typeParameter(int index) { return ((GenericTypeDecl)original()).getTypeParameter(index); } /** * @ast method * @aspect LookupParTypeDecl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:888 */ public Access substitute(Parameterization parTypeDecl) { // TODO: include nesting as well.... if(parTypeDecl.isRawType()) return ((GenericTypeDecl)genericDecl()).rawType().createBoundAccess(); if(!usesTypeVariable()) return super.substitute(parTypeDecl); List list = new List(); for(int i = 0; i < getNumArgument(); i++) list.add(getArgument(i).type().substitute(parTypeDecl)); return new ParTypeAccess(genericDecl().createQualifiedAccess(), list); } /** * @ast method * @aspect GenericsParTypeDecl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericsParTypeDecl.jrag:76 */ public Access createQualifiedAccess() { List typeArgumentList = new List(); for(int i = 0; i < getNumArgument(); i++) { Access a = (Access)getArgument(i); if(a instanceof TypeAccess) typeArgumentList.add(a.type().createQualifiedAccess()); else typeArgumentList.add(a.fullCopy()); } if(!isTopLevelType()) { if(isRawType()) return enclosingType().createQualifiedAccess().qualifiesAccess( new TypeAccess("", getID()) ); else return enclosingType().createQualifiedAccess().qualifiesAccess( new ParTypeAccess(new TypeAccess("", getID()), typeArgumentList) ); } else { if(isRawType()) return new TypeAccess(packageName(), getID()); else return new ParTypeAccess(new TypeAccess(packageName(), getID()), typeArgumentList); } } /** * @ast method * @aspect GenericsCodegen * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/Jimple1.5Backend/GenericsCodegen.jrag:406 */ public void transformation() { } /** * @ast method * */ public ParClassDecl() { super(); } /** * Initializes the child array to the correct size. * Initializes List and Opt nta children. * @apilevel internal * @ast method * @ast method * */ public void init$Children() { children = new ASTNode[5]; setChild(new List(), 1); setChild(new Opt(), 2); setChild(new List(), 3); setChild(new List(), 4); } /** * @ast method * */ public ParClassDecl(Modifiers p0, String p1, List<Access> p2) { setChild(p0, 0); setID(p1); setChild(p2, 1); } /** * @ast method * */ public ParClassDecl(Modifiers p0, beaver.Symbol p1, List<Access> p2) { setChild(p0, 0); setID(p1); setChild(p2, 1); } /** * @apilevel low-level * @ast method * */ protected int numChildren() { return 2; } /** * @apilevel internal * @ast method * */ public boolean mayHaveRewrite() { return false; } /** * Replaces the Modifiers child. * @param node The new node to replace the Modifiers child. * @apilevel high-level * @ast method * */ public void setModifiers(Modifiers node) { setChild(node, 0); } /** * Retrieves the Modifiers child. * @return The current node used as the Modifiers child. * @apilevel high-level * @ast method * */ public Modifiers getModifiers() { return (Modifiers)getChild(0); } /** * Retrieves the Modifiers child. * <p><em>This method does not invoke AST transformations.</em></p> * @return The current node used as the Modifiers child. * @apilevel low-level * @ast method * */ public Modifiers getModifiersNoTransform() { return (Modifiers)getChildNoTransform(0); } /** * Replaces the lexeme ID. * @param value The new value for the lexeme ID. * @apilevel high-level * @ast method * */ public void setID(String value) { tokenString_ID = value; } /** * JastAdd-internal setter for lexeme ID using the Beaver parser. * @apilevel internal * @ast method * */ 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(); } /** * Retrieves the value for the lexeme ID. * @return The value for the lexeme ID. * @apilevel high-level * @ast method * */ public String getID() { return tokenString_ID != null ? tokenString_ID : ""; } /** * Replaces the Argument list. * @param list The new list node to be used as the Argument list. * @apilevel high-level * @ast method * */ public void setArgumentList(List<Access> list) { setChild(list, 1); } /** * Retrieves the number of children in the Argument list. * @return Number of children in the Argument list. * @apilevel high-level * @ast method * */ public int getNumArgument() { return getArgumentList().getNumChild(); } /** * Retrieves the number of children in the Argument list. * Calling this method will not trigger rewrites.. * @return Number of children in the Argument list. * @apilevel low-level * @ast method * */ public int getNumArgumentNoTransform() { return getArgumentListNoTransform().getNumChildNoTransform(); } /** * Retrieves the element at index {@code i} in the Argument list.. * @param i Index of the element to return. * @return The element at position {@code i} in the Argument list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public Access getArgument(int i) { return (Access)getArgumentList().getChild(i); } /** * Append an element to the Argument list. * @param node The element to append to the Argument list. * @apilevel high-level * @ast method * */ public void addArgument(Access node) { List<Access> list = (parent == null || state == null) ? getArgumentListNoTransform() : getArgumentList(); list.addChild(node); } /** * @apilevel low-level * @ast method * */ public void addArgumentNoTransform(Access node) { List<Access> list = getArgumentListNoTransform(); list.addChild(node); } /** * Replaces the Argument list element at index {@code i} with the new node {@code node}. * @param node The new node to replace the old list element. * @param i The list index of the node to be replaced. * @apilevel high-level * @ast method * */ public void setArgument(Access node, int i) { List<Access> list = getArgumentList(); list.setChild(node, i); } /** * Retrieves the Argument list. * @return The node representing the Argument list. * @apilevel high-level * @ast method * */ public List<Access> getArguments() { return getArgumentList(); } /** * Retrieves the Argument list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the Argument list. * @apilevel low-level * @ast method * */ public List<Access> getArgumentsNoTransform() { return getArgumentListNoTransform(); } /** * Retrieves the Argument list. * @return The node representing the Argument list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<Access> getArgumentList() { List<Access> list = (List<Access>)getChild(1); list.getNumChild(); return list; } /** * Retrieves the Argument list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the Argument list. * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<Access> getArgumentListNoTransform() { return (List<Access>)getChildNoTransform(1); } /** * Replaces the optional node for the SuperClassAccess child. This is the {@code Opt} node containing the child SuperClassAccess, not the actual child! * @param opt The new node to be used as the optional node for the SuperClassAccess child. * @apilevel low-level * @ast method * */ public void setSuperClassAccessOpt(Opt<Access> opt) { setChild(opt, 2); } /** * Check whether the optional SuperClassAccess child exists. * @return {@code true} if the optional SuperClassAccess child exists, {@code false} if it does not. * @apilevel high-level * @ast method * */ public boolean hasSuperClassAccess() { return getSuperClassAccessOpt().getNumChild() != 0; } /** * Retrieves the (optional) SuperClassAccess child. * @return The SuperClassAccess child, if it exists. Returns {@code null} otherwise. * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public Access getSuperClassAccess() { return (Access)getSuperClassAccessOpt().getChild(0); } /** * Replaces the (optional) SuperClassAccess child. * @param node The new node to be used as the SuperClassAccess child. * @apilevel high-level * @ast method * */ public void setSuperClassAccess(Access node) { getSuperClassAccessOpt().setChild(node, 0); } /** * Retrieves the optional node for child SuperClassAccess. This is the {@code Opt} node containing the child SuperClassAccess, not the actual child! * <p><em>This method does not invoke AST transformations.</em></p> * @return The optional node for child SuperClassAccess. * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public Opt<Access> getSuperClassAccessOptNoTransform() { return (Opt<Access>)getChildNoTransform(2); } /** * Retrieves the child position of the optional child SuperClassAccess. * @return The the child position of the optional child SuperClassAccess. * @apilevel low-level * @ast method * */ protected int getSuperClassAccessOptChildPosition() { return 2; } /** * Replaces the Implements list. * @param list The new list node to be used as the Implements list. * @apilevel high-level * @ast method * */ public void setImplementsList(List<Access> list) { setChild(list, 3); } /** * Retrieves the number of children in the Implements list. * @return Number of children in the Implements list. * @apilevel high-level * @ast method * */ public int getNumImplements() { return getImplementsList().getNumChild(); } /** * Retrieves the number of children in the Implements list. * Calling this method will not trigger rewrites.. * @return Number of children in the Implements list. * @apilevel low-level * @ast method * */ public int getNumImplementsNoTransform() { return getImplementsListNoTransform().getNumChildNoTransform(); } /** * Retrieves the element at index {@code i} in the Implements list.. * @param i Index of the element to return. * @return The element at position {@code i} in the Implements list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public Access getImplements(int i) { return (Access)getImplementsList().getChild(i); } /** * Append an element to the Implements list. * @param node The element to append to the Implements list. * @apilevel high-level * @ast method * */ public void addImplements(Access node) { List<Access> list = (parent == null || state == null) ? getImplementsListNoTransform() : getImplementsList(); list.addChild(node); } /** * @apilevel low-level * @ast method * */ public void addImplementsNoTransform(Access node) { List<Access> list = getImplementsListNoTransform(); list.addChild(node); } /** * Replaces the Implements list element at index {@code i} with the new node {@code node}. * @param node The new node to replace the old list element. * @param i The list index of the node to be replaced. * @apilevel high-level * @ast method * */ public void setImplements(Access node, int i) { List<Access> list = getImplementsList(); list.setChild(node, i); } /** * Retrieves the Implements list. * @return The node representing the Implements list. * @apilevel high-level * @ast method * */ public List<Access> getImplementss() { return getImplementsList(); } /** * Retrieves the Implements list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the Implements list. * @apilevel low-level * @ast method * */ public List<Access> getImplementssNoTransform() { return getImplementsListNoTransform(); } /** * Retrieves the Implements list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the Implements list. * @apilevel low-level * @ast method * */ public List<Access> getImplementsListNoTransform() { return (List<Access>)getChildNoTransform(3); } /** * Retrieves the child position of the Implements list. * @return The the child position of the Implements list. * @apilevel low-level * @ast method * */ protected int getImplementsListChildPosition() { return 3; } /** * Replaces the BodyDecl list. * @param list The new list node to be used as the BodyDecl list. * @apilevel high-level * @ast method * */ public void setBodyDeclList(List<BodyDecl> list) { setChild(list, 4); } /** * Retrieves the number of children in the BodyDecl list. * @return Number of children in the BodyDecl list. * @apilevel high-level * @ast method * */ public int getNumBodyDecl() { return getBodyDeclList().getNumChild(); } /** * Retrieves the number of children in the BodyDecl list. * Calling this method will not trigger rewrites.. * @return Number of children in the BodyDecl list. * @apilevel low-level * @ast method * */ public int getNumBodyDeclNoTransform() { return getBodyDeclListNoTransform().getNumChildNoTransform(); } /** * Retrieves the element at index {@code i} in the BodyDecl list.. * @param i Index of the element to return. * @return The element at position {@code i} in the BodyDecl list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public BodyDecl getBodyDecl(int i) { return (BodyDecl)getBodyDeclList().getChild(i); } /** * Append an element to the BodyDecl list. * @param node The element to append to the BodyDecl list. * @apilevel high-level * @ast method * */ public void addBodyDecl(BodyDecl node) { List<BodyDecl> list = (parent == null || state == null) ? getBodyDeclListNoTransform() : getBodyDeclList(); list.addChild(node); } /** * @apilevel low-level * @ast method * */ public void addBodyDeclNoTransform(BodyDecl node) { List<BodyDecl> list = getBodyDeclListNoTransform(); list.addChild(node); } /** * Replaces the BodyDecl list element at index {@code i} with the new node {@code node}. * @param node The new node to replace the old list element. * @param i The list index of the node to be replaced. * @apilevel high-level * @ast method * */ public void setBodyDecl(BodyDecl node, int i) { List<BodyDecl> list = getBodyDeclList(); list.setChild(node, i); } /** * Retrieves the BodyDecl list. * @return The node representing the BodyDecl list. * @apilevel high-level * @ast method * */ public List<BodyDecl> getBodyDecls() { return getBodyDeclList(); } /** * Retrieves the BodyDecl list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the BodyDecl list. * @apilevel low-level * @ast method * */ public List<BodyDecl> getBodyDeclsNoTransform() { return getBodyDeclListNoTransform(); } /** * Retrieves the BodyDecl list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the BodyDecl list. * @apilevel low-level * @ast method * */ public List<BodyDecl> getBodyDeclListNoTransform() { return (List<BodyDecl>)getChildNoTransform(4); } /** * Retrieves the child position of the BodyDecl list. * @return The the child position of the BodyDecl list. * @apilevel low-level * @ast method * */ protected int getBodyDeclListChildPosition() { return 4; } /** * @apilevel internal */ protected int involvesTypeParameters_visited = -1; /** * @apilevel internal */ protected boolean involvesTypeParameters_computed = false; /** * @apilevel internal */ protected boolean involvesTypeParameters_initialized = false; /** * @apilevel internal */ protected boolean involvesTypeParameters_value; /** * @attribute syn * @aspect GenericMethodsInference * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericMethodsInference.jrag:18 */ @SuppressWarnings({"unchecked", "cast"}) public boolean involvesTypeParameters() { if(involvesTypeParameters_computed) { return involvesTypeParameters_value; } ASTNode$State state = state(); if (!involvesTypeParameters_initialized) { involvesTypeParameters_initialized = true; involvesTypeParameters_value = false; } if (!state.IN_CIRCLE) { state.IN_CIRCLE = true; int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); do { involvesTypeParameters_visited = state.CIRCLE_INDEX; state.CHANGE = false; boolean new_involvesTypeParameters_value = involvesTypeParameters_compute(); if (new_involvesTypeParameters_value!=involvesTypeParameters_value) state.CHANGE = true; involvesTypeParameters_value = new_involvesTypeParameters_value; state.CIRCLE_INDEX++; } while (state.CHANGE); if(isFinal && num == state().boundariesCrossed) { involvesTypeParameters_computed = true; } else { state.RESET_CYCLE = true; involvesTypeParameters_compute(); state.RESET_CYCLE = false; involvesTypeParameters_computed = false; involvesTypeParameters_initialized = false; } state.IN_CIRCLE = false; return involvesTypeParameters_value; } if(involvesTypeParameters_visited != state.CIRCLE_INDEX) { involvesTypeParameters_visited = state.CIRCLE_INDEX; if (state.RESET_CYCLE) { involvesTypeParameters_computed = false; involvesTypeParameters_initialized = false; involvesTypeParameters_visited = -1; return involvesTypeParameters_value; } boolean new_involvesTypeParameters_value = involvesTypeParameters_compute(); if (new_involvesTypeParameters_value!=involvesTypeParameters_value) state.CHANGE = true; involvesTypeParameters_value = new_involvesTypeParameters_value; return involvesTypeParameters_value; } return involvesTypeParameters_value; } /** * @apilevel internal */ private boolean involvesTypeParameters_compute() { for(int i = 0; i < getNumArgument(); i++) if(getArgument(i).type().involvesTypeParameters()) return true; return false; } /** * @attribute syn * @aspect NestedTypes * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeAnalysis.jrag:569 */ public TypeDecl hostType() { ASTNode$State state = state(); try { return original(); } finally { } } /** * @attribute syn * @aspect NestedTypes * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeAnalysis.jrag:497 */ public TypeDecl topLevelType() { ASTNode$State state = state(); try { return erasure().topLevelType(); } finally { } } /** * @attribute syn * @aspect Generics * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:245 */ public boolean isRawType() { ASTNode$State state = state(); try { return isNestedType() && enclosingType().isRawType(); } finally { } } /** * @apilevel internal */ protected boolean erasure_computed = false; /** * @apilevel internal */ protected TypeDecl erasure_value; /** * @attribute syn * @aspect GenericsErasure * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:350 */ @SuppressWarnings({"unchecked", "cast"}) public TypeDecl erasure() { if(erasure_computed) { return erasure_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); erasure_value = erasure_compute(); if(isFinal && num == state().boundariesCrossed) erasure_computed = true; return erasure_value; } /** * @apilevel internal */ private TypeDecl erasure_compute() { return genericDecl(); } /** * @apilevel internal */ protected boolean getSuperClassAccessOpt_computed = false; /** * @apilevel internal */ protected Opt getSuperClassAccessOpt_value; /** * @attribute syn nta * @aspect LookupParTypeDecl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:1015 */ @SuppressWarnings({"unchecked", "cast"}) public Opt getSuperClassAccessOpt() { if(getSuperClassAccessOpt_computed) { return (Opt) getChild(getSuperClassAccessOptChildPosition()); } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); getSuperClassAccessOpt_value = getSuperClassAccessOpt_compute(); setSuperClassAccessOpt(getSuperClassAccessOpt_value); if(isFinal && num == state().boundariesCrossed) getSuperClassAccessOpt_computed = true; return (Opt) getChild(getSuperClassAccessOptChildPosition()); } /** * @apilevel internal */ private Opt getSuperClassAccessOpt_compute() { GenericClassDecl decl = (GenericClassDecl)genericDecl(); Opt opt; //System.err.println("Begin substituting extends clause"); if(decl.hasSuperClassAccess()) opt = new Opt((decl.getSuperClassAccess().type().substitute(this))); else opt = new Opt(); //System.err.println("End substituting extends clause"); return opt; } /** * @apilevel internal */ protected boolean getImplementsList_computed = false; /** * @apilevel internal */ protected List getImplementsList_value; /** * @attribute syn nta * @aspect LookupParTypeDecl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:1026 */ @SuppressWarnings({"unchecked", "cast"}) public List getImplementsList() { if(getImplementsList_computed) { return (List) getChild(getImplementsListChildPosition()); } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); getImplementsList_value = getImplementsList_compute(); setImplementsList(getImplementsList_value); if(isFinal && num == state().boundariesCrossed) getImplementsList_computed = true; return (List) getChild(getImplementsListChildPosition()); } /** * @apilevel internal */ private List getImplementsList_compute() { GenericClassDecl decl = (GenericClassDecl)genericDecl(); //System.err.println("Begin substituting implements list"); List list = decl.getImplementsList().substitute(this); //System.err.println("End substituting implements list"); return list; } /** * @apilevel internal */ protected boolean getBodyDeclList_computed = false; /** * @apilevel internal */ protected List getBodyDeclList_value; /** * @attribute syn nta * @aspect LookupParTypeDecl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:1035 */ @SuppressWarnings({"unchecked", "cast"}) public List getBodyDeclList() { if(getBodyDeclList_computed) { return (List) getChild(getBodyDeclListChildPosition()); } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); getBodyDeclList_value = getBodyDeclList_compute(); setBodyDeclList(getBodyDeclList_value); if(isFinal && num == state().boundariesCrossed) getBodyDeclList_computed = true; return (List) getChild(getBodyDeclListChildPosition()); } /** * @apilevel internal */ private List getBodyDeclList_compute() { return new BodyDeclList(); } /** * @attribute syn * @aspect GenericsSubtype * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericsSubtype.jrag:14 */ public boolean supertypeGenericClassDecl(GenericClassDecl type) { ASTNode$State state = state(); try { return type.subtype(genericDecl().original()); } finally { } } /** * @attribute syn * @aspect GenericsSubtype * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericsSubtype.jrag:421 */ public boolean supertypeClassDecl(ClassDecl type) { ASTNode$State state = state(); try { return super.supertypeClassDecl(type); } finally { } } protected java.util.Map subtype_TypeDecl_values; /** * @attribute syn * @aspect GenericsSubtype * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericsSubtype.jrag:124 */ @SuppressWarnings({"unchecked", "cast"}) public boolean subtype(TypeDecl type) { Object _parameters = type; if(subtype_TypeDecl_values == null) subtype_TypeDecl_values = new java.util.HashMap(4); ASTNode$State.CircularValue _value; if(subtype_TypeDecl_values.containsKey(_parameters)) { Object _o = subtype_TypeDecl_values.get(_parameters); if(!(_o instanceof ASTNode$State.CircularValue)) { return ((Boolean)_o).booleanValue(); } else _value = (ASTNode$State.CircularValue)_o; } else { _value = new ASTNode$State.CircularValue(); subtype_TypeDecl_values.put(_parameters, _value); _value.value = Boolean.valueOf(true); } ASTNode$State state = state(); if (!state.IN_CIRCLE) { state.IN_CIRCLE = true; int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); boolean new_subtype_TypeDecl_value; do { _value.visited = new Integer(state.CIRCLE_INDEX); state.CHANGE = false; new_subtype_TypeDecl_value = subtype_compute(type); if (new_subtype_TypeDecl_value!=((Boolean)_value.value).booleanValue()) { state.CHANGE = true; _value.value = Boolean.valueOf(new_subtype_TypeDecl_value); } state.CIRCLE_INDEX++; } while (state.CHANGE); if(isFinal && num == state().boundariesCrossed) { subtype_TypeDecl_values.put(_parameters, new_subtype_TypeDecl_value); } else { subtype_TypeDecl_values.remove(_parameters); state.RESET_CYCLE = true; subtype_compute(type); state.RESET_CYCLE = false; } state.IN_CIRCLE = false; return new_subtype_TypeDecl_value; } if(!new Integer(state.CIRCLE_INDEX).equals(_value.visited)) { _value.visited = new Integer(state.CIRCLE_INDEX); boolean new_subtype_TypeDecl_value = subtype_compute(type); if (state.RESET_CYCLE) { subtype_TypeDecl_values.remove(_parameters); } else if (new_subtype_TypeDecl_value!=((Boolean)_value.value).booleanValue()) { state.CHANGE = true; _value.value = new_subtype_TypeDecl_value; } return new_subtype_TypeDecl_value; } return ((Boolean)_value.value).booleanValue(); } /** * @apilevel internal */ private boolean subtype_compute(TypeDecl type) { return type.supertypeParClassDecl(this); } /** * @attribute syn * @aspect GenericsSubtype * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericsSubtype.jrag:26 */ public boolean supertypeRawClassDecl(RawClassDecl type) { ASTNode$State state = state(); try { return type.genericDecl().original().subtype(genericDecl().original()); } finally { } } /** * @attribute syn * @aspect GenericsSubtype * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericsSubtype.jrag:30 */ public boolean supertypeRawInterfaceDecl(RawInterfaceDecl type) { ASTNode$State state = state(); try { return type.genericDecl().original().subtype(genericDecl().original()); } finally { } } protected java.util.Map sameStructure_TypeDecl_values; /** * @attribute syn * @aspect GenericsSubtype * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericsSubtype.jrag:179 */ @SuppressWarnings({"unchecked", "cast"}) public boolean sameStructure(TypeDecl t) { Object _parameters = t; if(sameStructure_TypeDecl_values == null) sameStructure_TypeDecl_values = new java.util.HashMap(4); ASTNode$State.CircularValue _value; if(sameStructure_TypeDecl_values.containsKey(_parameters)) { Object _o = sameStructure_TypeDecl_values.get(_parameters); if(!(_o instanceof ASTNode$State.CircularValue)) { return ((Boolean)_o).booleanValue(); } else _value = (ASTNode$State.CircularValue)_o; } else { _value = new ASTNode$State.CircularValue(); sameStructure_TypeDecl_values.put(_parameters, _value); _value.value = Boolean.valueOf(true); } ASTNode$State state = state(); if (!state.IN_CIRCLE) { state.IN_CIRCLE = true; int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); boolean new_sameStructure_TypeDecl_value; do { _value.visited = new Integer(state.CIRCLE_INDEX); state.CHANGE = false; new_sameStructure_TypeDecl_value = sameStructure_compute(t); if (new_sameStructure_TypeDecl_value!=((Boolean)_value.value).booleanValue()) { state.CHANGE = true; _value.value = Boolean.valueOf(new_sameStructure_TypeDecl_value); } state.CIRCLE_INDEX++; } while (state.CHANGE); if(isFinal && num == state().boundariesCrossed) { sameStructure_TypeDecl_values.put(_parameters, new_sameStructure_TypeDecl_value); } else { sameStructure_TypeDecl_values.remove(_parameters); state.RESET_CYCLE = true; sameStructure_compute(t); state.RESET_CYCLE = false; } state.IN_CIRCLE = false; return new_sameStructure_TypeDecl_value; } if(!new Integer(state.CIRCLE_INDEX).equals(_value.visited)) { _value.visited = new Integer(state.CIRCLE_INDEX); boolean new_sameStructure_TypeDecl_value = sameStructure_compute(t); if (state.RESET_CYCLE) { sameStructure_TypeDecl_values.remove(_parameters); } else if (new_sameStructure_TypeDecl_value!=((Boolean)_value.value).booleanValue()) { state.CHANGE = true; _value.value = new_sameStructure_TypeDecl_value; } return new_sameStructure_TypeDecl_value; } return ((Boolean)_value.value).booleanValue(); } /** * @apilevel internal */ private boolean sameStructure_compute(TypeDecl t) { if(!(t instanceof ParClassDecl)) return false; ParClassDecl type = (ParClassDecl)t; if(type.genericDecl().original() == genericDecl().original() && type.getNumArgument() == getNumArgument()) { for(int i = 0; i < getNumArgument(); i++) if(!type.getArgument(i).type().sameStructure(getArgument(i).type())) return false; if(isNestedType() && type.isNestedType()) return type.enclosingType().sameStructure(enclosingType()); return true; } return false; } /** * @attribute syn * @aspect GenericsSubtype * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericsSubtype.jrag:125 */ public boolean supertypeParClassDecl(ParClassDecl type) { ASTNode$State state = state(); try { if(type.genericDecl().original() == genericDecl().original() && type.getNumArgument() == getNumArgument()) { for(int i = 0; i < getNumArgument(); i++) if(!type.getArgument(i).type().containedIn(getArgument(i).type())) return false; if(isNestedType() && type.isNestedType()) return type.enclosingType().subtype(enclosingType()); return true; } return supertypeClassDecl(type); } finally { } } /** * @attribute syn * @aspect GenericsSubtype * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericsSubtype.jrag:129 */ public boolean supertypeParInterfaceDecl(ParInterfaceDecl type) { ASTNode$State state = state(); try { return false; } finally { } } protected java.util.Map instanceOf_TypeDecl_values; /** * @attribute syn * @aspect GenericsSubtype * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericsSubtype.jrag:396 */ @SuppressWarnings({"unchecked", "cast"}) public boolean instanceOf(TypeDecl type) { Object _parameters = type; if(instanceOf_TypeDecl_values == null) instanceOf_TypeDecl_values = new java.util.HashMap(4); if(instanceOf_TypeDecl_values.containsKey(_parameters)) { return ((Boolean)instanceOf_TypeDecl_values.get(_parameters)).booleanValue(); } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); boolean instanceOf_TypeDecl_value = instanceOf_compute(type); if(isFinal && num == state().boundariesCrossed) instanceOf_TypeDecl_values.put(_parameters, Boolean.valueOf(instanceOf_TypeDecl_value)); return instanceOf_TypeDecl_value; } /** * @apilevel internal */ private boolean instanceOf_compute(TypeDecl type) { return subtype(type); } /** * A type is reifiable if it either refers to a non-parameterized type, * is a raw type, is a parameterized type with only unbound wildcard * parameters or is an array type with a reifiable type parameter. * * @see "JLSv3 &sect;4.7" * @attribute syn * @aspect SafeVarargs * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/SafeVarargs.jrag:106 */ public boolean isReifiable() { ASTNode$State state = state(); try { if (isRawType()) return true; for (int i = 0; i < getNumArgument(); ++i) { if (!getArgument(i).type().isWildcard()) return false; } return true; } finally { } } /** * @attribute syn * @aspect Generics * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:244 */ public boolean isParameterizedType() { ASTNode$State state = state(); try { return true; } finally { } } /** * @attribute syn * @aspect GenericsTypeCheck * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:380 */ public boolean sameArgument(ParTypeDecl decl) { ASTNode$State state = state(); try { if(this == decl) return true; if(genericDecl() != decl.genericDecl()) return false; for(int i = 0; i < getNumArgument(); i++) { TypeDecl t1 = getArgument(i).type(); TypeDecl t2 = decl.getArgument(i).type(); if(t1 instanceof ParTypeDecl && t2 instanceof ParTypeDecl) { if(!((ParTypeDecl)t1).sameArgument((ParTypeDecl)t2)) return false; } else { if(t1 != t2) return false; } } return true; } finally { } } /** * @attribute syn * @aspect LookupParTypeDecl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:577 */ public boolean sameSignature(Access a) { ASTNode$State state = state(); try { if(a instanceof ParTypeAccess) { ParTypeAccess ta = (ParTypeAccess)a; if(genericDecl() != ta.genericDecl()) return false; if(getNumArgument() != ta.getNumTypeArgument()) return false; for(int i = 0; i < getNumArgument(); i++) if(!getArgument(i).type().sameSignature(ta.getTypeArgument(i))) return false; return true; } else if(a instanceof TypeAccess && ((TypeAccess)a).isRaw()) return false; return super.sameSignature(a); } finally { } } protected java.util.Map sameSignature_ArrayList_values; /** * @attribute syn * @aspect LookupParTypeDecl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:612 */ @SuppressWarnings({"unchecked", "cast"}) public boolean sameSignature(ArrayList list) { Object _parameters = list; if(sameSignature_ArrayList_values == null) sameSignature_ArrayList_values = new java.util.HashMap(4); ASTNode$State.CircularValue _value; if(sameSignature_ArrayList_values.containsKey(_parameters)) { Object _o = sameSignature_ArrayList_values.get(_parameters); if(!(_o instanceof ASTNode$State.CircularValue)) { return ((Boolean)_o).booleanValue(); } else _value = (ASTNode$State.CircularValue)_o; } else { _value = new ASTNode$State.CircularValue(); sameSignature_ArrayList_values.put(_parameters, _value); _value.value = Boolean.valueOf(true); } ASTNode$State state = state(); if (!state.IN_CIRCLE) { state.IN_CIRCLE = true; int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); boolean new_sameSignature_ArrayList_value; do { _value.visited = new Integer(state.CIRCLE_INDEX); state.CHANGE = false; new_sameSignature_ArrayList_value = sameSignature_compute(list); if (new_sameSignature_ArrayList_value!=((Boolean)_value.value).booleanValue()) { state.CHANGE = true; _value.value = Boolean.valueOf(new_sameSignature_ArrayList_value); } state.CIRCLE_INDEX++; } while (state.CHANGE); if(isFinal && num == state().boundariesCrossed) { sameSignature_ArrayList_values.put(_parameters, new_sameSignature_ArrayList_value); } else { sameSignature_ArrayList_values.remove(_parameters); state.RESET_CYCLE = true; sameSignature_compute(list); state.RESET_CYCLE = false; } state.IN_CIRCLE = false; return new_sameSignature_ArrayList_value; } if(!new Integer(state.CIRCLE_INDEX).equals(_value.visited)) { _value.visited = new Integer(state.CIRCLE_INDEX); boolean new_sameSignature_ArrayList_value = sameSignature_compute(list); if (state.RESET_CYCLE) { sameSignature_ArrayList_values.remove(_parameters); } else if (new_sameSignature_ArrayList_value!=((Boolean)_value.value).booleanValue()) { state.CHANGE = true; _value.value = new_sameSignature_ArrayList_value; } return new_sameSignature_ArrayList_value; } return ((Boolean)_value.value).booleanValue(); } /** * @apilevel internal */ private boolean sameSignature_compute(ArrayList list) { if(getNumArgument() != list.size()) return false; for(int i = 0; i < list.size(); i++) if(getArgument(i).type() != list.get(i)) return false; return true; } /** * @apilevel internal */ protected int usesTypeVariable_visited = -1; /** * @apilevel internal */ protected boolean usesTypeVariable_computed = false; /** * @apilevel internal */ protected boolean usesTypeVariable_initialized = false; /** * @apilevel internal */ protected boolean usesTypeVariable_value; /** * @attribute syn * @aspect LookupParTypeDecl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:1069 */ @SuppressWarnings({"unchecked", "cast"}) public boolean usesTypeVariable() { if(usesTypeVariable_computed) { return usesTypeVariable_value; } ASTNode$State state = state(); if (!usesTypeVariable_initialized) { usesTypeVariable_initialized = true; usesTypeVariable_value = false; } if (!state.IN_CIRCLE) { state.IN_CIRCLE = true; int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); do { usesTypeVariable_visited = state.CIRCLE_INDEX; state.CHANGE = false; boolean new_usesTypeVariable_value = usesTypeVariable_compute(); if (new_usesTypeVariable_value!=usesTypeVariable_value) state.CHANGE = true; usesTypeVariable_value = new_usesTypeVariable_value; state.CIRCLE_INDEX++; } while (state.CHANGE); if(isFinal && num == state().boundariesCrossed) { usesTypeVariable_computed = true; } else { state.RESET_CYCLE = true; usesTypeVariable_compute(); state.RESET_CYCLE = false; usesTypeVariable_computed = false; usesTypeVariable_initialized = false; } state.IN_CIRCLE = false; return usesTypeVariable_value; } if(usesTypeVariable_visited != state.CIRCLE_INDEX) { usesTypeVariable_visited = state.CIRCLE_INDEX; if (state.RESET_CYCLE) { usesTypeVariable_computed = false; usesTypeVariable_initialized = false; usesTypeVariable_visited = -1; return usesTypeVariable_value; } boolean new_usesTypeVariable_value = usesTypeVariable_compute(); if (new_usesTypeVariable_value!=usesTypeVariable_value) state.CHANGE = true; usesTypeVariable_value = new_usesTypeVariable_value; return usesTypeVariable_value; } return usesTypeVariable_value; } /** * @apilevel internal */ private boolean usesTypeVariable_compute() { if(super.usesTypeVariable()) return true; for(int i = 0; i < getNumArgument(); i++) if(getArgument(i).type().usesTypeVariable()) return true; return false; } /** * @attribute syn * @aspect LookupParTypeDecl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:1306 */ public TypeDecl original() { ASTNode$State state = state(); try { return genericDecl().original(); } finally { } } /** * @apilevel internal */ protected boolean sourceTypeDecl_computed = false; /** * @apilevel internal */ protected TypeDecl sourceTypeDecl_value; /** * @attribute syn * @aspect SourceDeclarations * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:1505 */ @SuppressWarnings({"unchecked", "cast"}) public TypeDecl sourceTypeDecl() { if(sourceTypeDecl_computed) { return sourceTypeDecl_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); sourceTypeDecl_value = sourceTypeDecl_compute(); if(isFinal && num == state().boundariesCrossed) sourceTypeDecl_computed = true; return sourceTypeDecl_value; } /** * @apilevel internal */ private TypeDecl sourceTypeDecl_compute() { return genericDecl().original().sourceTypeDecl(); } /** * @apilevel internal */ protected boolean fullName_computed = false; /** * @apilevel internal */ protected String fullName_value; /** * @attribute syn * @aspect GenericsParTypeDecl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericsParTypeDecl.jrag:12 */ @SuppressWarnings({"unchecked", "cast"}) public String fullName() { if(fullName_computed) { return fullName_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); fullName_value = fullName_compute(); if(isFinal && num == state().boundariesCrossed) fullName_computed = true; return fullName_value; } /** * @apilevel internal */ private String fullName_compute() { if(isNestedType()) return enclosingType().fullName() + "." + nameWithArgs(); String packageName = packageName(); if(packageName.equals("")) return nameWithArgs(); return packageName + "." + nameWithArgs(); } /** * @apilevel internal */ protected boolean typeName_computed = false; /** * @apilevel internal */ protected String typeName_value; /** * @attribute syn * @aspect GenericsParTypeDecl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericsParTypeDecl.jrag:21 */ @SuppressWarnings({"unchecked", "cast"}) public String typeName() { if(typeName_computed) { return typeName_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); typeName_value = typeName_compute(); if(isFinal && num == state().boundariesCrossed) typeName_computed = true; return typeName_value; } /** * @apilevel internal */ private String typeName_compute() { if(isNestedType()) return enclosingType().typeName() + "." + nameWithArgs(); String packageName = packageName(); if(packageName.equals("") || packageName.equals(PRIMITIVE_PACKAGE_NAME)) return nameWithArgs(); return packageName + "." + nameWithArgs(); } /** * @attribute syn * @aspect GenericsParTypeDecl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericsParTypeDecl.jrag:30 */ public String nameWithArgs() { ASTNode$State state = state(); try { StringBuffer s = new StringBuffer(); s.append(name()); s.append("<"); for(int i = 0; i < getNumArgument(); i++) { if(i != 0) s.append(", "); s.append(getArgument(i).type().fullName()); } s.append(">"); return s.toString(); } finally { } } /** * @apilevel internal */ protected boolean unimplementedMethods_computed = false; /** * @apilevel internal */ protected Collection unimplementedMethods_value; /** * @attribute syn * @aspect MethodSignature15 * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/MethodSignature.jrag:406 */ @SuppressWarnings({"unchecked", "cast"}) public Collection unimplementedMethods() { if(unimplementedMethods_computed) { return unimplementedMethods_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); unimplementedMethods_value = unimplementedMethods_compute(); if(isFinal && num == state().boundariesCrossed) unimplementedMethods_computed = true; return unimplementedMethods_value; } /** * @apilevel internal */ private Collection unimplementedMethods_compute() { HashSet set = new HashSet(); HashSet result = new HashSet(); for(Iterator iter = genericDecl().unimplementedMethods().iterator(); iter.hasNext(); ) { MethodDecl m = (MethodDecl)iter.next(); set.add(m.sourceMethodDecl()); } for(Iterator iter = super.unimplementedMethods().iterator(); iter.hasNext(); ) { MethodDecl m = (MethodDecl)iter.next(); if(set.contains(m.sourceMethodDecl())) result.add(m); } return result; } /** * @apilevel internal */ protected boolean localMethodsSignatureMap_computed = false; /** * @apilevel internal */ protected HashMap localMethodsSignatureMap_value; /** * @attribute syn * @aspect LookupParTypeDecl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:1084 */ @SuppressWarnings({"unchecked", "cast"}) public HashMap localMethodsSignatureMap() { if(localMethodsSignatureMap_computed) { return localMethodsSignatureMap_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); localMethodsSignatureMap_value = localMethodsSignatureMap_compute(); if(true) localMethodsSignatureMap_computed = true; return localMethodsSignatureMap_value; } /** * @apilevel internal */ private HashMap localMethodsSignatureMap_compute() { HashMap map = new HashMap(); for(Iterator iter = original().localMethodsIterator(); iter.hasNext(); ) { MethodDecl decl = (MethodDecl)iter.next(); /* ES removing this: if(!decl.isStatic() && (decl.usesTypeVariable() || isRawType())) { BodyDecl b = decl.substitutedBodyDecl(this); addBodyDecl(b); // Here we should access b through an ordinary // child accessor instead of setting is$Final directly, // however doing so appears to cause unexpected behaviour! b.is$Final = true; decl = (MethodDecl) b; } map.put(decl.signature(), decl); * and replacing with: */ if(!decl.isStatic() && (decl.usesTypeVariable() || isRawType())) { BodyDecl copyDecl = ((BodyDeclList)getBodyDeclList()).localMethodSignatureCopy(decl, this); decl = (MethodDecl) copyDecl; } map.put(decl.signature(), decl); } return map; } protected java.util.Map localFields_String_values; /** * @attribute syn * @aspect LookupParTypeDecl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:1119 */ @SuppressWarnings({"unchecked", "cast"}) public SimpleSet localFields(String name) { Object _parameters = name; if(localFields_String_values == null) localFields_String_values = new java.util.HashMap(4); if(localFields_String_values.containsKey(_parameters)) { return (SimpleSet)localFields_String_values.get(_parameters); } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); SimpleSet localFields_String_value = localFields_compute(name); if(true) localFields_String_values.put(_parameters, localFields_String_value); return localFields_String_value; } /** * @apilevel internal */ private SimpleSet localFields_compute(String name) { SimpleSet set = SimpleSet.emptySet; for(Iterator iter = original().localFields(name).iterator(); iter.hasNext(); ) { FieldDeclaration f = (FieldDeclaration)iter.next(); /* ES removing this: if(!f.isStatic() && (f.usesTypeVariable() || isRawType())) { BodyDecl b = f.substitutedBodyDecl(this); addBodyDecl(b); // Here we should access b through an ordinary // child accessor instead of setting is$Final directly, // however doing so appears to cause unexpected behaviour! b.is$Final = true; f = (FieldDeclaration) b; } set = set.add(f); * and replacing with: */ if(!f.isStatic() && (f.usesTypeVariable() || isRawType())) { BodyDecl fCopy = ((BodyDeclList)getBodyDeclList()).localFieldCopy(f, this); f = (FieldDeclaration) fCopy; } set = set.add(f); } return set; } protected java.util.Map localTypeDecls_String_values; /** * @attribute syn * @aspect LookupParTypeDecl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:1154 */ @SuppressWarnings({"unchecked", "cast"}) public SimpleSet localTypeDecls(String name) { Object _parameters = name; if(localTypeDecls_String_values == null) localTypeDecls_String_values = new java.util.HashMap(4); ASTNode$State.CircularValue _value; if(localTypeDecls_String_values.containsKey(_parameters)) { Object _o = localTypeDecls_String_values.get(_parameters); if(!(_o instanceof ASTNode$State.CircularValue)) { return (SimpleSet)_o; } else _value = (ASTNode$State.CircularValue)_o; } else { _value = new ASTNode$State.CircularValue(); localTypeDecls_String_values.put(_parameters, _value); _value.value = SimpleSet.emptySet; } ASTNode$State state = state(); if (!state.IN_CIRCLE) { state.IN_CIRCLE = true; int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); SimpleSet new_localTypeDecls_String_value; do { _value.visited = new Integer(state.CIRCLE_INDEX); state.CHANGE = false; new_localTypeDecls_String_value = localTypeDecls_compute(name); if ((new_localTypeDecls_String_value==null && (SimpleSet)_value.value!=null) || (new_localTypeDecls_String_value!=null && !new_localTypeDecls_String_value.equals((SimpleSet)_value.value))) { state.CHANGE = true; _value.value = new_localTypeDecls_String_value; } state.CIRCLE_INDEX++; } while (state.CHANGE); if(true) { localTypeDecls_String_values.put(_parameters, new_localTypeDecls_String_value); } else { localTypeDecls_String_values.remove(_parameters); state.RESET_CYCLE = true; localTypeDecls_compute(name); state.RESET_CYCLE = false; } state.IN_CIRCLE = false; return new_localTypeDecls_String_value; } if(!new Integer(state.CIRCLE_INDEX).equals(_value.visited)) { _value.visited = new Integer(state.CIRCLE_INDEX); SimpleSet new_localTypeDecls_String_value = localTypeDecls_compute(name); if (state.RESET_CYCLE) { localTypeDecls_String_values.remove(_parameters); } else if ((new_localTypeDecls_String_value==null && (SimpleSet)_value.value!=null) || (new_localTypeDecls_String_value!=null && !new_localTypeDecls_String_value.equals((SimpleSet)_value.value))) { state.CHANGE = true; _value.value = new_localTypeDecls_String_value; } return new_localTypeDecls_String_value; } return (SimpleSet)_value.value; } /** * @apilevel internal */ private SimpleSet localTypeDecls_compute(String name) { SimpleSet set = SimpleSet.emptySet; for(Iterator iter = original().localTypeDecls(name).iterator(); iter.hasNext(); ) { TypeDecl t = (TypeDecl)iter.next(); /* ES: removing this: if(t.isStatic()) set = set.add(t); else { BodyDecl b; TypeDecl typeDecl; if(t instanceof ClassDecl) { ClassDecl classDecl = (ClassDecl)t; typeDecl = classDecl.substitutedClassDecl(this); b = new MemberClassDecl((ClassDecl)typeDecl); addBodyDecl(b); // Here we should access b through an ordinary // child accessor instead of setting is$Final directly, // however doing so appears to cause unexpected behaviour! b.is$Final = true; set = set.add(typeDecl); } else if(t instanceof InterfaceDecl) { InterfaceDecl interfaceDecl = (InterfaceDecl)t; typeDecl = interfaceDecl.substitutedInterfaceDecl(this); b = new MemberInterfaceDecl((InterfaceDecl)typeDecl); addBodyDecl(b); // Here we should access b through an ordinary // child accessor instead of setting is$Final directly, // however doing so appears to cause unexpected behaviour! b.is$Final = true; set = set.add(typeDecl); } } * and replacing with: */ if(t.isStatic()) { set = set.add(t); } else if (t instanceof ClassDecl) { MemberClassDecl copy = ((BodyDeclList)getBodyDeclList()).localClassDeclCopy((ClassDecl)t, this); set = set.add(copy.getClassDecl()); } else if (t instanceof InterfaceDecl) { MemberInterfaceDecl copy = ((BodyDeclList)getBodyDeclList()).localInterfaceDeclCopy((InterfaceDecl)t, this); set = set.add(copy.getInterfaceDecl()); } } return set; } /** * @apilevel internal */ protected boolean constructors_computed = false; /** * @apilevel internal */ protected Collection constructors_value; /** * @attribute syn * @aspect LookupParTypeDecl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:1213 */ @SuppressWarnings({"unchecked", "cast"}) public Collection constructors() { if(constructors_computed) { return constructors_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); constructors_value = constructors_compute(); if(isFinal && num == state().boundariesCrossed) constructors_computed = true; return constructors_value; } /** * @apilevel internal */ private Collection constructors_compute() { Collection set = new ArrayList(); for(Iterator iter = original().constructors().iterator(); iter.hasNext(); ) { ConstructorDecl c = (ConstructorDecl)iter.next(); /* ES: removing this: BodyDecl b = c.substitutedBodyDecl(this); addBodyDecl(b); // Here we should access b through an ordinary // child accessor instead of setting is$Final directly, // however doing so appears to cause unexpected behaviour! b.is$Final = true; * and replacing with: */ BodyDecl b = ((BodyDeclList)getBodyDeclList()).constructorCopy(c, this); set.add(b); } return set; } /** * @apilevel internal */ protected boolean genericDecl_computed = false; /** * @apilevel internal */ protected TypeDecl genericDecl_value; /** * @attribute inh * @aspect GenericsParTypeDecl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericsParTypeDecl.jrag:45 */ @SuppressWarnings({"unchecked", "cast"}) public TypeDecl genericDecl() { if(genericDecl_computed) { return genericDecl_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); genericDecl_value = getParent().Define_TypeDecl_genericDecl(this, null); if(isFinal && num == state().boundariesCrossed) genericDecl_computed = true; return genericDecl_value; } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:476 * @apilevel internal */ public NameType Define_NameType_nameType(ASTNode caller, ASTNode child) { if(caller == getArgumentListNoTransform()) { int childIndex = caller.getIndexOfChild(child); return NameType.TYPE_NAME; } else { return super.Define_NameType_nameType(caller, child); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericsParTypeDecl.jrag:52 * @apilevel internal */ public TypeDecl Define_TypeDecl_genericDecl(ASTNode caller, ASTNode child) { if(caller == getBodyDeclListNoTransform()) { int index = caller.getIndexOfChild(child); { if(getBodyDecl(index) instanceof MemberTypeDecl) { MemberTypeDecl m = (MemberTypeDecl)getBodyDecl(index); return extractSingleType(genericDecl().memberTypes(m.typeDecl().name())); } return genericDecl(); } } else { return getParent().Define_TypeDecl_genericDecl(this, caller); } } /** * @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); } }
67,392
31.322782
280
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/ParClassInstanceExpr.java
/* This file was generated with JastAdd2 (http://jastadd.org) version R20130212 (r1031) */ package soot.JastAddJ; import java.util.HashSet; 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; /** * @production ParClassInstanceExpr : {@link ClassInstanceExpr} ::= <span class="component">TypeArgument:{@link Access}*</span>; * @ast node * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericMethods.ast:18 */ public class ParClassInstanceExpr extends ClassInstanceExpr implements Cloneable { /** * @apilevel low-level */ public void flushCache() { super.flushCache(); } /** * @apilevel internal */ public void flushCollectionCache() { super.flushCollectionCache(); } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public ParClassInstanceExpr clone() throws CloneNotSupportedException { ParClassInstanceExpr node = (ParClassInstanceExpr)super.clone(); node.in$Circle(false); node.is$Final(false); return node; } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public ParClassInstanceExpr copy() { try { ParClassInstanceExpr node = (ParClassInstanceExpr) clone(); node.parent = null; if(children != null) node.children = (ASTNode[]) children.clone(); return node; } catch (CloneNotSupportedException e) { throw new Error("Error: clone not supported for " + getClass().getName()); } } /** * Create a deep copy of the AST subtree at this node. * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level */ @SuppressWarnings({"unchecked", "cast"}) public ParClassInstanceExpr fullCopy() { ParClassInstanceExpr tree = (ParClassInstanceExpr) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) children[i]; if(child != null) { child = child.fullCopy(); tree.setChild(child, i); } } } return tree; } /** * @ast method * @aspect GenericMethodsPrettyPrint * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericMethods.jrag:206 */ public void toString(StringBuffer s) { s.append("<"); for(int i = 0; i < getNumTypeArgument(); i++) { if(i != 0) s.append(", "); getTypeArgument(i).toString(s); } s.append(">"); super.toString(s); } /** * @ast method * */ public ParClassInstanceExpr() { super(); } /** * Initializes the child array to the correct size. * Initializes List and Opt nta children. * @apilevel internal * @ast method * @ast method * */ public void init$Children() { children = new ASTNode[4]; setChild(new List(), 1); setChild(new Opt(), 2); setChild(new List(), 3); } /** * @ast method * */ public ParClassInstanceExpr(Access p0, List<Expr> p1, Opt<TypeDecl> p2, List<Access> p3) { setChild(p0, 0); setChild(p1, 1); setChild(p2, 2); setChild(p3, 3); } /** * @apilevel low-level * @ast method * */ protected int numChildren() { return 4; } /** * @apilevel internal * @ast method * */ public boolean mayHaveRewrite() { return false; } /** * Replaces the Access child. * @param node The new node to replace the Access child. * @apilevel high-level * @ast method * */ public void setAccess(Access node) { setChild(node, 0); } /** * Retrieves the Access child. * @return The current node used as the Access child. * @apilevel high-level * @ast method * */ public Access getAccess() { return (Access)getChild(0); } /** * Retrieves the Access child. * <p><em>This method does not invoke AST transformations.</em></p> * @return The current node used as the Access child. * @apilevel low-level * @ast method * */ public Access getAccessNoTransform() { return (Access)getChildNoTransform(0); } /** * Replaces the Arg list. * @param list The new list node to be used as the Arg list. * @apilevel high-level * @ast method * */ public void setArgList(List<Expr> list) { setChild(list, 1); } /** * Retrieves the number of children in the Arg list. * @return Number of children in the Arg list. * @apilevel high-level * @ast method * */ public int getNumArg() { return getArgList().getNumChild(); } /** * Retrieves the number of children in the Arg list. * Calling this method will not trigger rewrites.. * @return Number of children in the Arg list. * @apilevel low-level * @ast method * */ public int getNumArgNoTransform() { return getArgListNoTransform().getNumChildNoTransform(); } /** * Retrieves the element at index {@code i} in the Arg list.. * @param i Index of the element to return. * @return The element at position {@code i} in the Arg list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public Expr getArg(int i) { return (Expr)getArgList().getChild(i); } /** * Append an element to the Arg list. * @param node The element to append to the Arg list. * @apilevel high-level * @ast method * */ public void addArg(Expr node) { List<Expr> list = (parent == null || state == null) ? getArgListNoTransform() : getArgList(); list.addChild(node); } /** * @apilevel low-level * @ast method * */ public void addArgNoTransform(Expr node) { List<Expr> list = getArgListNoTransform(); list.addChild(node); } /** * Replaces the Arg list element at index {@code i} with the new node {@code node}. * @param node The new node to replace the old list element. * @param i The list index of the node to be replaced. * @apilevel high-level * @ast method * */ public void setArg(Expr node, int i) { List<Expr> list = getArgList(); list.setChild(node, i); } /** * Retrieves the Arg list. * @return The node representing the Arg list. * @apilevel high-level * @ast method * */ public List<Expr> getArgs() { return getArgList(); } /** * Retrieves the Arg list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the Arg list. * @apilevel low-level * @ast method * */ public List<Expr> getArgsNoTransform() { return getArgListNoTransform(); } /** * Retrieves the Arg list. * @return The node representing the Arg list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<Expr> getArgList() { List<Expr> list = (List<Expr>)getChild(1); list.getNumChild(); return list; } /** * Retrieves the Arg list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the Arg list. * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<Expr> getArgListNoTransform() { return (List<Expr>)getChildNoTransform(1); } /** * Replaces the optional node for the TypeDecl child. This is the {@code Opt} node containing the child TypeDecl, not the actual child! * @param opt The new node to be used as the optional node for the TypeDecl child. * @apilevel low-level * @ast method * */ public void setTypeDeclOpt(Opt<TypeDecl> opt) { setChild(opt, 2); } /** * Check whether the optional TypeDecl child exists. * @return {@code true} if the optional TypeDecl child exists, {@code false} if it does not. * @apilevel high-level * @ast method * */ public boolean hasTypeDecl() { return getTypeDeclOpt().getNumChild() != 0; } /** * Retrieves the (optional) TypeDecl child. * @return The TypeDecl child, if it exists. Returns {@code null} otherwise. * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public TypeDecl getTypeDecl() { return (TypeDecl)getTypeDeclOpt().getChild(0); } /** * Replaces the (optional) TypeDecl child. * @param node The new node to be used as the TypeDecl child. * @apilevel high-level * @ast method * */ public void setTypeDecl(TypeDecl node) { getTypeDeclOpt().setChild(node, 0); } /** * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public Opt<TypeDecl> getTypeDeclOpt() { return (Opt<TypeDecl>)getChild(2); } /** * Retrieves the optional node for child TypeDecl. This is the {@code Opt} node containing the child TypeDecl, not the actual child! * <p><em>This method does not invoke AST transformations.</em></p> * @return The optional node for child TypeDecl. * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public Opt<TypeDecl> getTypeDeclOptNoTransform() { return (Opt<TypeDecl>)getChildNoTransform(2); } /** * Replaces the TypeArgument list. * @param list The new list node to be used as the TypeArgument list. * @apilevel high-level * @ast method * */ public void setTypeArgumentList(List<Access> list) { setChild(list, 3); } /** * Retrieves the number of children in the TypeArgument list. * @return Number of children in the TypeArgument list. * @apilevel high-level * @ast method * */ public int getNumTypeArgument() { return getTypeArgumentList().getNumChild(); } /** * Retrieves the number of children in the TypeArgument list. * Calling this method will not trigger rewrites.. * @return Number of children in the TypeArgument list. * @apilevel low-level * @ast method * */ public int getNumTypeArgumentNoTransform() { return getTypeArgumentListNoTransform().getNumChildNoTransform(); } /** * Retrieves the element at index {@code i} in the TypeArgument list.. * @param i Index of the element to return. * @return The element at position {@code i} in the TypeArgument list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public Access getTypeArgument(int i) { return (Access)getTypeArgumentList().getChild(i); } /** * Append an element to the TypeArgument list. * @param node The element to append to the TypeArgument list. * @apilevel high-level * @ast method * */ public void addTypeArgument(Access node) { List<Access> list = (parent == null || state == null) ? getTypeArgumentListNoTransform() : getTypeArgumentList(); list.addChild(node); } /** * @apilevel low-level * @ast method * */ public void addTypeArgumentNoTransform(Access node) { List<Access> list = getTypeArgumentListNoTransform(); list.addChild(node); } /** * Replaces the TypeArgument list element at index {@code i} with the new node {@code node}. * @param node The new node to replace the old list element. * @param i The list index of the node to be replaced. * @apilevel high-level * @ast method * */ public void setTypeArgument(Access node, int i) { List<Access> list = getTypeArgumentList(); list.setChild(node, i); } /** * Retrieves the TypeArgument list. * @return The node representing the TypeArgument list. * @apilevel high-level * @ast method * */ public List<Access> getTypeArguments() { return getTypeArgumentList(); } /** * Retrieves the TypeArgument list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the TypeArgument list. * @apilevel low-level * @ast method * */ public List<Access> getTypeArgumentsNoTransform() { return getTypeArgumentListNoTransform(); } /** * Retrieves the TypeArgument list. * @return The node representing the TypeArgument list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<Access> getTypeArgumentList() { List<Access> list = (List<Access>)getChild(3); list.getNumChild(); return list; } /** * Retrieves the TypeArgument list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the TypeArgument list. * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<Access> getTypeArgumentListNoTransform() { return (List<Access>)getChildNoTransform(3); } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericMethods.jrag:172 * @apilevel internal */ public NameType Define_NameType_nameType(ASTNode caller, ASTNode child) { if(caller == getTypeArgumentListNoTransform()) { int childIndex = caller.getIndexOfChild(child); return NameType.TYPE_NAME; } else { return super.Define_NameType_nameType(caller, child); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericMethods.jrag:173 * @apilevel internal */ public SimpleSet Define_SimpleSet_lookupType(ASTNode caller, ASTNode child, String name) { if(caller == getTypeArgumentListNoTransform()) { int childIndex = caller.getIndexOfChild(child); return unqualifiedScope().lookupType(name); } else { return super.Define_SimpleSet_lookupType(caller, child, name); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/TypeInference.jrag:473 * @apilevel internal */ public boolean Define_boolean_isExplicitGenericConstructorAccess(ASTNode caller, ASTNode child) { if(caller == getAccessNoTransform()) { return true; } else { return getParent().Define_boolean_isExplicitGenericConstructorAccess(this, caller); } } /** * @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); } }
14,562
26.739048
137
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/ParConstructorAccess.java
/* This file was generated with JastAdd2 (http://jastadd.org) version R20130212 (r1031) */ package soot.JastAddJ; import java.util.HashSet; 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; /** * @production ParConstructorAccess : {@link ConstructorAccess} ::= <span class="component">TypeArgument:{@link Access}*</span>; * @ast node * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericMethods.ast:16 */ public class ParConstructorAccess extends ConstructorAccess implements Cloneable { /** * @apilevel low-level */ public void flushCache() { super.flushCache(); } /** * @apilevel internal */ public void flushCollectionCache() { super.flushCollectionCache(); } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public ParConstructorAccess clone() throws CloneNotSupportedException { ParConstructorAccess node = (ParConstructorAccess)super.clone(); node.in$Circle(false); node.is$Final(false); return node; } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public ParConstructorAccess copy() { try { ParConstructorAccess node = (ParConstructorAccess) clone(); node.parent = null; if(children != null) node.children = (ASTNode[]) children.clone(); return node; } catch (CloneNotSupportedException e) { throw new Error("Error: clone not supported for " + getClass().getName()); } } /** * Create a deep copy of the AST subtree at this node. * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level */ @SuppressWarnings({"unchecked", "cast"}) public ParConstructorAccess fullCopy() { ParConstructorAccess tree = (ParConstructorAccess) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) children[i]; if(child != null) { child = child.fullCopy(); tree.setChild(child, i); } } } return tree; } /** * @ast method * @aspect GenericMethodsPrettyPrint * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericMethods.jrag:188 */ public void toString(StringBuffer s) { s.append("<"); for(int i = 0; i < getNumTypeArgument(); i++) { if(i != 0) s.append(", "); getTypeArgument(i).toString(s); } s.append(">"); super.toString(s); } /** * @ast method * */ public ParConstructorAccess() { super(); } /** * Initializes the child array to the correct size. * Initializes List and Opt nta children. * @apilevel internal * @ast method * @ast method * */ public void init$Children() { children = new ASTNode[2]; setChild(new List(), 0); setChild(new List(), 1); } /** * @ast method * */ public ParConstructorAccess(String p0, List<Expr> p1, List<Access> p2) { setID(p0); setChild(p1, 0); setChild(p2, 1); } /** * @ast method * */ public ParConstructorAccess(beaver.Symbol p0, List<Expr> p1, List<Access> p2) { setID(p0); setChild(p1, 0); setChild(p2, 1); } /** * @apilevel low-level * @ast method * */ protected int numChildren() { return 2; } /** * @apilevel internal * @ast method * */ public boolean mayHaveRewrite() { return false; } /** * Replaces the lexeme ID. * @param value The new value for the lexeme ID. * @apilevel high-level * @ast method * */ public void setID(String value) { tokenString_ID = value; } /** * JastAdd-internal setter for lexeme ID using the Beaver parser. * @apilevel internal * @ast method * */ 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(); } /** * Retrieves the value for the lexeme ID. * @return The value for the lexeme ID. * @apilevel high-level * @ast method * */ public String getID() { return tokenString_ID != null ? tokenString_ID : ""; } /** * Replaces the Arg list. * @param list The new list node to be used as the Arg list. * @apilevel high-level * @ast method * */ public void setArgList(List<Expr> list) { setChild(list, 0); } /** * Retrieves the number of children in the Arg list. * @return Number of children in the Arg list. * @apilevel high-level * @ast method * */ public int getNumArg() { return getArgList().getNumChild(); } /** * Retrieves the number of children in the Arg list. * Calling this method will not trigger rewrites.. * @return Number of children in the Arg list. * @apilevel low-level * @ast method * */ public int getNumArgNoTransform() { return getArgListNoTransform().getNumChildNoTransform(); } /** * Retrieves the element at index {@code i} in the Arg list.. * @param i Index of the element to return. * @return The element at position {@code i} in the Arg list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public Expr getArg(int i) { return (Expr)getArgList().getChild(i); } /** * Append an element to the Arg list. * @param node The element to append to the Arg list. * @apilevel high-level * @ast method * */ public void addArg(Expr node) { List<Expr> list = (parent == null || state == null) ? getArgListNoTransform() : getArgList(); list.addChild(node); } /** * @apilevel low-level * @ast method * */ public void addArgNoTransform(Expr node) { List<Expr> list = getArgListNoTransform(); list.addChild(node); } /** * Replaces the Arg list element at index {@code i} with the new node {@code node}. * @param node The new node to replace the old list element. * @param i The list index of the node to be replaced. * @apilevel high-level * @ast method * */ public void setArg(Expr node, int i) { List<Expr> list = getArgList(); list.setChild(node, i); } /** * Retrieves the Arg list. * @return The node representing the Arg list. * @apilevel high-level * @ast method * */ public List<Expr> getArgs() { return getArgList(); } /** * Retrieves the Arg list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the Arg list. * @apilevel low-level * @ast method * */ public List<Expr> getArgsNoTransform() { return getArgListNoTransform(); } /** * Retrieves the Arg list. * @return The node representing the Arg list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<Expr> getArgList() { List<Expr> list = (List<Expr>)getChild(0); list.getNumChild(); return list; } /** * Retrieves the Arg list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the Arg list. * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<Expr> getArgListNoTransform() { return (List<Expr>)getChildNoTransform(0); } /** * Replaces the TypeArgument list. * @param list The new list node to be used as the TypeArgument list. * @apilevel high-level * @ast method * */ public void setTypeArgumentList(List<Access> list) { setChild(list, 1); } /** * Retrieves the number of children in the TypeArgument list. * @return Number of children in the TypeArgument list. * @apilevel high-level * @ast method * */ public int getNumTypeArgument() { return getTypeArgumentList().getNumChild(); } /** * Retrieves the number of children in the TypeArgument list. * Calling this method will not trigger rewrites.. * @return Number of children in the TypeArgument list. * @apilevel low-level * @ast method * */ public int getNumTypeArgumentNoTransform() { return getTypeArgumentListNoTransform().getNumChildNoTransform(); } /** * Retrieves the element at index {@code i} in the TypeArgument list.. * @param i Index of the element to return. * @return The element at position {@code i} in the TypeArgument list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public Access getTypeArgument(int i) { return (Access)getTypeArgumentList().getChild(i); } /** * Append an element to the TypeArgument list. * @param node The element to append to the TypeArgument list. * @apilevel high-level * @ast method * */ public void addTypeArgument(Access node) { List<Access> list = (parent == null || state == null) ? getTypeArgumentListNoTransform() : getTypeArgumentList(); list.addChild(node); } /** * @apilevel low-level * @ast method * */ public void addTypeArgumentNoTransform(Access node) { List<Access> list = getTypeArgumentListNoTransform(); list.addChild(node); } /** * Replaces the TypeArgument list element at index {@code i} with the new node {@code node}. * @param node The new node to replace the old list element. * @param i The list index of the node to be replaced. * @apilevel high-level * @ast method * */ public void setTypeArgument(Access node, int i) { List<Access> list = getTypeArgumentList(); list.setChild(node, i); } /** * Retrieves the TypeArgument list. * @return The node representing the TypeArgument list. * @apilevel high-level * @ast method * */ public List<Access> getTypeArguments() { return getTypeArgumentList(); } /** * Retrieves the TypeArgument list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the TypeArgument list. * @apilevel low-level * @ast method * */ public List<Access> getTypeArgumentsNoTransform() { return getTypeArgumentListNoTransform(); } /** * Retrieves the TypeArgument list. * @return The node representing the TypeArgument list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<Access> getTypeArgumentList() { List<Access> list = (List<Access>)getChild(1); list.getNumChild(); return list; } /** * Retrieves the TypeArgument list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the TypeArgument list. * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<Access> getTypeArgumentListNoTransform() { return (List<Access>)getChildNoTransform(1); } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericMethods.jrag:156 * @apilevel internal */ public NameType Define_NameType_nameType(ASTNode caller, ASTNode child) { if(caller == getTypeArgumentListNoTransform()) { int childIndex = caller.getIndexOfChild(child); return NameType.TYPE_NAME; } else { return super.Define_NameType_nameType(caller, child); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericMethods.jrag:157 * @apilevel internal */ public SimpleSet Define_SimpleSet_lookupType(ASTNode caller, ASTNode child, String name) { if(caller == getTypeArgumentListNoTransform()) { int childIndex = caller.getIndexOfChild(child); return unqualifiedScope().lookupType(name); } else { return super.Define_SimpleSet_lookupType(caller, child, name); } } /** * @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); } }
12,496
26.049784
128
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/ParConstructorDecl.java
/* This file was generated with JastAdd2 (http://jastadd.org) version R20130212 (r1031) */ package soot.JastAddJ; import java.util.HashSet; 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; /** * @production ParConstructorDecl : {@link ConstructorDecl} ::= <span class="component">TypeArgument:{@link Access}*</span>; * @ast node * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericMethods.ast:10 */ public class ParConstructorDecl extends ConstructorDecl implements Cloneable { /** * @apilevel low-level */ public void flushCache() { super.flushCache(); genericConstructorDecl_computed = false; genericConstructorDecl_value = null; sourceConstructorDecl_computed = false; sourceConstructorDecl_value = null; } /** * @apilevel internal */ public void flushCollectionCache() { super.flushCollectionCache(); } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public ParConstructorDecl clone() throws CloneNotSupportedException { ParConstructorDecl node = (ParConstructorDecl)super.clone(); node.genericConstructorDecl_computed = false; node.genericConstructorDecl_value = null; node.sourceConstructorDecl_computed = false; node.sourceConstructorDecl_value = null; node.in$Circle(false); node.is$Final(false); return node; } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public ParConstructorDecl copy() { try { ParConstructorDecl node = (ParConstructorDecl) clone(); node.parent = null; if(children != null) node.children = (ASTNode[]) children.clone(); return node; } catch (CloneNotSupportedException e) { throw new Error("Error: clone not supported for " + getClass().getName()); } } /** * Create a deep copy of the AST subtree at this node. * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level */ @SuppressWarnings({"unchecked", "cast"}) public ParConstructorDecl fullCopy() { ParConstructorDecl tree = (ParConstructorDecl) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) children[i]; if(child != null) { child = child.fullCopy(); tree.setChild(child, i); } } } return tree; } /** * @ast method * */ public ParConstructorDecl() { super(); } /** * Initializes the child array to the correct size. * Initializes List and Opt nta children. * @apilevel internal * @ast method * @ast method * */ public void init$Children() { children = new ASTNode[6]; setChild(new List(), 1); setChild(new List(), 2); setChild(new Opt(), 3); setChild(new List(), 5); } /** * @ast method * */ public ParConstructorDecl(Modifiers p0, String p1, List<ParameterDeclaration> p2, List<Access> p3, Opt<Stmt> p4, Block p5, List<Access> p6) { setChild(p0, 0); setID(p1); setChild(p2, 1); setChild(p3, 2); setChild(p4, 3); setChild(p5, 4); setChild(p6, 5); } /** * @ast method * */ public ParConstructorDecl(Modifiers p0, beaver.Symbol p1, List<ParameterDeclaration> p2, List<Access> p3, Opt<Stmt> p4, Block p5, List<Access> p6) { setChild(p0, 0); setID(p1); setChild(p2, 1); setChild(p3, 2); setChild(p4, 3); setChild(p5, 4); setChild(p6, 5); } /** * @apilevel low-level * @ast method * */ protected int numChildren() { return 6; } /** * @apilevel internal * @ast method * */ public boolean mayHaveRewrite() { return true; } /** * Replaces the Modifiers child. * @param node The new node to replace the Modifiers child. * @apilevel high-level * @ast method * */ public void setModifiers(Modifiers node) { setChild(node, 0); } /** * Retrieves the Modifiers child. * @return The current node used as the Modifiers child. * @apilevel high-level * @ast method * */ public Modifiers getModifiers() { return (Modifiers)getChild(0); } /** * Retrieves the Modifiers child. * <p><em>This method does not invoke AST transformations.</em></p> * @return The current node used as the Modifiers child. * @apilevel low-level * @ast method * */ public Modifiers getModifiersNoTransform() { return (Modifiers)getChildNoTransform(0); } /** * Replaces the lexeme ID. * @param value The new value for the lexeme ID. * @apilevel high-level * @ast method * */ public void setID(String value) { tokenString_ID = value; } /** * JastAdd-internal setter for lexeme ID using the Beaver parser. * @apilevel internal * @ast method * */ 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(); } /** * Retrieves the value for the lexeme ID. * @return The value for the lexeme ID. * @apilevel high-level * @ast method * */ public String getID() { return tokenString_ID != null ? tokenString_ID : ""; } /** * Replaces the Parameter list. * @param list The new list node to be used as the Parameter list. * @apilevel high-level * @ast method * */ public void setParameterList(List<ParameterDeclaration> list) { setChild(list, 1); } /** * Retrieves the number of children in the Parameter list. * @return Number of children in the Parameter list. * @apilevel high-level * @ast method * */ public int getNumParameter() { return getParameterList().getNumChild(); } /** * Retrieves the number of children in the Parameter list. * Calling this method will not trigger rewrites.. * @return Number of children in the Parameter list. * @apilevel low-level * @ast method * */ public int getNumParameterNoTransform() { return getParameterListNoTransform().getNumChildNoTransform(); } /** * Retrieves the element at index {@code i} in the Parameter list.. * @param i Index of the element to return. * @return The element at position {@code i} in the Parameter list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public ParameterDeclaration getParameter(int i) { return (ParameterDeclaration)getParameterList().getChild(i); } /** * Append an element to the Parameter list. * @param node The element to append to the Parameter list. * @apilevel high-level * @ast method * */ public void addParameter(ParameterDeclaration node) { List<ParameterDeclaration> list = (parent == null || state == null) ? getParameterListNoTransform() : getParameterList(); list.addChild(node); } /** * @apilevel low-level * @ast method * */ public void addParameterNoTransform(ParameterDeclaration node) { List<ParameterDeclaration> list = getParameterListNoTransform(); list.addChild(node); } /** * Replaces the Parameter list element at index {@code i} with the new node {@code node}. * @param node The new node to replace the old list element. * @param i The list index of the node to be replaced. * @apilevel high-level * @ast method * */ public void setParameter(ParameterDeclaration node, int i) { List<ParameterDeclaration> list = getParameterList(); list.setChild(node, i); } /** * Retrieves the Parameter list. * @return The node representing the Parameter list. * @apilevel high-level * @ast method * */ public List<ParameterDeclaration> getParameters() { return getParameterList(); } /** * Retrieves the Parameter list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the Parameter list. * @apilevel low-level * @ast method * */ public List<ParameterDeclaration> getParametersNoTransform() { return getParameterListNoTransform(); } /** * Retrieves the Parameter list. * @return The node representing the Parameter list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<ParameterDeclaration> getParameterList() { List<ParameterDeclaration> list = (List<ParameterDeclaration>)getChild(1); list.getNumChild(); return list; } /** * Retrieves the Parameter list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the Parameter list. * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<ParameterDeclaration> getParameterListNoTransform() { return (List<ParameterDeclaration>)getChildNoTransform(1); } /** * Replaces the Exception list. * @param list The new list node to be used as the Exception list. * @apilevel high-level * @ast method * */ public void setExceptionList(List<Access> list) { setChild(list, 2); } /** * Retrieves the number of children in the Exception list. * @return Number of children in the Exception list. * @apilevel high-level * @ast method * */ public int getNumException() { return getExceptionList().getNumChild(); } /** * Retrieves the number of children in the Exception list. * Calling this method will not trigger rewrites.. * @return Number of children in the Exception list. * @apilevel low-level * @ast method * */ public int getNumExceptionNoTransform() { return getExceptionListNoTransform().getNumChildNoTransform(); } /** * Retrieves the element at index {@code i} in the Exception list.. * @param i Index of the element to return. * @return The element at position {@code i} in the Exception list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public Access getException(int i) { return (Access)getExceptionList().getChild(i); } /** * Append an element to the Exception list. * @param node The element to append to the Exception list. * @apilevel high-level * @ast method * */ public void addException(Access node) { List<Access> list = (parent == null || state == null) ? getExceptionListNoTransform() : getExceptionList(); list.addChild(node); } /** * @apilevel low-level * @ast method * */ public void addExceptionNoTransform(Access node) { List<Access> list = getExceptionListNoTransform(); list.addChild(node); } /** * Replaces the Exception list element at index {@code i} with the new node {@code node}. * @param node The new node to replace the old list element. * @param i The list index of the node to be replaced. * @apilevel high-level * @ast method * */ public void setException(Access node, int i) { List<Access> list = getExceptionList(); list.setChild(node, i); } /** * Retrieves the Exception list. * @return The node representing the Exception list. * @apilevel high-level * @ast method * */ public List<Access> getExceptions() { return getExceptionList(); } /** * Retrieves the Exception list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the Exception list. * @apilevel low-level * @ast method * */ public List<Access> getExceptionsNoTransform() { return getExceptionListNoTransform(); } /** * Retrieves the Exception list. * @return The node representing the Exception list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<Access> getExceptionList() { List<Access> list = (List<Access>)getChild(2); list.getNumChild(); return list; } /** * Retrieves the Exception list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the Exception list. * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<Access> getExceptionListNoTransform() { return (List<Access>)getChildNoTransform(2); } /** * Replaces the optional node for the ConstructorInvocation child. This is the {@code Opt} node containing the child ConstructorInvocation, not the actual child! * @param opt The new node to be used as the optional node for the ConstructorInvocation child. * @apilevel low-level * @ast method * */ public void setConstructorInvocationOpt(Opt<Stmt> opt) { setChild(opt, 3); } /** * Check whether the optional ConstructorInvocation child exists. * @return {@code true} if the optional ConstructorInvocation child exists, {@code false} if it does not. * @apilevel high-level * @ast method * */ public boolean hasConstructorInvocation() { return getConstructorInvocationOpt().getNumChild() != 0; } /** * Retrieves the (optional) ConstructorInvocation child. * @return The ConstructorInvocation child, if it exists. Returns {@code null} otherwise. * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public Stmt getConstructorInvocation() { return (Stmt)getConstructorInvocationOpt().getChild(0); } /** * Replaces the (optional) ConstructorInvocation child. * @param node The new node to be used as the ConstructorInvocation child. * @apilevel high-level * @ast method * */ public void setConstructorInvocation(Stmt node) { getConstructorInvocationOpt().setChild(node, 0); } /** * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public Opt<Stmt> getConstructorInvocationOpt() { return (Opt<Stmt>)getChild(3); } /** * Retrieves the optional node for child ConstructorInvocation. This is the {@code Opt} node containing the child ConstructorInvocation, not the actual child! * <p><em>This method does not invoke AST transformations.</em></p> * @return The optional node for child ConstructorInvocation. * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public Opt<Stmt> getConstructorInvocationOptNoTransform() { return (Opt<Stmt>)getChildNoTransform(3); } /** * Replaces the Block child. * @param node The new node to replace the Block child. * @apilevel high-level * @ast method * */ public void setBlock(Block node) { setChild(node, 4); } /** * Retrieves the Block child. * @return The current node used as the Block child. * @apilevel high-level * @ast method * */ public Block getBlock() { return (Block)getChild(4); } /** * Retrieves the Block child. * <p><em>This method does not invoke AST transformations.</em></p> * @return The current node used as the Block child. * @apilevel low-level * @ast method * */ public Block getBlockNoTransform() { return (Block)getChildNoTransform(4); } /** * Replaces the TypeArgument list. * @param list The new list node to be used as the TypeArgument list. * @apilevel high-level * @ast method * */ public void setTypeArgumentList(List<Access> list) { setChild(list, 5); } /** * Retrieves the number of children in the TypeArgument list. * @return Number of children in the TypeArgument list. * @apilevel high-level * @ast method * */ public int getNumTypeArgument() { return getTypeArgumentList().getNumChild(); } /** * Retrieves the number of children in the TypeArgument list. * Calling this method will not trigger rewrites.. * @return Number of children in the TypeArgument list. * @apilevel low-level * @ast method * */ public int getNumTypeArgumentNoTransform() { return getTypeArgumentListNoTransform().getNumChildNoTransform(); } /** * Retrieves the element at index {@code i} in the TypeArgument list.. * @param i Index of the element to return. * @return The element at position {@code i} in the TypeArgument list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public Access getTypeArgument(int i) { return (Access)getTypeArgumentList().getChild(i); } /** * Append an element to the TypeArgument list. * @param node The element to append to the TypeArgument list. * @apilevel high-level * @ast method * */ public void addTypeArgument(Access node) { List<Access> list = (parent == null || state == null) ? getTypeArgumentListNoTransform() : getTypeArgumentList(); list.addChild(node); } /** * @apilevel low-level * @ast method * */ public void addTypeArgumentNoTransform(Access node) { List<Access> list = getTypeArgumentListNoTransform(); list.addChild(node); } /** * Replaces the TypeArgument list element at index {@code i} with the new node {@code node}. * @param node The new node to replace the old list element. * @param i The list index of the node to be replaced. * @apilevel high-level * @ast method * */ public void setTypeArgument(Access node, int i) { List<Access> list = getTypeArgumentList(); list.setChild(node, i); } /** * Retrieves the TypeArgument list. * @return The node representing the TypeArgument list. * @apilevel high-level * @ast method * */ public List<Access> getTypeArguments() { return getTypeArgumentList(); } /** * Retrieves the TypeArgument list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the TypeArgument list. * @apilevel low-level * @ast method * */ public List<Access> getTypeArgumentsNoTransform() { return getTypeArgumentListNoTransform(); } /** * Retrieves the TypeArgument list. * @return The node representing the TypeArgument list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<Access> getTypeArgumentList() { List<Access> list = (List<Access>)getChild(5); list.getNumChild(); return list; } /** * Retrieves the TypeArgument list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the TypeArgument list. * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<Access> getTypeArgumentListNoTransform() { return (List<Access>)getChildNoTransform(5); } /** * @apilevel internal */ protected boolean genericConstructorDecl_computed = false; /** * @apilevel internal */ protected GenericConstructorDecl genericConstructorDecl_value; /** * @attribute syn * @aspect GenericMethods * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericMethods.jrag:49 */ @SuppressWarnings({"unchecked", "cast"}) public GenericConstructorDecl genericConstructorDecl() { if(genericConstructorDecl_computed) { return genericConstructorDecl_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); genericConstructorDecl_value = genericConstructorDecl_compute(); if(isFinal && num == state().boundariesCrossed) genericConstructorDecl_computed = true; return genericConstructorDecl_value; } /** * @apilevel internal */ private GenericConstructorDecl genericConstructorDecl_compute() { if(getParent() != null && getParent().getParent() instanceof GenericConstructorDecl) return (GenericConstructorDecl)getParent().getParent(); return null; } /** * @apilevel internal */ protected boolean sourceConstructorDecl_computed = false; /** * @apilevel internal */ protected ConstructorDecl sourceConstructorDecl_value; /** * @attribute syn * @aspect SourceDeclarations * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:1516 */ @SuppressWarnings({"unchecked", "cast"}) public ConstructorDecl sourceConstructorDecl() { if(sourceConstructorDecl_computed) { return sourceConstructorDecl_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); sourceConstructorDecl_value = sourceConstructorDecl_compute(); if(isFinal && num == state().boundariesCrossed) sourceConstructorDecl_computed = true; return sourceConstructorDecl_value; } /** * @apilevel internal */ private ConstructorDecl sourceConstructorDecl_compute() { return genericConstructorDecl().original().sourceConstructorDecl(); } /** * @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); } }
21,586
27.859626
163
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/ParExpr.java
/* This file was generated with JastAdd2 (http://jastadd.org) version R20130212 (r1031) */ package soot.JastAddJ; import java.util.HashSet; 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; /** * @production ParExpr : {@link PrimaryExpr} ::= <span class="component">{@link Expr}</span>; * @ast node * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/java.ast:131 */ public class ParExpr extends PrimaryExpr implements Cloneable { /** * @apilevel low-level */ public void flushCache() { super.flushCache(); type_computed = false; type_value = null; } /** * @apilevel internal */ public void flushCollectionCache() { super.flushCollectionCache(); } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public ParExpr clone() throws CloneNotSupportedException { ParExpr node = (ParExpr)super.clone(); node.type_computed = false; node.type_value = null; node.in$Circle(false); node.is$Final(false); return node; } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public ParExpr copy() { try { ParExpr node = (ParExpr) clone(); node.parent = null; if(children != null) node.children = (ASTNode[]) children.clone(); return node; } catch (CloneNotSupportedException e) { throw new Error("Error: clone not supported for " + getClass().getName()); } } /** * Create a deep copy of the AST subtree at this node. * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level */ @SuppressWarnings({"unchecked", "cast"}) public ParExpr fullCopy() { ParExpr tree = (ParExpr) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) children[i]; if(child != null) { child = child.fullCopy(); tree.setChild(child, i); } } } return tree; } /** * @ast method * @aspect PrettyPrint * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/PrettyPrint.jadd:321 */ public void toString(StringBuffer s) { s.append("("); getExpr().toString(s); s.append(")"); } /** * @ast method * @aspect TypeCheck * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeCheck.jrag:263 */ public void typeCheck() { if(getExpr().isTypeAccess()) error("" + getExpr() + " is a type and may not be used in parenthesized expression"); } /** * @ast method * @aspect BooleanExpressions * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/BooleanExpressions.jrag:180 */ public void emitEvalBranch(Body b) { getExpr().emitEvalBranch(b); } /** * @ast method * @aspect Expressions * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/Expressions.jrag:15 */ public soot.Value eval(Body b) { return getExpr().eval(b); } /** * @ast method * */ public ParExpr() { super(); } /** * Initializes the child array to the correct size. * Initializes List and Opt nta children. * @apilevel internal * @ast method * @ast method * */ public void init$Children() { children = new ASTNode[1]; } /** * @ast method * */ public ParExpr(Expr p0) { setChild(p0, 0); } /** * @apilevel low-level * @ast method * */ protected int numChildren() { return 1; } /** * @apilevel internal * @ast method * */ public boolean mayHaveRewrite() { return false; } /** * Replaces the Expr child. * @param node The new node to replace the Expr child. * @apilevel high-level * @ast method * */ public void setExpr(Expr node) { setChild(node, 0); } /** * Retrieves the Expr child. * @return The current node used as the Expr child. * @apilevel high-level * @ast method * */ public Expr getExpr() { return (Expr)getChild(0); } /** * Retrieves the Expr child. * <p><em>This method does not invoke AST transformations.</em></p> * @return The current node used as the Expr child. * @apilevel low-level * @ast method * */ public Expr getExprNoTransform() { return (Expr)getChildNoTransform(0); } /** * @attribute syn * @aspect ConstantExpression * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/ConstantExpression.jrag:91 */ public Constant constant() { ASTNode$State state = state(); try { return getExpr().constant(); } finally { } } /** * @attribute syn * @aspect ConstantExpression * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/ConstantExpression.jrag:336 */ public boolean isConstant() { ASTNode$State state = state(); try { return getExpr().isConstant(); } finally { } } /** * @attribute syn * @aspect DefiniteAssignment * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DefiniteAssignment.jrag:58 */ public Variable varDecl() { ASTNode$State state = state(); try { return getExpr().varDecl(); } finally { } } /*eq Stmt.isDAafter(Variable v) { //System.out.println("### isDAafter reached in " + getClass().getName()); //throw new NullPointerException(); throw new Error("Can not compute isDAafter for " + getClass().getName() + " at " + errorPrefix()); }* @attribute syn * @aspect DA * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DefiniteAssignment.jrag:332 */ public boolean isDAafterTrue(Variable v) { ASTNode$State state = state(); try { return getExpr().isDAafterTrue(v) || isFalse(); } finally { } } /** * @attribute syn * @aspect DA * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DefiniteAssignment.jrag:333 */ public boolean isDAafterFalse(Variable v) { ASTNode$State state = state(); try { return getExpr().isDAafterFalse(v) || isTrue(); } finally { } } /** * @attribute syn * @aspect DA * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DefiniteAssignment.jrag:235 */ public boolean isDAafter(Variable v) { ASTNode$State state = state(); try { return getExpr().isDAafter(v); } finally { } } /** * @attribute syn * @aspect DU * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DefiniteAssignment.jrag:702 */ public boolean isDUafterTrue(Variable v) { ASTNode$State state = state(); try { return getExpr().isDUafterTrue(v); } finally { } } /** * @attribute syn * @aspect DU * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DefiniteAssignment.jrag:703 */ public boolean isDUafterFalse(Variable v) { ASTNode$State state = state(); try { return getExpr().isDUafterFalse(v); } finally { } } /** * @attribute syn * @aspect DU * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DefiniteAssignment.jrag:694 */ public boolean isDUafter(Variable v) { ASTNode$State state = state(); try { return getExpr().isDUafter(v); } finally { } } /** * @attribute syn * @aspect AccessTypes * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/ResolveAmbiguousNames.jrag:25 */ public boolean isSuperAccess() { ASTNode$State state = state(); try { return getExpr().isSuperAccess(); } finally { } } /** * @attribute syn * @aspect AccessTypes * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/ResolveAmbiguousNames.jrag:31 */ public boolean isThisAccess() { ASTNode$State state = state(); try { return getExpr().isThisAccess(); } finally { } } /** * @apilevel internal */ protected boolean type_computed = false; /** * @apilevel internal */ protected TypeDecl type_value; /** * @attribute syn * @aspect TypeAnalysis * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeAnalysis.jrag:309 */ @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; } /** * @apilevel internal */ private TypeDecl type_compute() { return getExpr().isTypeAccess() ? unknownType() : getExpr().type(); } /** * @attribute syn * @aspect TypeCheck * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeCheck.jrag:15 */ public boolean isVariable() { ASTNode$State state = state(); try { return getExpr().isVariable(); } finally { } } /** * @attribute syn * @aspect TypeHierarchyCheck * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeHierarchyCheck.jrag:150 */ public boolean staticContextQualifier() { ASTNode$State state = state(); try { return getExpr().staticContextQualifier(); } finally { } } /** * @attribute syn * @aspect BooleanExpressions * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/BooleanExpressions.jrag:21 */ public boolean definesLabel() { ASTNode$State state = state(); try { return getParent().definesLabel(); } finally { } } /** * @attribute syn * @aspect BooleanExpressions * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/BooleanExpressions.jrag:82 */ public boolean canBeTrue() { ASTNode$State state = state(); try { return getExpr().canBeTrue(); } finally { } } /** * @attribute syn * @aspect BooleanExpressions * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/BooleanExpressions.jrag:92 */ public boolean canBeFalse() { ASTNode$State state = state(); try { return getExpr().canBeFalse(); } finally { } } /** * @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); } }
11,077
26.085575
120
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/ParInterfaceDecl.java
/* This file was generated with JastAdd2 (http://jastadd.org) version R20130212 (r1031) */ package soot.JastAddJ; import java.util.HashSet; 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; /** * @production ParInterfaceDecl : {@link InterfaceDecl} ::= <span class="component">Argument:{@link Access}*</span> <span class="component">SuperInterfaceId:{@link Access}*</span> <span class="component">{@link BodyDecl}*</span>; * @ast node * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.ast:9 */ public class ParInterfaceDecl extends InterfaceDecl implements Cloneable, ParTypeDecl, MemberSubstitutor { /** * @apilevel low-level */ public void flushCache() { super.flushCache(); involvesTypeParameters_visited = -1; involvesTypeParameters_computed = false; involvesTypeParameters_initialized = false; erasure_computed = false; erasure_value = null; getSuperInterfaceIdList_computed = false; getSuperInterfaceIdList_value = null; getBodyDeclList_computed = false; getBodyDeclList_value = null; subtype_TypeDecl_values = null; sameStructure_TypeDecl_values = null; instanceOf_TypeDecl_values = null; sameSignature_ArrayList_values = null; usesTypeVariable_visited = -1; usesTypeVariable_computed = false; usesTypeVariable_initialized = false; sourceTypeDecl_computed = false; sourceTypeDecl_value = null; fullName_computed = false; fullName_value = null; typeName_computed = false; typeName_value = null; unimplementedMethods_computed = false; unimplementedMethods_value = null; localMethodsSignatureMap_computed = false; localMethodsSignatureMap_value = null; localFields_String_values = null; localTypeDecls_String_values = null; constructors_computed = false; constructors_value = null; genericDecl_computed = false; genericDecl_value = null; } /** * @apilevel internal */ public void flushCollectionCache() { super.flushCollectionCache(); } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public ParInterfaceDecl clone() throws CloneNotSupportedException { ParInterfaceDecl node = (ParInterfaceDecl)super.clone(); node.involvesTypeParameters_visited = -1; node.involvesTypeParameters_computed = false; node.involvesTypeParameters_initialized = false; node.erasure_computed = false; node.erasure_value = null; node.getSuperInterfaceIdList_computed = false; node.getSuperInterfaceIdList_value = null; node.getBodyDeclList_computed = false; node.getBodyDeclList_value = null; node.subtype_TypeDecl_values = null; node.sameStructure_TypeDecl_values = null; node.instanceOf_TypeDecl_values = null; node.sameSignature_ArrayList_values = null; node.usesTypeVariable_visited = -1; node.usesTypeVariable_computed = false; node.usesTypeVariable_initialized = false; node.sourceTypeDecl_computed = false; node.sourceTypeDecl_value = null; node.fullName_computed = false; node.fullName_value = null; node.typeName_computed = false; node.typeName_value = null; node.unimplementedMethods_computed = false; node.unimplementedMethods_value = null; node.localMethodsSignatureMap_computed = false; node.localMethodsSignatureMap_value = null; node.localFields_String_values = null; node.localTypeDecls_String_values = null; node.constructors_computed = false; node.constructors_value = null; node.genericDecl_computed = false; node.genericDecl_value = null; node.in$Circle(false); node.is$Final(false); return node; } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public ParInterfaceDecl copy() { try { ParInterfaceDecl node = (ParInterfaceDecl) clone(); node.parent = null; if(children != null) node.children = (ASTNode[]) children.clone(); return node; } catch (CloneNotSupportedException e) { throw new Error("Error: clone not supported for " + getClass().getName()); } } /** * Create a deep copy of the AST subtree at this node. * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level */ @SuppressWarnings({"unchecked", "cast"}) public ParInterfaceDecl fullCopy() { ParInterfaceDecl tree = (ParInterfaceDecl) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { switch (i) { case 3: case 4: tree.children[i] = new List(); continue; } ASTNode child = (ASTNode) children[i]; if(child != null) { child = child.fullCopy(); tree.setChild(child, i); } } } return tree; } /** * @ast method * @aspect GenericsNameBinding * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:557 */ public void collectErrors() { // Disable error check for ParInterfaceDecl which is an instanciated GenericInterfaceDecl } /** * @ast method * @aspect LookupParTypeDecl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:840 */ public TypeDecl substitute(TypeVariable typeVariable) { for(int i = 0; i < numTypeParameter(); i++) if(typeParameter(i) == typeVariable) return getArgument(i).type(); return super.substitute(typeVariable); } /** * @ast method * @aspect LookupParTypeDecl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:853 */ public int numTypeParameter() { return ((GenericTypeDecl)original()).getNumTypeParameter(); } /** * @ast method * @aspect LookupParTypeDecl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:856 */ public TypeVariable typeParameter(int index) { return ((GenericTypeDecl)original()).getTypeParameter(index); } /** * @ast method * @aspect LookupParTypeDecl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:888 */ public Access substitute(Parameterization parTypeDecl) { // TODO: include nesting as well.... if(parTypeDecl.isRawType()) return ((GenericTypeDecl)genericDecl()).rawType().createBoundAccess(); if(!usesTypeVariable()) return super.substitute(parTypeDecl); List list = new List(); for(int i = 0; i < getNumArgument(); i++) list.add(getArgument(i).type().substitute(parTypeDecl)); return new ParTypeAccess(genericDecl().createQualifiedAccess(), list); } /** * @ast method * @aspect GenericsParTypeDecl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericsParTypeDecl.jrag:76 */ public Access createQualifiedAccess() { List typeArgumentList = new List(); for(int i = 0; i < getNumArgument(); i++) { Access a = (Access)getArgument(i); if(a instanceof TypeAccess) typeArgumentList.add(a.type().createQualifiedAccess()); else typeArgumentList.add(a.fullCopy()); } if(!isTopLevelType()) { if(isRawType()) return enclosingType().createQualifiedAccess().qualifiesAccess( new TypeAccess("", getID()) ); else return enclosingType().createQualifiedAccess().qualifiesAccess( new ParTypeAccess(new TypeAccess("", getID()), typeArgumentList) ); } else { if(isRawType()) return new TypeAccess(packageName(), getID()); else return new ParTypeAccess(new TypeAccess(packageName(), getID()), typeArgumentList); } } /** * @ast method * @aspect GenericsCodegen * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/Jimple1.5Backend/GenericsCodegen.jrag:406 */ public void transformation() { } /** * @ast method * */ public ParInterfaceDecl() { super(); } /** * Initializes the child array to the correct size. * Initializes List and Opt nta children. * @apilevel internal * @ast method * @ast method * */ public void init$Children() { children = new ASTNode[4]; setChild(new List(), 1); setChild(new List(), 2); setChild(new List(), 3); } /** * @ast method * */ public ParInterfaceDecl(Modifiers p0, String p1, List<Access> p2) { setChild(p0, 0); setID(p1); setChild(p2, 1); } /** * @ast method * */ public ParInterfaceDecl(Modifiers p0, beaver.Symbol p1, List<Access> p2) { setChild(p0, 0); setID(p1); setChild(p2, 1); } /** * @apilevel low-level * @ast method * */ protected int numChildren() { return 2; } /** * @apilevel internal * @ast method * */ public boolean mayHaveRewrite() { return false; } /** * Replaces the Modifiers child. * @param node The new node to replace the Modifiers child. * @apilevel high-level * @ast method * */ public void setModifiers(Modifiers node) { setChild(node, 0); } /** * Retrieves the Modifiers child. * @return The current node used as the Modifiers child. * @apilevel high-level * @ast method * */ public Modifiers getModifiers() { return (Modifiers)getChild(0); } /** * Retrieves the Modifiers child. * <p><em>This method does not invoke AST transformations.</em></p> * @return The current node used as the Modifiers child. * @apilevel low-level * @ast method * */ public Modifiers getModifiersNoTransform() { return (Modifiers)getChildNoTransform(0); } /** * Replaces the lexeme ID. * @param value The new value for the lexeme ID. * @apilevel high-level * @ast method * */ public void setID(String value) { tokenString_ID = value; } /** * JastAdd-internal setter for lexeme ID using the Beaver parser. * @apilevel internal * @ast method * */ 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(); } /** * Retrieves the value for the lexeme ID. * @return The value for the lexeme ID. * @apilevel high-level * @ast method * */ public String getID() { return tokenString_ID != null ? tokenString_ID : ""; } /** * Replaces the Argument list. * @param list The new list node to be used as the Argument list. * @apilevel high-level * @ast method * */ public void setArgumentList(List<Access> list) { setChild(list, 1); } /** * Retrieves the number of children in the Argument list. * @return Number of children in the Argument list. * @apilevel high-level * @ast method * */ public int getNumArgument() { return getArgumentList().getNumChild(); } /** * Retrieves the number of children in the Argument list. * Calling this method will not trigger rewrites.. * @return Number of children in the Argument list. * @apilevel low-level * @ast method * */ public int getNumArgumentNoTransform() { return getArgumentListNoTransform().getNumChildNoTransform(); } /** * Retrieves the element at index {@code i} in the Argument list.. * @param i Index of the element to return. * @return The element at position {@code i} in the Argument list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public Access getArgument(int i) { return (Access)getArgumentList().getChild(i); } /** * Append an element to the Argument list. * @param node The element to append to the Argument list. * @apilevel high-level * @ast method * */ public void addArgument(Access node) { List<Access> list = (parent == null || state == null) ? getArgumentListNoTransform() : getArgumentList(); list.addChild(node); } /** * @apilevel low-level * @ast method * */ public void addArgumentNoTransform(Access node) { List<Access> list = getArgumentListNoTransform(); list.addChild(node); } /** * Replaces the Argument list element at index {@code i} with the new node {@code node}. * @param node The new node to replace the old list element. * @param i The list index of the node to be replaced. * @apilevel high-level * @ast method * */ public void setArgument(Access node, int i) { List<Access> list = getArgumentList(); list.setChild(node, i); } /** * Retrieves the Argument list. * @return The node representing the Argument list. * @apilevel high-level * @ast method * */ public List<Access> getArguments() { return getArgumentList(); } /** * Retrieves the Argument list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the Argument list. * @apilevel low-level * @ast method * */ public List<Access> getArgumentsNoTransform() { return getArgumentListNoTransform(); } /** * Retrieves the Argument list. * @return The node representing the Argument list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<Access> getArgumentList() { List<Access> list = (List<Access>)getChild(1); list.getNumChild(); return list; } /** * Retrieves the Argument list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the Argument list. * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<Access> getArgumentListNoTransform() { return (List<Access>)getChildNoTransform(1); } /** * Replaces the SuperInterfaceId list. * @param list The new list node to be used as the SuperInterfaceId list. * @apilevel high-level * @ast method * */ public void setSuperInterfaceIdList(List<Access> list) { setChild(list, 2); } /** * Retrieves the number of children in the SuperInterfaceId list. * @return Number of children in the SuperInterfaceId list. * @apilevel high-level * @ast method * */ public int getNumSuperInterfaceId() { return getSuperInterfaceIdList().getNumChild(); } /** * Retrieves the number of children in the SuperInterfaceId list. * Calling this method will not trigger rewrites.. * @return Number of children in the SuperInterfaceId list. * @apilevel low-level * @ast method * */ public int getNumSuperInterfaceIdNoTransform() { return getSuperInterfaceIdListNoTransform().getNumChildNoTransform(); } /** * Retrieves the element at index {@code i} in the SuperInterfaceId list.. * @param i Index of the element to return. * @return The element at position {@code i} in the SuperInterfaceId list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public Access getSuperInterfaceId(int i) { return (Access)getSuperInterfaceIdList().getChild(i); } /** * Append an element to the SuperInterfaceId list. * @param node The element to append to the SuperInterfaceId list. * @apilevel high-level * @ast method * */ public void addSuperInterfaceId(Access node) { List<Access> list = (parent == null || state == null) ? getSuperInterfaceIdListNoTransform() : getSuperInterfaceIdList(); list.addChild(node); } /** * @apilevel low-level * @ast method * */ public void addSuperInterfaceIdNoTransform(Access node) { List<Access> list = getSuperInterfaceIdListNoTransform(); list.addChild(node); } /** * Replaces the SuperInterfaceId list element at index {@code i} with the new node {@code node}. * @param node The new node to replace the old list element. * @param i The list index of the node to be replaced. * @apilevel high-level * @ast method * */ public void setSuperInterfaceId(Access node, int i) { List<Access> list = getSuperInterfaceIdList(); list.setChild(node, i); } /** * Retrieves the SuperInterfaceId list. * @return The node representing the SuperInterfaceId list. * @apilevel high-level * @ast method * */ public List<Access> getSuperInterfaceIds() { return getSuperInterfaceIdList(); } /** * Retrieves the SuperInterfaceId list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the SuperInterfaceId list. * @apilevel low-level * @ast method * */ public List<Access> getSuperInterfaceIdsNoTransform() { return getSuperInterfaceIdListNoTransform(); } /** * Retrieves the SuperInterfaceId list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the SuperInterfaceId list. * @apilevel low-level * @ast method * */ public List<Access> getSuperInterfaceIdListNoTransform() { return (List<Access>)getChildNoTransform(2); } /** * Retrieves the child position of the SuperInterfaceId list. * @return The the child position of the SuperInterfaceId list. * @apilevel low-level * @ast method * */ protected int getSuperInterfaceIdListChildPosition() { return 2; } /** * Replaces the BodyDecl list. * @param list The new list node to be used as the BodyDecl list. * @apilevel high-level * @ast method * */ public void setBodyDeclList(List<BodyDecl> list) { setChild(list, 3); } /** * Retrieves the number of children in the BodyDecl list. * @return Number of children in the BodyDecl list. * @apilevel high-level * @ast method * */ public int getNumBodyDecl() { return getBodyDeclList().getNumChild(); } /** * Retrieves the number of children in the BodyDecl list. * Calling this method will not trigger rewrites.. * @return Number of children in the BodyDecl list. * @apilevel low-level * @ast method * */ public int getNumBodyDeclNoTransform() { return getBodyDeclListNoTransform().getNumChildNoTransform(); } /** * Retrieves the element at index {@code i} in the BodyDecl list.. * @param i Index of the element to return. * @return The element at position {@code i} in the BodyDecl list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public BodyDecl getBodyDecl(int i) { return (BodyDecl)getBodyDeclList().getChild(i); } /** * Append an element to the BodyDecl list. * @param node The element to append to the BodyDecl list. * @apilevel high-level * @ast method * */ public void addBodyDecl(BodyDecl node) { List<BodyDecl> list = (parent == null || state == null) ? getBodyDeclListNoTransform() : getBodyDeclList(); list.addChild(node); } /** * @apilevel low-level * @ast method * */ public void addBodyDeclNoTransform(BodyDecl node) { List<BodyDecl> list = getBodyDeclListNoTransform(); list.addChild(node); } /** * Replaces the BodyDecl list element at index {@code i} with the new node {@code node}. * @param node The new node to replace the old list element. * @param i The list index of the node to be replaced. * @apilevel high-level * @ast method * */ public void setBodyDecl(BodyDecl node, int i) { List<BodyDecl> list = getBodyDeclList(); list.setChild(node, i); } /** * Retrieves the BodyDecl list. * @return The node representing the BodyDecl list. * @apilevel high-level * @ast method * */ public List<BodyDecl> getBodyDecls() { return getBodyDeclList(); } /** * Retrieves the BodyDecl list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the BodyDecl list. * @apilevel low-level * @ast method * */ public List<BodyDecl> getBodyDeclsNoTransform() { return getBodyDeclListNoTransform(); } /** * Retrieves the BodyDecl list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the BodyDecl list. * @apilevel low-level * @ast method * */ public List<BodyDecl> getBodyDeclListNoTransform() { return (List<BodyDecl>)getChildNoTransform(3); } /** * Retrieves the child position of the BodyDecl list. * @return The the child position of the BodyDecl list. * @apilevel low-level * @ast method * */ protected int getBodyDeclListChildPosition() { return 3; } /** * @apilevel internal */ protected int involvesTypeParameters_visited = -1; /** * @apilevel internal */ protected boolean involvesTypeParameters_computed = false; /** * @apilevel internal */ protected boolean involvesTypeParameters_initialized = false; /** * @apilevel internal */ protected boolean involvesTypeParameters_value; /** * @attribute syn * @aspect GenericMethodsInference * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericMethodsInference.jrag:24 */ @SuppressWarnings({"unchecked", "cast"}) public boolean involvesTypeParameters() { if(involvesTypeParameters_computed) { return involvesTypeParameters_value; } ASTNode$State state = state(); if (!involvesTypeParameters_initialized) { involvesTypeParameters_initialized = true; involvesTypeParameters_value = false; } if (!state.IN_CIRCLE) { state.IN_CIRCLE = true; int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); do { involvesTypeParameters_visited = state.CIRCLE_INDEX; state.CHANGE = false; boolean new_involvesTypeParameters_value = involvesTypeParameters_compute(); if (new_involvesTypeParameters_value!=involvesTypeParameters_value) state.CHANGE = true; involvesTypeParameters_value = new_involvesTypeParameters_value; state.CIRCLE_INDEX++; } while (state.CHANGE); if(isFinal && num == state().boundariesCrossed) { involvesTypeParameters_computed = true; } else { state.RESET_CYCLE = true; involvesTypeParameters_compute(); state.RESET_CYCLE = false; involvesTypeParameters_computed = false; involvesTypeParameters_initialized = false; } state.IN_CIRCLE = false; return involvesTypeParameters_value; } if(involvesTypeParameters_visited != state.CIRCLE_INDEX) { involvesTypeParameters_visited = state.CIRCLE_INDEX; if (state.RESET_CYCLE) { involvesTypeParameters_computed = false; involvesTypeParameters_initialized = false; involvesTypeParameters_visited = -1; return involvesTypeParameters_value; } boolean new_involvesTypeParameters_value = involvesTypeParameters_compute(); if (new_involvesTypeParameters_value!=involvesTypeParameters_value) state.CHANGE = true; involvesTypeParameters_value = new_involvesTypeParameters_value; return involvesTypeParameters_value; } return involvesTypeParameters_value; } /** * @apilevel internal */ private boolean involvesTypeParameters_compute() { for(int i = 0; i < getNumArgument(); i++) if(getArgument(i).type().involvesTypeParameters()) return true; return false; } /** * @attribute syn * @aspect NestedTypes * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeAnalysis.jrag:569 */ public TypeDecl hostType() { ASTNode$State state = state(); try { return original(); } finally { } } /** * @attribute syn * @aspect Generics * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:245 */ public boolean isRawType() { ASTNode$State state = state(); try { return isNestedType() && enclosingType().isRawType(); } finally { } } /** * @apilevel internal */ protected boolean erasure_computed = false; /** * @apilevel internal */ protected TypeDecl erasure_value; /** * @attribute syn * @aspect GenericsErasure * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:351 */ @SuppressWarnings({"unchecked", "cast"}) public TypeDecl erasure() { if(erasure_computed) { return erasure_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); erasure_value = erasure_compute(); if(isFinal && num == state().boundariesCrossed) erasure_computed = true; return erasure_value; } /** * @apilevel internal */ private TypeDecl erasure_compute() { return genericDecl(); } /** * @apilevel internal */ protected boolean getSuperInterfaceIdList_computed = false; /** * @apilevel internal */ protected List getSuperInterfaceIdList_value; /** * @attribute syn nta * @aspect LookupParTypeDecl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:1037 */ @SuppressWarnings({"unchecked", "cast"}) public List getSuperInterfaceIdList() { if(getSuperInterfaceIdList_computed) { return (List) getChild(getSuperInterfaceIdListChildPosition()); } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); getSuperInterfaceIdList_value = getSuperInterfaceIdList_compute(); setSuperInterfaceIdList(getSuperInterfaceIdList_value); if(isFinal && num == state().boundariesCrossed) getSuperInterfaceIdList_computed = true; return (List) getChild(getSuperInterfaceIdListChildPosition()); } /** * @apilevel internal */ private List getSuperInterfaceIdList_compute() { GenericInterfaceDecl decl = (GenericInterfaceDecl)genericDecl(); //System.err.println("Begin substituting implements list"); List list = decl.getSuperInterfaceIdList().substitute(this); //System.err.println("End substituting implements list"); return list; } /** * @apilevel internal */ protected boolean getBodyDeclList_computed = false; /** * @apilevel internal */ protected List getBodyDeclList_value; /** * @attribute syn nta * @aspect LookupParTypeDecl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:1047 */ @SuppressWarnings({"unchecked", "cast"}) public List getBodyDeclList() { if(getBodyDeclList_computed) { return (List) getChild(getBodyDeclListChildPosition()); } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); getBodyDeclList_value = getBodyDeclList_compute(); setBodyDeclList(getBodyDeclList_value); if(isFinal && num == state().boundariesCrossed) getBodyDeclList_computed = true; return (List) getChild(getBodyDeclListChildPosition()); } /** * @apilevel internal */ private List getBodyDeclList_compute() { return new BodyDeclList(); } /** * @attribute syn * @aspect GenericsSubtype * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericsSubtype.jrag:14 */ public boolean supertypeGenericClassDecl(GenericClassDecl type) { ASTNode$State state = state(); try { return type.subtype(genericDecl().original()); } finally { } } /** * @attribute syn * @aspect GenericsSubtype * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericsSubtype.jrag:20 */ public boolean supertypeGenericInterfaceDecl(GenericInterfaceDecl type) { ASTNode$State state = state(); try { return type.subtype(genericDecl().original()); } finally { } } /** * @attribute syn * @aspect GenericsSubtype * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericsSubtype.jrag:421 */ public boolean supertypeClassDecl(ClassDecl type) { ASTNode$State state = state(); try { return super.supertypeClassDecl(type); } finally { } } protected java.util.Map subtype_TypeDecl_values; /** * @attribute syn * @aspect GenericsSubtype * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericsSubtype.jrag:128 */ @SuppressWarnings({"unchecked", "cast"}) public boolean subtype(TypeDecl type) { Object _parameters = type; if(subtype_TypeDecl_values == null) subtype_TypeDecl_values = new java.util.HashMap(4); ASTNode$State.CircularValue _value; if(subtype_TypeDecl_values.containsKey(_parameters)) { Object _o = subtype_TypeDecl_values.get(_parameters); if(!(_o instanceof ASTNode$State.CircularValue)) { return ((Boolean)_o).booleanValue(); } else _value = (ASTNode$State.CircularValue)_o; } else { _value = new ASTNode$State.CircularValue(); subtype_TypeDecl_values.put(_parameters, _value); _value.value = Boolean.valueOf(true); } ASTNode$State state = state(); if (!state.IN_CIRCLE) { state.IN_CIRCLE = true; int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); boolean new_subtype_TypeDecl_value; do { _value.visited = new Integer(state.CIRCLE_INDEX); state.CHANGE = false; new_subtype_TypeDecl_value = subtype_compute(type); if (new_subtype_TypeDecl_value!=((Boolean)_value.value).booleanValue()) { state.CHANGE = true; _value.value = Boolean.valueOf(new_subtype_TypeDecl_value); } state.CIRCLE_INDEX++; } while (state.CHANGE); if(isFinal && num == state().boundariesCrossed) { subtype_TypeDecl_values.put(_parameters, new_subtype_TypeDecl_value); } else { subtype_TypeDecl_values.remove(_parameters); state.RESET_CYCLE = true; subtype_compute(type); state.RESET_CYCLE = false; } state.IN_CIRCLE = false; return new_subtype_TypeDecl_value; } if(!new Integer(state.CIRCLE_INDEX).equals(_value.visited)) { _value.visited = new Integer(state.CIRCLE_INDEX); boolean new_subtype_TypeDecl_value = subtype_compute(type); if (state.RESET_CYCLE) { subtype_TypeDecl_values.remove(_parameters); } else if (new_subtype_TypeDecl_value!=((Boolean)_value.value).booleanValue()) { state.CHANGE = true; _value.value = new_subtype_TypeDecl_value; } return new_subtype_TypeDecl_value; } return ((Boolean)_value.value).booleanValue(); } /** * @apilevel internal */ private boolean subtype_compute(TypeDecl type) { return type.supertypeParInterfaceDecl(this); } /** * @attribute syn * @aspect GenericsSubtype * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericsSubtype.jrag:26 */ public boolean supertypeRawClassDecl(RawClassDecl type) { ASTNode$State state = state(); try { return type.genericDecl().original().subtype(genericDecl().original()); } finally { } } /** * @attribute syn * @aspect GenericsSubtype * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericsSubtype.jrag:30 */ public boolean supertypeRawInterfaceDecl(RawInterfaceDecl type) { ASTNode$State state = state(); try { return type.genericDecl().original().subtype(genericDecl().original()); } finally { } } protected java.util.Map sameStructure_TypeDecl_values; /** * @attribute syn * @aspect GenericsSubtype * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericsSubtype.jrag:194 */ @SuppressWarnings({"unchecked", "cast"}) public boolean sameStructure(TypeDecl t) { Object _parameters = t; if(sameStructure_TypeDecl_values == null) sameStructure_TypeDecl_values = new java.util.HashMap(4); ASTNode$State.CircularValue _value; if(sameStructure_TypeDecl_values.containsKey(_parameters)) { Object _o = sameStructure_TypeDecl_values.get(_parameters); if(!(_o instanceof ASTNode$State.CircularValue)) { return ((Boolean)_o).booleanValue(); } else _value = (ASTNode$State.CircularValue)_o; } else { _value = new ASTNode$State.CircularValue(); sameStructure_TypeDecl_values.put(_parameters, _value); _value.value = Boolean.valueOf(true); } ASTNode$State state = state(); if (!state.IN_CIRCLE) { state.IN_CIRCLE = true; int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); boolean new_sameStructure_TypeDecl_value; do { _value.visited = new Integer(state.CIRCLE_INDEX); state.CHANGE = false; new_sameStructure_TypeDecl_value = sameStructure_compute(t); if (new_sameStructure_TypeDecl_value!=((Boolean)_value.value).booleanValue()) { state.CHANGE = true; _value.value = Boolean.valueOf(new_sameStructure_TypeDecl_value); } state.CIRCLE_INDEX++; } while (state.CHANGE); if(isFinal && num == state().boundariesCrossed) { sameStructure_TypeDecl_values.put(_parameters, new_sameStructure_TypeDecl_value); } else { sameStructure_TypeDecl_values.remove(_parameters); state.RESET_CYCLE = true; sameStructure_compute(t); state.RESET_CYCLE = false; } state.IN_CIRCLE = false; return new_sameStructure_TypeDecl_value; } if(!new Integer(state.CIRCLE_INDEX).equals(_value.visited)) { _value.visited = new Integer(state.CIRCLE_INDEX); boolean new_sameStructure_TypeDecl_value = sameStructure_compute(t); if (state.RESET_CYCLE) { sameStructure_TypeDecl_values.remove(_parameters); } else if (new_sameStructure_TypeDecl_value!=((Boolean)_value.value).booleanValue()) { state.CHANGE = true; _value.value = new_sameStructure_TypeDecl_value; } return new_sameStructure_TypeDecl_value; } return ((Boolean)_value.value).booleanValue(); } /** * @apilevel internal */ private boolean sameStructure_compute(TypeDecl t) { if(!(t instanceof ParInterfaceDecl)) return false; ParInterfaceDecl type = (ParInterfaceDecl)t; if(type.genericDecl().original() == genericDecl().original() && type.getNumArgument() == getNumArgument()) { for(int i = 0; i < getNumArgument(); i++) if(!type.getArgument(i).type().sameStructure(getArgument(i).type())) return false; if(isNestedType() && type.isNestedType()) return type.enclosingType().sameStructure(enclosingType()); return true; } return false; } /** * @attribute syn * @aspect GenericsSubtype * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericsSubtype.jrag:125 */ public boolean supertypeParClassDecl(ParClassDecl type) { ASTNode$State state = state(); try { if(type.genericDecl().original() == genericDecl().original() && type.getNumArgument() == getNumArgument()) { for(int i = 0; i < getNumArgument(); i++) if(!type.getArgument(i).type().containedIn(getArgument(i).type())) return false; if(isNestedType() && type.isNestedType()) return type.enclosingType().subtype(enclosingType()); return true; } return supertypeClassDecl(type); } finally { } } /** * @attribute syn * @aspect GenericsSubtype * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericsSubtype.jrag:129 */ public boolean supertypeParInterfaceDecl(ParInterfaceDecl type) { ASTNode$State state = state(); try { if(type.genericDecl().original() == genericDecl().original() && type.getNumArgument() == getNumArgument()) { for(int i = 0; i < getNumArgument(); i++) if(!type.getArgument(i).type().containedIn(getArgument(i).type())) return false; if(isNestedType() && type.isNestedType()) return type.enclosingType().subtype(enclosingType()); return true; } return supertypeInterfaceDecl(type); } finally { } } protected java.util.Map instanceOf_TypeDecl_values; /** * @attribute syn * @aspect GenericsSubtype * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericsSubtype.jrag:398 */ @SuppressWarnings({"unchecked", "cast"}) public boolean instanceOf(TypeDecl type) { Object _parameters = type; if(instanceOf_TypeDecl_values == null) instanceOf_TypeDecl_values = new java.util.HashMap(4); if(instanceOf_TypeDecl_values.containsKey(_parameters)) { return ((Boolean)instanceOf_TypeDecl_values.get(_parameters)).booleanValue(); } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); boolean instanceOf_TypeDecl_value = instanceOf_compute(type); if(isFinal && num == state().boundariesCrossed) instanceOf_TypeDecl_values.put(_parameters, Boolean.valueOf(instanceOf_TypeDecl_value)); return instanceOf_TypeDecl_value; } /** * @apilevel internal */ private boolean instanceOf_compute(TypeDecl type) { return subtype(type); } /** * A type is reifiable if it either refers to a non-parameterized type, * is a raw type, is a parameterized type with only unbound wildcard * parameters or is an array type with a reifiable type parameter. * * @see "JLSv3 &sect;4.7" * @attribute syn * @aspect SafeVarargs * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/SafeVarargs.jrag:106 */ public boolean isReifiable() { ASTNode$State state = state(); try { if (isRawType()) return true; for (int i = 0; i < getNumArgument(); ++i) { if (!getArgument(i).type().isWildcard()) return false; } return true; } finally { } } /** * @attribute syn * @aspect Generics * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:244 */ public boolean isParameterizedType() { ASTNode$State state = state(); try { return true; } finally { } } /** * @attribute syn * @aspect GenericsTypeCheck * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:380 */ public boolean sameArgument(ParTypeDecl decl) { ASTNode$State state = state(); try { if(this == decl) return true; if(genericDecl() != decl.genericDecl()) return false; for(int i = 0; i < getNumArgument(); i++) { TypeDecl t1 = getArgument(i).type(); TypeDecl t2 = decl.getArgument(i).type(); if(t1 instanceof ParTypeDecl && t2 instanceof ParTypeDecl) { if(!((ParTypeDecl)t1).sameArgument((ParTypeDecl)t2)) return false; } else { if(t1 != t2) return false; } } return true; } finally { } } /** * @attribute syn * @aspect LookupParTypeDecl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:577 */ public boolean sameSignature(Access a) { ASTNode$State state = state(); try { if(a instanceof ParTypeAccess) { ParTypeAccess ta = (ParTypeAccess)a; if(genericDecl() != ta.genericDecl()) return false; if(getNumArgument() != ta.getNumTypeArgument()) return false; for(int i = 0; i < getNumArgument(); i++) if(!getArgument(i).type().sameSignature(ta.getTypeArgument(i))) return false; return true; } else if(a instanceof TypeAccess && ((TypeAccess)a).isRaw()) return false; return super.sameSignature(a); } finally { } } protected java.util.Map sameSignature_ArrayList_values; /** * @attribute syn * @aspect LookupParTypeDecl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:612 */ @SuppressWarnings({"unchecked", "cast"}) public boolean sameSignature(ArrayList list) { Object _parameters = list; if(sameSignature_ArrayList_values == null) sameSignature_ArrayList_values = new java.util.HashMap(4); ASTNode$State.CircularValue _value; if(sameSignature_ArrayList_values.containsKey(_parameters)) { Object _o = sameSignature_ArrayList_values.get(_parameters); if(!(_o instanceof ASTNode$State.CircularValue)) { return ((Boolean)_o).booleanValue(); } else _value = (ASTNode$State.CircularValue)_o; } else { _value = new ASTNode$State.CircularValue(); sameSignature_ArrayList_values.put(_parameters, _value); _value.value = Boolean.valueOf(true); } ASTNode$State state = state(); if (!state.IN_CIRCLE) { state.IN_CIRCLE = true; int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); boolean new_sameSignature_ArrayList_value; do { _value.visited = new Integer(state.CIRCLE_INDEX); state.CHANGE = false; new_sameSignature_ArrayList_value = sameSignature_compute(list); if (new_sameSignature_ArrayList_value!=((Boolean)_value.value).booleanValue()) { state.CHANGE = true; _value.value = Boolean.valueOf(new_sameSignature_ArrayList_value); } state.CIRCLE_INDEX++; } while (state.CHANGE); if(isFinal && num == state().boundariesCrossed) { sameSignature_ArrayList_values.put(_parameters, new_sameSignature_ArrayList_value); } else { sameSignature_ArrayList_values.remove(_parameters); state.RESET_CYCLE = true; sameSignature_compute(list); state.RESET_CYCLE = false; } state.IN_CIRCLE = false; return new_sameSignature_ArrayList_value; } if(!new Integer(state.CIRCLE_INDEX).equals(_value.visited)) { _value.visited = new Integer(state.CIRCLE_INDEX); boolean new_sameSignature_ArrayList_value = sameSignature_compute(list); if (state.RESET_CYCLE) { sameSignature_ArrayList_values.remove(_parameters); } else if (new_sameSignature_ArrayList_value!=((Boolean)_value.value).booleanValue()) { state.CHANGE = true; _value.value = new_sameSignature_ArrayList_value; } return new_sameSignature_ArrayList_value; } return ((Boolean)_value.value).booleanValue(); } /** * @apilevel internal */ private boolean sameSignature_compute(ArrayList list) { if(getNumArgument() != list.size()) return false; for(int i = 0; i < list.size(); i++) if(getArgument(i).type() != list.get(i)) return false; return true; } /** * @apilevel internal */ protected int usesTypeVariable_visited = -1; /** * @apilevel internal */ protected boolean usesTypeVariable_computed = false; /** * @apilevel internal */ protected boolean usesTypeVariable_initialized = false; /** * @apilevel internal */ protected boolean usesTypeVariable_value; /** * @attribute syn * @aspect LookupParTypeDecl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:1069 */ @SuppressWarnings({"unchecked", "cast"}) public boolean usesTypeVariable() { if(usesTypeVariable_computed) { return usesTypeVariable_value; } ASTNode$State state = state(); if (!usesTypeVariable_initialized) { usesTypeVariable_initialized = true; usesTypeVariable_value = false; } if (!state.IN_CIRCLE) { state.IN_CIRCLE = true; int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); do { usesTypeVariable_visited = state.CIRCLE_INDEX; state.CHANGE = false; boolean new_usesTypeVariable_value = usesTypeVariable_compute(); if (new_usesTypeVariable_value!=usesTypeVariable_value) state.CHANGE = true; usesTypeVariable_value = new_usesTypeVariable_value; state.CIRCLE_INDEX++; } while (state.CHANGE); if(isFinal && num == state().boundariesCrossed) { usesTypeVariable_computed = true; } else { state.RESET_CYCLE = true; usesTypeVariable_compute(); state.RESET_CYCLE = false; usesTypeVariable_computed = false; usesTypeVariable_initialized = false; } state.IN_CIRCLE = false; return usesTypeVariable_value; } if(usesTypeVariable_visited != state.CIRCLE_INDEX) { usesTypeVariable_visited = state.CIRCLE_INDEX; if (state.RESET_CYCLE) { usesTypeVariable_computed = false; usesTypeVariable_initialized = false; usesTypeVariable_visited = -1; return usesTypeVariable_value; } boolean new_usesTypeVariable_value = usesTypeVariable_compute(); if (new_usesTypeVariable_value!=usesTypeVariable_value) state.CHANGE = true; usesTypeVariable_value = new_usesTypeVariable_value; return usesTypeVariable_value; } return usesTypeVariable_value; } /** * @apilevel internal */ private boolean usesTypeVariable_compute() { if(super.usesTypeVariable()) return true; for(int i = 0; i < getNumArgument(); i++) if(getArgument(i).type().usesTypeVariable()) return true; return false; } /** * @attribute syn * @aspect LookupParTypeDecl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:1306 */ public TypeDecl original() { ASTNode$State state = state(); try { return genericDecl().original(); } finally { } } /** * @apilevel internal */ protected boolean sourceTypeDecl_computed = false; /** * @apilevel internal */ protected TypeDecl sourceTypeDecl_value; /** * @attribute syn * @aspect SourceDeclarations * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:1505 */ @SuppressWarnings({"unchecked", "cast"}) public TypeDecl sourceTypeDecl() { if(sourceTypeDecl_computed) { return sourceTypeDecl_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); sourceTypeDecl_value = sourceTypeDecl_compute(); if(isFinal && num == state().boundariesCrossed) sourceTypeDecl_computed = true; return sourceTypeDecl_value; } /** * @apilevel internal */ private TypeDecl sourceTypeDecl_compute() { return genericDecl().original().sourceTypeDecl(); } /** * @apilevel internal */ protected boolean fullName_computed = false; /** * @apilevel internal */ protected String fullName_value; /** * @attribute syn * @aspect GenericsParTypeDecl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericsParTypeDecl.jrag:12 */ @SuppressWarnings({"unchecked", "cast"}) public String fullName() { if(fullName_computed) { return fullName_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); fullName_value = fullName_compute(); if(isFinal && num == state().boundariesCrossed) fullName_computed = true; return fullName_value; } /** * @apilevel internal */ private String fullName_compute() { if(isNestedType()) return enclosingType().fullName() + "." + nameWithArgs(); String packageName = packageName(); if(packageName.equals("")) return nameWithArgs(); return packageName + "." + nameWithArgs(); } /** * @apilevel internal */ protected boolean typeName_computed = false; /** * @apilevel internal */ protected String typeName_value; /** * @attribute syn * @aspect GenericsParTypeDecl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericsParTypeDecl.jrag:21 */ @SuppressWarnings({"unchecked", "cast"}) public String typeName() { if(typeName_computed) { return typeName_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); typeName_value = typeName_compute(); if(isFinal && num == state().boundariesCrossed) typeName_computed = true; return typeName_value; } /** * @apilevel internal */ private String typeName_compute() { if(isNestedType()) return enclosingType().typeName() + "." + nameWithArgs(); String packageName = packageName(); if(packageName.equals("") || packageName.equals(PRIMITIVE_PACKAGE_NAME)) return nameWithArgs(); return packageName + "." + nameWithArgs(); } /** * @attribute syn * @aspect GenericsParTypeDecl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericsParTypeDecl.jrag:30 */ public String nameWithArgs() { ASTNode$State state = state(); try { StringBuffer s = new StringBuffer(); s.append(name()); s.append("<"); for(int i = 0; i < getNumArgument(); i++) { if(i != 0) s.append(", "); s.append(getArgument(i).type().fullName()); } s.append(">"); return s.toString(); } finally { } } /** * @apilevel internal */ protected boolean unimplementedMethods_computed = false; /** * @apilevel internal */ protected Collection unimplementedMethods_value; /** * @attribute syn * @aspect MethodSignature15 * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/MethodSignature.jrag:406 */ @SuppressWarnings({"unchecked", "cast"}) public Collection unimplementedMethods() { if(unimplementedMethods_computed) { return unimplementedMethods_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); unimplementedMethods_value = unimplementedMethods_compute(); if(isFinal && num == state().boundariesCrossed) unimplementedMethods_computed = true; return unimplementedMethods_value; } /** * @apilevel internal */ private Collection unimplementedMethods_compute() { HashSet set = new HashSet(); HashSet result = new HashSet(); for(Iterator iter = genericDecl().unimplementedMethods().iterator(); iter.hasNext(); ) { MethodDecl m = (MethodDecl)iter.next(); set.add(m.sourceMethodDecl()); } for(Iterator iter = super.unimplementedMethods().iterator(); iter.hasNext(); ) { MethodDecl m = (MethodDecl)iter.next(); if(set.contains(m.sourceMethodDecl())) result.add(m); } return result; } /** * @apilevel internal */ protected boolean localMethodsSignatureMap_computed = false; /** * @apilevel internal */ protected HashMap localMethodsSignatureMap_value; /** * @attribute syn * @aspect LookupParTypeDecl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:1084 */ @SuppressWarnings({"unchecked", "cast"}) public HashMap localMethodsSignatureMap() { if(localMethodsSignatureMap_computed) { return localMethodsSignatureMap_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); localMethodsSignatureMap_value = localMethodsSignatureMap_compute(); if(true) localMethodsSignatureMap_computed = true; return localMethodsSignatureMap_value; } /** * @apilevel internal */ private HashMap localMethodsSignatureMap_compute() { HashMap map = new HashMap(); for(Iterator iter = original().localMethodsIterator(); iter.hasNext(); ) { MethodDecl decl = (MethodDecl)iter.next(); /* ES removing this: if(!decl.isStatic() && (decl.usesTypeVariable() || isRawType())) { BodyDecl b = decl.substitutedBodyDecl(this); addBodyDecl(b); // Here we should access b through an ordinary // child accessor instead of setting is$Final directly, // however doing so appears to cause unexpected behaviour! b.is$Final = true; decl = (MethodDecl) b; } map.put(decl.signature(), decl); * and replacing with: */ if(!decl.isStatic() && (decl.usesTypeVariable() || isRawType())) { BodyDecl copyDecl = ((BodyDeclList)getBodyDeclList()).localMethodSignatureCopy(decl, this); decl = (MethodDecl) copyDecl; } map.put(decl.signature(), decl); } return map; } protected java.util.Map localFields_String_values; /** * @attribute syn * @aspect LookupParTypeDecl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:1119 */ @SuppressWarnings({"unchecked", "cast"}) public SimpleSet localFields(String name) { Object _parameters = name; if(localFields_String_values == null) localFields_String_values = new java.util.HashMap(4); if(localFields_String_values.containsKey(_parameters)) { return (SimpleSet)localFields_String_values.get(_parameters); } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); SimpleSet localFields_String_value = localFields_compute(name); if(true) localFields_String_values.put(_parameters, localFields_String_value); return localFields_String_value; } /** * @apilevel internal */ private SimpleSet localFields_compute(String name) { SimpleSet set = SimpleSet.emptySet; for(Iterator iter = original().localFields(name).iterator(); iter.hasNext(); ) { FieldDeclaration f = (FieldDeclaration)iter.next(); /* ES removing this: if(!f.isStatic() && (f.usesTypeVariable() || isRawType())) { BodyDecl b = f.substitutedBodyDecl(this); addBodyDecl(b); // Here we should access b through an ordinary // child accessor instead of setting is$Final directly, // however doing so appears to cause unexpected behaviour! b.is$Final = true; f = (FieldDeclaration) b; } set = set.add(f); * and replacing with: */ if(!f.isStatic() && (f.usesTypeVariable() || isRawType())) { BodyDecl fCopy = ((BodyDeclList)getBodyDeclList()).localFieldCopy(f, this); f = (FieldDeclaration) fCopy; } set = set.add(f); } return set; } protected java.util.Map localTypeDecls_String_values; /** * @attribute syn * @aspect LookupParTypeDecl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:1154 */ @SuppressWarnings({"unchecked", "cast"}) public SimpleSet localTypeDecls(String name) { Object _parameters = name; if(localTypeDecls_String_values == null) localTypeDecls_String_values = new java.util.HashMap(4); ASTNode$State.CircularValue _value; if(localTypeDecls_String_values.containsKey(_parameters)) { Object _o = localTypeDecls_String_values.get(_parameters); if(!(_o instanceof ASTNode$State.CircularValue)) { return (SimpleSet)_o; } else _value = (ASTNode$State.CircularValue)_o; } else { _value = new ASTNode$State.CircularValue(); localTypeDecls_String_values.put(_parameters, _value); _value.value = SimpleSet.emptySet; } ASTNode$State state = state(); if (!state.IN_CIRCLE) { state.IN_CIRCLE = true; int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); SimpleSet new_localTypeDecls_String_value; do { _value.visited = new Integer(state.CIRCLE_INDEX); state.CHANGE = false; new_localTypeDecls_String_value = localTypeDecls_compute(name); if ((new_localTypeDecls_String_value==null && (SimpleSet)_value.value!=null) || (new_localTypeDecls_String_value!=null && !new_localTypeDecls_String_value.equals((SimpleSet)_value.value))) { state.CHANGE = true; _value.value = new_localTypeDecls_String_value; } state.CIRCLE_INDEX++; } while (state.CHANGE); if(true) { localTypeDecls_String_values.put(_parameters, new_localTypeDecls_String_value); } else { localTypeDecls_String_values.remove(_parameters); state.RESET_CYCLE = true; localTypeDecls_compute(name); state.RESET_CYCLE = false; } state.IN_CIRCLE = false; return new_localTypeDecls_String_value; } if(!new Integer(state.CIRCLE_INDEX).equals(_value.visited)) { _value.visited = new Integer(state.CIRCLE_INDEX); SimpleSet new_localTypeDecls_String_value = localTypeDecls_compute(name); if (state.RESET_CYCLE) { localTypeDecls_String_values.remove(_parameters); } else if ((new_localTypeDecls_String_value==null && (SimpleSet)_value.value!=null) || (new_localTypeDecls_String_value!=null && !new_localTypeDecls_String_value.equals((SimpleSet)_value.value))) { state.CHANGE = true; _value.value = new_localTypeDecls_String_value; } return new_localTypeDecls_String_value; } return (SimpleSet)_value.value; } /** * @apilevel internal */ private SimpleSet localTypeDecls_compute(String name) { SimpleSet set = SimpleSet.emptySet; for(Iterator iter = original().localTypeDecls(name).iterator(); iter.hasNext(); ) { TypeDecl t = (TypeDecl)iter.next(); /* ES: removing this: if(t.isStatic()) set = set.add(t); else { BodyDecl b; TypeDecl typeDecl; if(t instanceof ClassDecl) { ClassDecl classDecl = (ClassDecl)t; typeDecl = classDecl.substitutedClassDecl(this); b = new MemberClassDecl((ClassDecl)typeDecl); addBodyDecl(b); // Here we should access b through an ordinary // child accessor instead of setting is$Final directly, // however doing so appears to cause unexpected behaviour! b.is$Final = true; set = set.add(typeDecl); } else if(t instanceof InterfaceDecl) { InterfaceDecl interfaceDecl = (InterfaceDecl)t; typeDecl = interfaceDecl.substitutedInterfaceDecl(this); b = new MemberInterfaceDecl((InterfaceDecl)typeDecl); addBodyDecl(b); // Here we should access b through an ordinary // child accessor instead of setting is$Final directly, // however doing so appears to cause unexpected behaviour! b.is$Final = true; set = set.add(typeDecl); } } * and replacing with: */ if(t.isStatic()) { set = set.add(t); } else if (t instanceof ClassDecl) { MemberClassDecl copy = ((BodyDeclList)getBodyDeclList()).localClassDeclCopy((ClassDecl)t, this); set = set.add(copy.getClassDecl()); } else if (t instanceof InterfaceDecl) { MemberInterfaceDecl copy = ((BodyDeclList)getBodyDeclList()).localInterfaceDeclCopy((InterfaceDecl)t, this); set = set.add(copy.getInterfaceDecl()); } } return set; } /** * @apilevel internal */ protected boolean constructors_computed = false; /** * @apilevel internal */ protected Collection constructors_value; /** * @attribute syn * @aspect LookupParTypeDecl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:1213 */ @SuppressWarnings({"unchecked", "cast"}) public Collection constructors() { if(constructors_computed) { return constructors_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); constructors_value = constructors_compute(); if(isFinal && num == state().boundariesCrossed) constructors_computed = true; return constructors_value; } /** * @apilevel internal */ private Collection constructors_compute() { Collection set = new ArrayList(); for(Iterator iter = original().constructors().iterator(); iter.hasNext(); ) { ConstructorDecl c = (ConstructorDecl)iter.next(); /* ES: removing this: BodyDecl b = c.substitutedBodyDecl(this); addBodyDecl(b); // Here we should access b through an ordinary // child accessor instead of setting is$Final directly, // however doing so appears to cause unexpected behaviour! b.is$Final = true; * and replacing with: */ BodyDecl b = ((BodyDeclList)getBodyDeclList()).constructorCopy(c, this); set.add(b); } return set; } /** * @apilevel internal */ protected boolean genericDecl_computed = false; /** * @apilevel internal */ protected TypeDecl genericDecl_value; /** * @attribute inh * @aspect GenericsParTypeDecl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericsParTypeDecl.jrag:45 */ @SuppressWarnings({"unchecked", "cast"}) public TypeDecl genericDecl() { if(genericDecl_computed) { return genericDecl_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); genericDecl_value = getParent().Define_TypeDecl_genericDecl(this, null); if(isFinal && num == state().boundariesCrossed) genericDecl_computed = true; return genericDecl_value; } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:477 * @apilevel internal */ public NameType Define_NameType_nameType(ASTNode caller, ASTNode child) { if(caller == getArgumentListNoTransform()) { int childIndex = caller.getIndexOfChild(child); return NameType.TYPE_NAME; } else { return super.Define_NameType_nameType(caller, child); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericsParTypeDecl.jrag:59 * @apilevel internal */ public TypeDecl Define_TypeDecl_genericDecl(ASTNode caller, ASTNode child) { if(caller == getBodyDeclListNoTransform()) { int index = caller.getIndexOfChild(child); { if(getBodyDecl(index) instanceof MemberTypeDecl) { MemberTypeDecl m = (MemberTypeDecl)getBodyDecl(index); return extractSingleType(genericDecl().memberTypes(m.typeDecl().name())); } return genericDecl(); } } else { return getParent().Define_TypeDecl_genericDecl(this, caller); } } /** * @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); } }
63,570
31.533777
229
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/ParMethodAccess.java
/* This file was generated with JastAdd2 (http://jastadd.org) version R20130212 (r1031) */ package soot.JastAddJ; import java.util.HashSet; 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; /** * @production ParMethodAccess : {@link MethodAccess} ::= <span class="component">TypeArgument:{@link Access}*</span>; * @ast node * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericMethods.ast:13 */ public class ParMethodAccess extends MethodAccess implements Cloneable { /** * @apilevel low-level */ public void flushCache() { super.flushCache(); typeArguments_MethodDecl_values = null; } /** * @apilevel internal */ public void flushCollectionCache() { super.flushCollectionCache(); } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public ParMethodAccess clone() throws CloneNotSupportedException { ParMethodAccess node = (ParMethodAccess)super.clone(); node.typeArguments_MethodDecl_values = null; node.in$Circle(false); node.is$Final(false); return node; } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public ParMethodAccess copy() { try { ParMethodAccess node = (ParMethodAccess) clone(); node.parent = null; if(children != null) node.children = (ASTNode[]) children.clone(); return node; } catch (CloneNotSupportedException e) { throw new Error("Error: clone not supported for " + getClass().getName()); } } /** * Create a deep copy of the AST subtree at this node. * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level */ @SuppressWarnings({"unchecked", "cast"}) public ParMethodAccess fullCopy() { ParMethodAccess tree = (ParMethodAccess) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) children[i]; if(child != null) { child = child.fullCopy(); tree.setChild(child, i); } } } return tree; } /** * @ast method * @aspect GenericMethods * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericMethods.jrag:11 */ public void typeCheck() { super.typeCheck(); if(!decl().hostType().isUnknown()) { if(!(decl() instanceof ParMethodDecl)) error("can not have type parameters on a non generic method"); else { ParMethodDecl m = (ParMethodDecl)decl(); if(!(m instanceof RawMethodDecl) && m.numTypeParameter() != getNumTypeArgument()) error("generic method " + m.signature() + " requires " + m.numTypeParameter() + " type arguments"); else { } } } } /** * @ast method * @aspect GenericMethodsPrettyPrint * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericMethods.jrag:179 */ public void toString(StringBuffer s) { s.append("<"); for(int i = 0; i < getNumTypeArgument(); i++) { if(i != 0) s.append(", "); getTypeArgument(i).toString(s); } s.append(">"); super.toString(s); } /** * @ast method * */ public ParMethodAccess() { super(); } /** * Initializes the child array to the correct size. * Initializes List and Opt nta children. * @apilevel internal * @ast method * @ast method * */ public void init$Children() { children = new ASTNode[2]; setChild(new List(), 0); setChild(new List(), 1); } /** * @ast method * */ public ParMethodAccess(String p0, List<Expr> p1, List<Access> p2) { setID(p0); setChild(p1, 0); setChild(p2, 1); } /** * @ast method * */ public ParMethodAccess(beaver.Symbol p0, List<Expr> p1, List<Access> p2) { setID(p0); setChild(p1, 0); setChild(p2, 1); } /** * @apilevel low-level * @ast method * */ protected int numChildren() { return 2; } /** * @apilevel internal * @ast method * */ public boolean mayHaveRewrite() { return false; } /** * Replaces the lexeme ID. * @param value The new value for the lexeme ID. * @apilevel high-level * @ast method * */ public void setID(String value) { tokenString_ID = value; } /** * JastAdd-internal setter for lexeme ID using the Beaver parser. * @apilevel internal * @ast method * */ 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(); } /** * Retrieves the value for the lexeme ID. * @return The value for the lexeme ID. * @apilevel high-level * @ast method * */ public String getID() { return tokenString_ID != null ? tokenString_ID : ""; } /** * Replaces the Arg list. * @param list The new list node to be used as the Arg list. * @apilevel high-level * @ast method * */ public void setArgList(List<Expr> list) { setChild(list, 0); } /** * Retrieves the number of children in the Arg list. * @return Number of children in the Arg list. * @apilevel high-level * @ast method * */ public int getNumArg() { return getArgList().getNumChild(); } /** * Retrieves the number of children in the Arg list. * Calling this method will not trigger rewrites.. * @return Number of children in the Arg list. * @apilevel low-level * @ast method * */ public int getNumArgNoTransform() { return getArgListNoTransform().getNumChildNoTransform(); } /** * Retrieves the element at index {@code i} in the Arg list.. * @param i Index of the element to return. * @return The element at position {@code i} in the Arg list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public Expr getArg(int i) { return (Expr)getArgList().getChild(i); } /** * Append an element to the Arg list. * @param node The element to append to the Arg list. * @apilevel high-level * @ast method * */ public void addArg(Expr node) { List<Expr> list = (parent == null || state == null) ? getArgListNoTransform() : getArgList(); list.addChild(node); } /** * @apilevel low-level * @ast method * */ public void addArgNoTransform(Expr node) { List<Expr> list = getArgListNoTransform(); list.addChild(node); } /** * Replaces the Arg list element at index {@code i} with the new node {@code node}. * @param node The new node to replace the old list element. * @param i The list index of the node to be replaced. * @apilevel high-level * @ast method * */ public void setArg(Expr node, int i) { List<Expr> list = getArgList(); list.setChild(node, i); } /** * Retrieves the Arg list. * @return The node representing the Arg list. * @apilevel high-level * @ast method * */ public List<Expr> getArgs() { return getArgList(); } /** * Retrieves the Arg list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the Arg list. * @apilevel low-level * @ast method * */ public List<Expr> getArgsNoTransform() { return getArgListNoTransform(); } /** * Retrieves the Arg list. * @return The node representing the Arg list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<Expr> getArgList() { List<Expr> list = (List<Expr>)getChild(0); list.getNumChild(); return list; } /** * Retrieves the Arg list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the Arg list. * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<Expr> getArgListNoTransform() { return (List<Expr>)getChildNoTransform(0); } /** * Replaces the TypeArgument list. * @param list The new list node to be used as the TypeArgument list. * @apilevel high-level * @ast method * */ public void setTypeArgumentList(List<Access> list) { setChild(list, 1); } /** * Retrieves the number of children in the TypeArgument list. * @return Number of children in the TypeArgument list. * @apilevel high-level * @ast method * */ public int getNumTypeArgument() { return getTypeArgumentList().getNumChild(); } /** * Retrieves the number of children in the TypeArgument list. * Calling this method will not trigger rewrites.. * @return Number of children in the TypeArgument list. * @apilevel low-level * @ast method * */ public int getNumTypeArgumentNoTransform() { return getTypeArgumentListNoTransform().getNumChildNoTransform(); } /** * Retrieves the element at index {@code i} in the TypeArgument list.. * @param i Index of the element to return. * @return The element at position {@code i} in the TypeArgument list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public Access getTypeArgument(int i) { return (Access)getTypeArgumentList().getChild(i); } /** * Append an element to the TypeArgument list. * @param node The element to append to the TypeArgument list. * @apilevel high-level * @ast method * */ public void addTypeArgument(Access node) { List<Access> list = (parent == null || state == null) ? getTypeArgumentListNoTransform() : getTypeArgumentList(); list.addChild(node); } /** * @apilevel low-level * @ast method * */ public void addTypeArgumentNoTransform(Access node) { List<Access> list = getTypeArgumentListNoTransform(); list.addChild(node); } /** * Replaces the TypeArgument list element at index {@code i} with the new node {@code node}. * @param node The new node to replace the old list element. * @param i The list index of the node to be replaced. * @apilevel high-level * @ast method * */ public void setTypeArgument(Access node, int i) { List<Access> list = getTypeArgumentList(); list.setChild(node, i); } /** * Retrieves the TypeArgument list. * @return The node representing the TypeArgument list. * @apilevel high-level * @ast method * */ public List<Access> getTypeArguments() { return getTypeArgumentList(); } /** * Retrieves the TypeArgument list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the TypeArgument list. * @apilevel low-level * @ast method * */ public List<Access> getTypeArgumentsNoTransform() { return getTypeArgumentListNoTransform(); } /** * Retrieves the TypeArgument list. * @return The node representing the TypeArgument list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<Access> getTypeArgumentList() { List<Access> list = (List<Access>)getChild(1); list.getNumChild(); return list; } /** * Retrieves the TypeArgument list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the TypeArgument list. * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<Access> getTypeArgumentListNoTransform() { return (List<Access>)getChildNoTransform(1); } protected java.util.Map typeArguments_MethodDecl_values; /** * @attribute syn * @aspect MethodSignature15 * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/MethodSignature.jrag:311 */ @SuppressWarnings({"unchecked", "cast"}) public ArrayList typeArguments(MethodDecl m) { Object _parameters = m; if(typeArguments_MethodDecl_values == null) typeArguments_MethodDecl_values = new java.util.HashMap(4); if(typeArguments_MethodDecl_values.containsKey(_parameters)) { return (ArrayList)typeArguments_MethodDecl_values.get(_parameters); } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); ArrayList typeArguments_MethodDecl_value = typeArguments_compute(m); if(isFinal && num == state().boundariesCrossed) typeArguments_MethodDecl_values.put(_parameters, typeArguments_MethodDecl_value); return typeArguments_MethodDecl_value; } /** * @apilevel internal */ private ArrayList typeArguments_compute(MethodDecl m) { ArrayList typeArguments = new ArrayList(); for(int i = 0; i < getNumTypeArgument(); i++) typeArguments.add(getTypeArgument(i).type()); return typeArguments; } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericMethods.jrag:142 * @apilevel internal */ public NameType Define_NameType_nameType(ASTNode caller, ASTNode child) { if(caller == getTypeArgumentListNoTransform()) { int childIndex = caller.getIndexOfChild(child); return NameType.TYPE_NAME; } else { return super.Define_NameType_nameType(caller, child); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericMethods.jrag:143 * @apilevel internal */ public SimpleSet Define_SimpleSet_lookupType(ASTNode caller, ASTNode child, String name) { if(caller == getTypeArgumentListNoTransform()) { int childIndex = caller.getIndexOfChild(child); return unqualifiedScope().lookupType(name); } else { return super.Define_SimpleSet_lookupType(caller, child, name); } } /** * @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); } }
14,434
27.248532
135
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/ParMethodDecl.java
/* This file was generated with JastAdd2 (http://jastadd.org) version R20130212 (r1031) */ package soot.JastAddJ; import java.util.HashSet; 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; /** * @production ParMethodDecl : {@link MethodDecl} ::= <span class="component">TypeArgument:{@link Access}*</span> <span class="component">&lt;GenericMethodDecl:GenericMethodDecl&gt;</span>; * @ast node * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericMethods.ast:7 */ public class ParMethodDecl extends MethodDecl implements Cloneable, Parameterization { /** * @apilevel low-level */ public void flushCache() { super.flushCache(); genericMethodDecl_computed = false; genericMethodDecl_value = null; sourceMethodDecl_computed = false; sourceMethodDecl_value = null; moreSpecificThan_MethodDecl_values = null; } /** * @apilevel internal */ public void flushCollectionCache() { super.flushCollectionCache(); } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public ParMethodDecl clone() throws CloneNotSupportedException { ParMethodDecl node = (ParMethodDecl)super.clone(); node.genericMethodDecl_computed = false; node.genericMethodDecl_value = null; node.sourceMethodDecl_computed = false; node.sourceMethodDecl_value = null; node.moreSpecificThan_MethodDecl_values = null; node.in$Circle(false); node.is$Final(false); return node; } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public ParMethodDecl copy() { try { ParMethodDecl node = (ParMethodDecl) clone(); node.parent = null; if(children != null) node.children = (ASTNode[]) children.clone(); return node; } catch (CloneNotSupportedException e) { throw new Error("Error: clone not supported for " + getClass().getName()); } } /** * Create a deep copy of the AST subtree at this node. * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level */ @SuppressWarnings({"unchecked", "cast"}) public ParMethodDecl fullCopy() { ParMethodDecl tree = (ParMethodDecl) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) children[i]; if(child != null) { child = child.fullCopy(); tree.setChild(child, i); } } } return tree; } /** * @ast method * @aspect TypeCheck * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericMethods.jrag:132 */ public void collectErrors() { } /** * @ast method * @aspect LookupParTypeDecl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:846 */ public TypeDecl substitute(TypeVariable typeVariable) { for(int i = 0; i < numTypeParameter(); i++) if(typeParameter(i) == typeVariable) return getTypeArgument(i).type(); return genericMethodDecl().hostType().substitute(typeVariable); } /** * @ast method * @aspect LookupParTypeDecl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:860 */ public boolean isRawType() { return false; } /** * @ast method * @aspect LookupParTypeDecl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:866 */ public int numTypeParameter() { return genericMethodDecl().original().getNumTypeParameter(); } /** * @ast method * @aspect LookupParTypeDecl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:869 */ public TypeVariable typeParameter(int index) { return genericMethodDecl().original().getTypeParameter(index); } /** * @ast method * @aspect GenericsCodegen * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/Jimple1.5Backend/GenericsCodegen.jrag:322 */ public void transformation() { } /** * @ast method * */ public ParMethodDecl() { super(); } /** * Initializes the child array to the correct size. * Initializes List and Opt nta children. * @apilevel internal * @ast method * @ast method * */ public void init$Children() { children = new ASTNode[6]; setChild(new List(), 2); setChild(new List(), 3); setChild(new Opt(), 4); setChild(new List(), 5); } /** * @ast method * */ public ParMethodDecl(Modifiers p0, Access p1, String p2, List<ParameterDeclaration> p3, List<Access> p4, Opt<Block> p5, List<Access> p6, GenericMethodDecl p7) { setChild(p0, 0); setChild(p1, 1); setID(p2); setChild(p3, 2); setChild(p4, 3); setChild(p5, 4); setChild(p6, 5); setGenericMethodDecl(p7); } /** * @ast method * */ public ParMethodDecl(Modifiers p0, Access p1, beaver.Symbol p2, List<ParameterDeclaration> p3, List<Access> p4, Opt<Block> p5, List<Access> p6, GenericMethodDecl p7) { setChild(p0, 0); setChild(p1, 1); setID(p2); setChild(p3, 2); setChild(p4, 3); setChild(p5, 4); setChild(p6, 5); setGenericMethodDecl(p7); } /** * @apilevel low-level * @ast method * */ protected int numChildren() { return 6; } /** * @apilevel internal * @ast method * */ public boolean mayHaveRewrite() { return false; } /** * Replaces the Modifiers child. * @param node The new node to replace the Modifiers child. * @apilevel high-level * @ast method * */ public void setModifiers(Modifiers node) { setChild(node, 0); } /** * Retrieves the Modifiers child. * @return The current node used as the Modifiers child. * @apilevel high-level * @ast method * */ public Modifiers getModifiers() { return (Modifiers)getChild(0); } /** * Retrieves the Modifiers child. * <p><em>This method does not invoke AST transformations.</em></p> * @return The current node used as the Modifiers child. * @apilevel low-level * @ast method * */ public Modifiers getModifiersNoTransform() { return (Modifiers)getChildNoTransform(0); } /** * Replaces the TypeAccess child. * @param node The new node to replace the TypeAccess child. * @apilevel high-level * @ast method * */ public void setTypeAccess(Access node) { setChild(node, 1); } /** * Retrieves the TypeAccess child. * @return The current node used as the TypeAccess child. * @apilevel high-level * @ast method * */ public Access getTypeAccess() { return (Access)getChild(1); } /** * Retrieves the TypeAccess child. * <p><em>This method does not invoke AST transformations.</em></p> * @return The current node used as the TypeAccess child. * @apilevel low-level * @ast method * */ public Access getTypeAccessNoTransform() { return (Access)getChildNoTransform(1); } /** * Replaces the lexeme ID. * @param value The new value for the lexeme ID. * @apilevel high-level * @ast method * */ public void setID(String value) { tokenString_ID = value; } /** * JastAdd-internal setter for lexeme ID using the Beaver parser. * @apilevel internal * @ast method * */ 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(); } /** * Retrieves the value for the lexeme ID. * @return The value for the lexeme ID. * @apilevel high-level * @ast method * */ public String getID() { return tokenString_ID != null ? tokenString_ID : ""; } /** * Replaces the Parameter list. * @param list The new list node to be used as the Parameter list. * @apilevel high-level * @ast method * */ public void setParameterList(List<ParameterDeclaration> list) { setChild(list, 2); } /** * Retrieves the number of children in the Parameter list. * @return Number of children in the Parameter list. * @apilevel high-level * @ast method * */ public int getNumParameter() { return getParameterList().getNumChild(); } /** * Retrieves the number of children in the Parameter list. * Calling this method will not trigger rewrites.. * @return Number of children in the Parameter list. * @apilevel low-level * @ast method * */ public int getNumParameterNoTransform() { return getParameterListNoTransform().getNumChildNoTransform(); } /** * Retrieves the element at index {@code i} in the Parameter list.. * @param i Index of the element to return. * @return The element at position {@code i} in the Parameter list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public ParameterDeclaration getParameter(int i) { return (ParameterDeclaration)getParameterList().getChild(i); } /** * Append an element to the Parameter list. * @param node The element to append to the Parameter list. * @apilevel high-level * @ast method * */ public void addParameter(ParameterDeclaration node) { List<ParameterDeclaration> list = (parent == null || state == null) ? getParameterListNoTransform() : getParameterList(); list.addChild(node); } /** * @apilevel low-level * @ast method * */ public void addParameterNoTransform(ParameterDeclaration node) { List<ParameterDeclaration> list = getParameterListNoTransform(); list.addChild(node); } /** * Replaces the Parameter list element at index {@code i} with the new node {@code node}. * @param node The new node to replace the old list element. * @param i The list index of the node to be replaced. * @apilevel high-level * @ast method * */ public void setParameter(ParameterDeclaration node, int i) { List<ParameterDeclaration> list = getParameterList(); list.setChild(node, i); } /** * Retrieves the Parameter list. * @return The node representing the Parameter list. * @apilevel high-level * @ast method * */ public List<ParameterDeclaration> getParameters() { return getParameterList(); } /** * Retrieves the Parameter list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the Parameter list. * @apilevel low-level * @ast method * */ public List<ParameterDeclaration> getParametersNoTransform() { return getParameterListNoTransform(); } /** * Retrieves the Parameter list. * @return The node representing the Parameter list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<ParameterDeclaration> getParameterList() { List<ParameterDeclaration> list = (List<ParameterDeclaration>)getChild(2); list.getNumChild(); return list; } /** * Retrieves the Parameter list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the Parameter list. * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<ParameterDeclaration> getParameterListNoTransform() { return (List<ParameterDeclaration>)getChildNoTransform(2); } /** * Replaces the Exception list. * @param list The new list node to be used as the Exception list. * @apilevel high-level * @ast method * */ public void setExceptionList(List<Access> list) { setChild(list, 3); } /** * Retrieves the number of children in the Exception list. * @return Number of children in the Exception list. * @apilevel high-level * @ast method * */ public int getNumException() { return getExceptionList().getNumChild(); } /** * Retrieves the number of children in the Exception list. * Calling this method will not trigger rewrites.. * @return Number of children in the Exception list. * @apilevel low-level * @ast method * */ public int getNumExceptionNoTransform() { return getExceptionListNoTransform().getNumChildNoTransform(); } /** * Retrieves the element at index {@code i} in the Exception list.. * @param i Index of the element to return. * @return The element at position {@code i} in the Exception list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public Access getException(int i) { return (Access)getExceptionList().getChild(i); } /** * Append an element to the Exception list. * @param node The element to append to the Exception list. * @apilevel high-level * @ast method * */ public void addException(Access node) { List<Access> list = (parent == null || state == null) ? getExceptionListNoTransform() : getExceptionList(); list.addChild(node); } /** * @apilevel low-level * @ast method * */ public void addExceptionNoTransform(Access node) { List<Access> list = getExceptionListNoTransform(); list.addChild(node); } /** * Replaces the Exception list element at index {@code i} with the new node {@code node}. * @param node The new node to replace the old list element. * @param i The list index of the node to be replaced. * @apilevel high-level * @ast method * */ public void setException(Access node, int i) { List<Access> list = getExceptionList(); list.setChild(node, i); } /** * Retrieves the Exception list. * @return The node representing the Exception list. * @apilevel high-level * @ast method * */ public List<Access> getExceptions() { return getExceptionList(); } /** * Retrieves the Exception list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the Exception list. * @apilevel low-level * @ast method * */ public List<Access> getExceptionsNoTransform() { return getExceptionListNoTransform(); } /** * Retrieves the Exception list. * @return The node representing the Exception list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<Access> getExceptionList() { List<Access> list = (List<Access>)getChild(3); list.getNumChild(); return list; } /** * Retrieves the Exception list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the Exception list. * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<Access> getExceptionListNoTransform() { return (List<Access>)getChildNoTransform(3); } /** * Replaces the optional node for the Block child. This is the {@code Opt} node containing the child Block, not the actual child! * @param opt The new node to be used as the optional node for the Block child. * @apilevel low-level * @ast method * */ public void setBlockOpt(Opt<Block> opt) { setChild(opt, 4); } /** * Check whether the optional Block child exists. * @return {@code true} if the optional Block child exists, {@code false} if it does not. * @apilevel high-level * @ast method * */ public boolean hasBlock() { return getBlockOpt().getNumChild() != 0; } /** * Retrieves the (optional) Block child. * @return The Block child, if it exists. Returns {@code null} otherwise. * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public Block getBlock() { return (Block)getBlockOpt().getChild(0); } /** * Replaces the (optional) Block child. * @param node The new node to be used as the Block child. * @apilevel high-level * @ast method * */ public void setBlock(Block node) { getBlockOpt().setChild(node, 0); } /** * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public Opt<Block> getBlockOpt() { return (Opt<Block>)getChild(4); } /** * Retrieves the optional node for child Block. This is the {@code Opt} node containing the child Block, not the actual child! * <p><em>This method does not invoke AST transformations.</em></p> * @return The optional node for child Block. * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public Opt<Block> getBlockOptNoTransform() { return (Opt<Block>)getChildNoTransform(4); } /** * Replaces the TypeArgument list. * @param list The new list node to be used as the TypeArgument list. * @apilevel high-level * @ast method * */ public void setTypeArgumentList(List<Access> list) { setChild(list, 5); } /** * Retrieves the number of children in the TypeArgument list. * @return Number of children in the TypeArgument list. * @apilevel high-level * @ast method * */ public int getNumTypeArgument() { return getTypeArgumentList().getNumChild(); } /** * Retrieves the number of children in the TypeArgument list. * Calling this method will not trigger rewrites.. * @return Number of children in the TypeArgument list. * @apilevel low-level * @ast method * */ public int getNumTypeArgumentNoTransform() { return getTypeArgumentListNoTransform().getNumChildNoTransform(); } /** * Retrieves the element at index {@code i} in the TypeArgument list.. * @param i Index of the element to return. * @return The element at position {@code i} in the TypeArgument list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public Access getTypeArgument(int i) { return (Access)getTypeArgumentList().getChild(i); } /** * Append an element to the TypeArgument list. * @param node The element to append to the TypeArgument list. * @apilevel high-level * @ast method * */ public void addTypeArgument(Access node) { List<Access> list = (parent == null || state == null) ? getTypeArgumentListNoTransform() : getTypeArgumentList(); list.addChild(node); } /** * @apilevel low-level * @ast method * */ public void addTypeArgumentNoTransform(Access node) { List<Access> list = getTypeArgumentListNoTransform(); list.addChild(node); } /** * Replaces the TypeArgument list element at index {@code i} with the new node {@code node}. * @param node The new node to replace the old list element. * @param i The list index of the node to be replaced. * @apilevel high-level * @ast method * */ public void setTypeArgument(Access node, int i) { List<Access> list = getTypeArgumentList(); list.setChild(node, i); } /** * Retrieves the TypeArgument list. * @return The node representing the TypeArgument list. * @apilevel high-level * @ast method * */ public List<Access> getTypeArguments() { return getTypeArgumentList(); } /** * Retrieves the TypeArgument list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the TypeArgument list. * @apilevel low-level * @ast method * */ public List<Access> getTypeArgumentsNoTransform() { return getTypeArgumentListNoTransform(); } /** * Retrieves the TypeArgument list. * @return The node representing the TypeArgument list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<Access> getTypeArgumentList() { List<Access> list = (List<Access>)getChild(5); list.getNumChild(); return list; } /** * Retrieves the TypeArgument list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the TypeArgument list. * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<Access> getTypeArgumentListNoTransform() { return (List<Access>)getChildNoTransform(5); } /** * Replaces the lexeme GenericMethodDecl. * @param value The new value for the lexeme GenericMethodDecl. * @apilevel high-level * @ast method * */ public void setGenericMethodDecl(GenericMethodDecl value) { tokenGenericMethodDecl_GenericMethodDecl = value; } /** * @apilevel internal * @ast method * */ /** * @apilevel internal */ protected GenericMethodDecl tokenGenericMethodDecl_GenericMethodDecl; /** * Retrieves the value for the lexeme GenericMethodDecl. * @return The value for the lexeme GenericMethodDecl. * @apilevel high-level * @ast method * */ public GenericMethodDecl getGenericMethodDecl() { return tokenGenericMethodDecl_GenericMethodDecl; } /** * @apilevel internal */ protected boolean genericMethodDecl_computed = false; /** * @apilevel internal */ protected GenericMethodDecl genericMethodDecl_value; /** * @attribute syn * @aspect GenericMethods * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericMethods.jrag:45 */ @SuppressWarnings({"unchecked", "cast"}) public GenericMethodDecl genericMethodDecl() { if(genericMethodDecl_computed) { return genericMethodDecl_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); genericMethodDecl_value = genericMethodDecl_compute(); if(isFinal && num == state().boundariesCrossed) genericMethodDecl_computed = true; return genericMethodDecl_value; } /** * @apilevel internal */ private GenericMethodDecl genericMethodDecl_compute() { return getGenericMethodDecl(); } /** * @apilevel internal */ protected boolean sourceMethodDecl_computed = false; /** * @apilevel internal */ protected MethodDecl sourceMethodDecl_value; /** * @attribute syn * @aspect SourceDeclarations * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:1512 */ @SuppressWarnings({"unchecked", "cast"}) public MethodDecl sourceMethodDecl() { if(sourceMethodDecl_computed) { return sourceMethodDecl_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); sourceMethodDecl_value = sourceMethodDecl_compute(); if(isFinal && num == state().boundariesCrossed) sourceMethodDecl_computed = true; return sourceMethodDecl_value; } /** * @apilevel internal */ private MethodDecl sourceMethodDecl_compute() { return genericMethodDecl().original().sourceMethodDecl(); } protected java.util.Map moreSpecificThan_MethodDecl_values; /** * @attribute syn * @aspect MethodSignature15 * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/MethodSignature.jrag:152 */ @SuppressWarnings({"unchecked", "cast"}) public boolean moreSpecificThan(MethodDecl m) { Object _parameters = m; if(moreSpecificThan_MethodDecl_values == null) moreSpecificThan_MethodDecl_values = new java.util.HashMap(4); if(moreSpecificThan_MethodDecl_values.containsKey(_parameters)) { return ((Boolean)moreSpecificThan_MethodDecl_values.get(_parameters)).booleanValue(); } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); boolean moreSpecificThan_MethodDecl_value = moreSpecificThan_compute(m); if(isFinal && num == state().boundariesCrossed) moreSpecificThan_MethodDecl_values.put(_parameters, Boolean.valueOf(moreSpecificThan_MethodDecl_value)); return moreSpecificThan_MethodDecl_value; } /** * @apilevel internal */ private boolean moreSpecificThan_compute(MethodDecl m) { return genericMethodDecl().moreSpecificThan(m instanceof ParMethodDecl ? ((ParMethodDecl)m).genericMethodDecl() : m ); } /** * @attribute syn * @aspect GenericsCodegen * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/Jimple1.5Backend/GenericsCodegen.jrag:34 */ public MethodDecl erasedMethod() { ASTNode$State state = state(); try { return genericMethodDecl().erasedMethod(); } finally { } } /** * @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); } }
25,169
28.131944
189
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/ParSuperConstructorAccess.java
/* This file was generated with JastAdd2 (http://jastadd.org) version R20130212 (r1031) */ package soot.JastAddJ; import java.util.HashSet; 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; /** * @production ParSuperConstructorAccess : {@link SuperConstructorAccess} ::= <span class="component">TypeArgument:{@link Access}*</span>; * @ast node * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericMethods.ast:17 */ public class ParSuperConstructorAccess extends SuperConstructorAccess implements Cloneable { /** * @apilevel low-level */ public void flushCache() { super.flushCache(); } /** * @apilevel internal */ public void flushCollectionCache() { super.flushCollectionCache(); } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public ParSuperConstructorAccess clone() throws CloneNotSupportedException { ParSuperConstructorAccess node = (ParSuperConstructorAccess)super.clone(); node.in$Circle(false); node.is$Final(false); return node; } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public ParSuperConstructorAccess copy() { try { ParSuperConstructorAccess node = (ParSuperConstructorAccess) clone(); node.parent = null; if(children != null) node.children = (ASTNode[]) children.clone(); return node; } catch (CloneNotSupportedException e) { throw new Error("Error: clone not supported for " + getClass().getName()); } } /** * Create a deep copy of the AST subtree at this node. * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level */ @SuppressWarnings({"unchecked", "cast"}) public ParSuperConstructorAccess fullCopy() { ParSuperConstructorAccess tree = (ParSuperConstructorAccess) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) children[i]; if(child != null) { child = child.fullCopy(); tree.setChild(child, i); } } } return tree; } /** * @ast method * @aspect GenericMethodsPrettyPrint * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericMethods.jrag:197 */ public void toString(StringBuffer s) { s.append("<"); for(int i = 0; i < getNumTypeArgument(); i++) { if(i != 0) s.append(", "); getTypeArgument(i).toString(s); } s.append(">"); super.toString(s); } /** * @ast method * */ public ParSuperConstructorAccess() { super(); } /** * Initializes the child array to the correct size. * Initializes List and Opt nta children. * @apilevel internal * @ast method * @ast method * */ public void init$Children() { children = new ASTNode[2]; setChild(new List(), 0); setChild(new List(), 1); } /** * @ast method * */ public ParSuperConstructorAccess(String p0, List<Expr> p1, List<Access> p2) { setID(p0); setChild(p1, 0); setChild(p2, 1); } /** * @ast method * */ public ParSuperConstructorAccess(beaver.Symbol p0, List<Expr> p1, List<Access> p2) { setID(p0); setChild(p1, 0); setChild(p2, 1); } /** * @apilevel low-level * @ast method * */ protected int numChildren() { return 2; } /** * @apilevel internal * @ast method * */ public boolean mayHaveRewrite() { return false; } /** * Replaces the lexeme ID. * @param value The new value for the lexeme ID. * @apilevel high-level * @ast method * */ public void setID(String value) { tokenString_ID = value; } /** * JastAdd-internal setter for lexeme ID using the Beaver parser. * @apilevel internal * @ast method * */ 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(); } /** * Retrieves the value for the lexeme ID. * @return The value for the lexeme ID. * @apilevel high-level * @ast method * */ public String getID() { return tokenString_ID != null ? tokenString_ID : ""; } /** * Replaces the Arg list. * @param list The new list node to be used as the Arg list. * @apilevel high-level * @ast method * */ public void setArgList(List<Expr> list) { setChild(list, 0); } /** * Retrieves the number of children in the Arg list. * @return Number of children in the Arg list. * @apilevel high-level * @ast method * */ public int getNumArg() { return getArgList().getNumChild(); } /** * Retrieves the number of children in the Arg list. * Calling this method will not trigger rewrites.. * @return Number of children in the Arg list. * @apilevel low-level * @ast method * */ public int getNumArgNoTransform() { return getArgListNoTransform().getNumChildNoTransform(); } /** * Retrieves the element at index {@code i} in the Arg list.. * @param i Index of the element to return. * @return The element at position {@code i} in the Arg list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public Expr getArg(int i) { return (Expr)getArgList().getChild(i); } /** * Append an element to the Arg list. * @param node The element to append to the Arg list. * @apilevel high-level * @ast method * */ public void addArg(Expr node) { List<Expr> list = (parent == null || state == null) ? getArgListNoTransform() : getArgList(); list.addChild(node); } /** * @apilevel low-level * @ast method * */ public void addArgNoTransform(Expr node) { List<Expr> list = getArgListNoTransform(); list.addChild(node); } /** * Replaces the Arg list element at index {@code i} with the new node {@code node}. * @param node The new node to replace the old list element. * @param i The list index of the node to be replaced. * @apilevel high-level * @ast method * */ public void setArg(Expr node, int i) { List<Expr> list = getArgList(); list.setChild(node, i); } /** * Retrieves the Arg list. * @return The node representing the Arg list. * @apilevel high-level * @ast method * */ public List<Expr> getArgs() { return getArgList(); } /** * Retrieves the Arg list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the Arg list. * @apilevel low-level * @ast method * */ public List<Expr> getArgsNoTransform() { return getArgListNoTransform(); } /** * Retrieves the Arg list. * @return The node representing the Arg list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<Expr> getArgList() { List<Expr> list = (List<Expr>)getChild(0); list.getNumChild(); return list; } /** * Retrieves the Arg list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the Arg list. * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<Expr> getArgListNoTransform() { return (List<Expr>)getChildNoTransform(0); } /** * Replaces the TypeArgument list. * @param list The new list node to be used as the TypeArgument list. * @apilevel high-level * @ast method * */ public void setTypeArgumentList(List<Access> list) { setChild(list, 1); } /** * Retrieves the number of children in the TypeArgument list. * @return Number of children in the TypeArgument list. * @apilevel high-level * @ast method * */ public int getNumTypeArgument() { return getTypeArgumentList().getNumChild(); } /** * Retrieves the number of children in the TypeArgument list. * Calling this method will not trigger rewrites.. * @return Number of children in the TypeArgument list. * @apilevel low-level * @ast method * */ public int getNumTypeArgumentNoTransform() { return getTypeArgumentListNoTransform().getNumChildNoTransform(); } /** * Retrieves the element at index {@code i} in the TypeArgument list.. * @param i Index of the element to return. * @return The element at position {@code i} in the TypeArgument list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public Access getTypeArgument(int i) { return (Access)getTypeArgumentList().getChild(i); } /** * Append an element to the TypeArgument list. * @param node The element to append to the TypeArgument list. * @apilevel high-level * @ast method * */ public void addTypeArgument(Access node) { List<Access> list = (parent == null || state == null) ? getTypeArgumentListNoTransform() : getTypeArgumentList(); list.addChild(node); } /** * @apilevel low-level * @ast method * */ public void addTypeArgumentNoTransform(Access node) { List<Access> list = getTypeArgumentListNoTransform(); list.addChild(node); } /** * Replaces the TypeArgument list element at index {@code i} with the new node {@code node}. * @param node The new node to replace the old list element. * @param i The list index of the node to be replaced. * @apilevel high-level * @ast method * */ public void setTypeArgument(Access node, int i) { List<Access> list = getTypeArgumentList(); list.setChild(node, i); } /** * Retrieves the TypeArgument list. * @return The node representing the TypeArgument list. * @apilevel high-level * @ast method * */ public List<Access> getTypeArguments() { return getTypeArgumentList(); } /** * Retrieves the TypeArgument list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the TypeArgument list. * @apilevel low-level * @ast method * */ public List<Access> getTypeArgumentsNoTransform() { return getTypeArgumentListNoTransform(); } /** * Retrieves the TypeArgument list. * @return The node representing the TypeArgument list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<Access> getTypeArgumentList() { List<Access> list = (List<Access>)getChild(1); list.getNumChild(); return list; } /** * Retrieves the TypeArgument list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the TypeArgument list. * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<Access> getTypeArgumentListNoTransform() { return (List<Access>)getChildNoTransform(1); } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericMethods.jrag:158 * @apilevel internal */ public NameType Define_NameType_nameType(ASTNode caller, ASTNode child) { if(caller == getTypeArgumentListNoTransform()) { int childIndex = caller.getIndexOfChild(child); return NameType.TYPE_NAME; } else { return super.Define_NameType_nameType(caller, child); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericMethods.jrag:159 * @apilevel internal */ public SimpleSet Define_SimpleSet_lookupType(ASTNode caller, ASTNode child, String name) { if(caller == getTypeArgumentListNoTransform()) { int childIndex = caller.getIndexOfChild(child); return unqualifiedScope().lookupType(name); } else { return super.Define_SimpleSet_lookupType(caller, child, name); } } /** * @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); } }
12,575
26.279826
138
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/ParTypeAccess.java
/* This file was generated with JastAdd2 (http://jastadd.org) version R20130212 (r1031) */ package soot.JastAddJ; import java.util.HashSet; 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; /** * @production ParTypeAccess : {@link Access} ::= <span class="component">TypeAccess:{@link Access}</span> <span class="component">TypeArgument:{@link Access}*</span>; * @ast node * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.ast:16 */ public class ParTypeAccess extends Access implements Cloneable { /** * @apilevel low-level */ public void flushCache() { super.flushCache(); type_computed = false; type_value = null; } /** * @apilevel internal */ public void flushCollectionCache() { super.flushCollectionCache(); } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public ParTypeAccess clone() throws CloneNotSupportedException { ParTypeAccess node = (ParTypeAccess)super.clone(); node.type_computed = false; node.type_value = null; node.in$Circle(false); node.is$Final(false); return node; } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public ParTypeAccess copy() { try { ParTypeAccess node = (ParTypeAccess) clone(); node.parent = null; if(children != null) node.children = (ASTNode[]) children.clone(); return node; } catch (CloneNotSupportedException e) { throw new Error("Error: clone not supported for " + getClass().getName()); } } /** * Create a deep copy of the AST subtree at this node. * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level */ @SuppressWarnings({"unchecked", "cast"}) public ParTypeAccess fullCopy() { ParTypeAccess tree = (ParTypeAccess) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) children[i]; if(child != null) { child = child.fullCopy(); tree.setChild(child, i); } } } return tree; } /** * @ast method * @aspect GenericsTypeAnalysis * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:336 */ public boolean isRaw() { return false; } /** * @ast method * @aspect GenericsTypeCheck * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:444 */ public void typeCheck() { super.typeCheck(); if(!genericDecl().isUnknown()) { TypeDecl type = type(); if(!genericDecl().isGenericType()) { error(genericDecl().typeName() + " is not a generic type but used as one in " + this); } else if(!type.isRawType() && type.isNestedType() && type.enclosingType().isRawType()) error("Can not access a member type of a raw type as a parameterized type"); else { GenericTypeDecl decl = (GenericTypeDecl)genericDecl(); GenericTypeDecl original = (GenericTypeDecl)decl.original(); if(original.getNumTypeParameter() != getNumTypeArgument()) { error(decl.typeName() + " takes " + original.getNumTypeParameter() + " type parameters, not " + getNumTypeArgument() + " as used in " + this); } else { ParTypeDecl typeDecl = (ParTypeDecl)type(); for(int i = 0; i < getNumTypeArgument(); i++) { if(!getTypeArgument(i).type().instanceOf(original.getTypeParameter(i))) { error("type argument " + i + " is of type " + getTypeArgument(i).type().typeName() + " which is not a subtype of " + original.getTypeParameter(i).typeName()); } } } } } } /** * @ast method * @aspect GenericsPrettyPrint * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericsPrettyPrint.jrag:23 */ public void toString(StringBuffer s) { getTypeAccess().toString(s); s.append("<"); for(int i = 0; i < getNumTypeArgument(); i++) { if(i != 0) s.append(", "); getTypeArgument(i).toString(s); } s.append(">"); } /** * @ast method * */ public ParTypeAccess() { super(); } /** * Initializes the child array to the correct size. * Initializes List and Opt nta children. * @apilevel internal * @ast method * @ast method * */ public void init$Children() { children = new ASTNode[2]; setChild(new List(), 1); } /** * @ast method * */ public ParTypeAccess(Access p0, List<Access> p1) { setChild(p0, 0); setChild(p1, 1); } /** * @apilevel low-level * @ast method * */ protected int numChildren() { return 2; } /** * @apilevel internal * @ast method * */ public boolean mayHaveRewrite() { return false; } /** * Replaces the TypeAccess child. * @param node The new node to replace the TypeAccess child. * @apilevel high-level * @ast method * */ public void setTypeAccess(Access node) { setChild(node, 0); } /** * Retrieves the TypeAccess child. * @return The current node used as the TypeAccess child. * @apilevel high-level * @ast method * */ public Access getTypeAccess() { return (Access)getChild(0); } /** * Retrieves the TypeAccess child. * <p><em>This method does not invoke AST transformations.</em></p> * @return The current node used as the TypeAccess child. * @apilevel low-level * @ast method * */ public Access getTypeAccessNoTransform() { return (Access)getChildNoTransform(0); } /** * Replaces the TypeArgument list. * @param list The new list node to be used as the TypeArgument list. * @apilevel high-level * @ast method * */ public void setTypeArgumentList(List<Access> list) { setChild(list, 1); } /** * Retrieves the number of children in the TypeArgument list. * @return Number of children in the TypeArgument list. * @apilevel high-level * @ast method * */ public int getNumTypeArgument() { return getTypeArgumentList().getNumChild(); } /** * Retrieves the number of children in the TypeArgument list. * Calling this method will not trigger rewrites.. * @return Number of children in the TypeArgument list. * @apilevel low-level * @ast method * */ public int getNumTypeArgumentNoTransform() { return getTypeArgumentListNoTransform().getNumChildNoTransform(); } /** * Retrieves the element at index {@code i} in the TypeArgument list.. * @param i Index of the element to return. * @return The element at position {@code i} in the TypeArgument list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public Access getTypeArgument(int i) { return (Access)getTypeArgumentList().getChild(i); } /** * Append an element to the TypeArgument list. * @param node The element to append to the TypeArgument list. * @apilevel high-level * @ast method * */ public void addTypeArgument(Access node) { List<Access> list = (parent == null || state == null) ? getTypeArgumentListNoTransform() : getTypeArgumentList(); list.addChild(node); } /** * @apilevel low-level * @ast method * */ public void addTypeArgumentNoTransform(Access node) { List<Access> list = getTypeArgumentListNoTransform(); list.addChild(node); } /** * Replaces the TypeArgument list element at index {@code i} with the new node {@code node}. * @param node The new node to replace the old list element. * @param i The list index of the node to be replaced. * @apilevel high-level * @ast method * */ public void setTypeArgument(Access node, int i) { List<Access> list = getTypeArgumentList(); list.setChild(node, i); } /** * Retrieves the TypeArgument list. * @return The node representing the TypeArgument list. * @apilevel high-level * @ast method * */ public List<Access> getTypeArguments() { return getTypeArgumentList(); } /** * Retrieves the TypeArgument list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the TypeArgument list. * @apilevel low-level * @ast method * */ public List<Access> getTypeArgumentsNoTransform() { return getTypeArgumentListNoTransform(); } /** * Retrieves the TypeArgument list. * @return The node representing the TypeArgument list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<Access> getTypeArgumentList() { List<Access> list = (List<Access>)getChild(1); list.getNumChild(); return list; } /** * Retrieves the TypeArgument list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the TypeArgument list. * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<Access> getTypeArgumentListNoTransform() { return (List<Access>)getChildNoTransform(1); } /** * @attribute syn * @aspect LookupMethod * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupMethod.jrag:17 */ public Expr unqualifiedScope() { ASTNode$State state = state(); try { return getParent() instanceof Access ? ((Access)getParent()).unqualifiedScope() : super.unqualifiedScope(); } finally { } } /** * @apilevel internal */ protected boolean type_computed = false; /** * @apilevel internal */ protected TypeDecl type_value; /** * @attribute syn * @aspect GenericsTypeAnalysis * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:273 */ @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; } /** * @apilevel internal */ private TypeDecl type_compute() { TypeDecl typeDecl = genericDecl(); if(typeDecl instanceof GenericTypeDecl) { // use signature in lookup for types that are used in extends and implements clauses if (unqualifiedScope().inExtendsOrImplements()) { return ((GenericTypeDecl)typeDecl).lookupParTypeDecl(this); } ArrayList args = new ArrayList(); for(int i = 0; i < getNumTypeArgument(); i++) args.add(getTypeArgument(i).type()); return ((GenericTypeDecl)typeDecl).lookupParTypeDecl(args); } return typeDecl; } /** * @attribute syn * @aspect GenericsTypeAnalysis * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:287 */ public TypeDecl genericDecl() { ASTNode$State state = state(); try { return getTypeAccess().type(); } finally { } } /** * @attribute syn * @aspect AccessTypes * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/ResolveAmbiguousNames.jrag:13 */ public boolean isTypeAccess() { ASTNode$State state = state(); try { return true; } finally { } } /** * Builds a copy of this Access node where all occurrences * of type variables in the original type parameter list have been replaced * by the substitution type parameters. * * @return the substituted Access node * @attribute syn * @aspect TypeInference * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/TypeInference.jrag:406 */ public Access substituted(Collection<TypeVariable> original, List<TypeVariable> substitution) { ASTNode$State state = state(); try { List<Access> substArgs = new List<Access>(); for (Access arg : getTypeArgumentList()) substArgs.add(arg.substituted(original, substitution)); return new ParTypeAccess( getTypeAccess().substituted(original, substitution), substArgs); } finally { } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:265 * @apilevel internal */ public SimpleSet Define_SimpleSet_lookupType(ASTNode caller, ASTNode child, String name) { if(caller == getTypeArgumentListNoTransform()) { int childIndex = caller.getIndexOfChild(child); return unqualifiedScope().lookupType(name); } else { return getParent().Define_SimpleSet_lookupType(this, caller, name); } } /** * @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); } }
13,360
28.108932
167
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/ParTypeDecl.java
package soot.JastAddJ; import java.util.HashSet; 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; /** * @ast interface * */ public interface ParTypeDecl extends Parameterization { //syn String name(); //syn String name(); int getNumArgument(); Access getArgument(int index); public String typeName(); SimpleSet localFields(String name); HashMap localMethodsSignatureMap(); public TypeDecl substitute(TypeVariable typeVariable); public int numTypeParameter(); public TypeVariable typeParameter(int index); public Access substitute(Parameterization parTypeDecl); public Access createQualifiedAccess(); public void transformation(); /** * @attribute syn * @aspect Generics * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:244 */ @SuppressWarnings({"unchecked", "cast"}) public boolean isParameterizedType(); /** * @attribute syn * @aspect Generics * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:245 */ @SuppressWarnings({"unchecked", "cast"}) public boolean isRawType(); /** * @attribute syn * @aspect GenericsTypeCheck * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:380 */ @SuppressWarnings({"unchecked", "cast"}) public boolean sameArgument(ParTypeDecl decl); /** * @attribute syn * @aspect LookupParTypeDecl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:577 */ @SuppressWarnings({"unchecked", "cast"}) public boolean sameSignature(Access a); /** * @attribute syn * @aspect LookupParTypeDecl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:612 */ @SuppressWarnings({"unchecked", "cast"}) public boolean sameSignature(ArrayList list); /** * @attribute syn * @aspect GenericsParTypeDecl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericsParTypeDecl.jrag:30 */ @SuppressWarnings({"unchecked", "cast"}) public String nameWithArgs(); /** * @attribute inh * @aspect GenericsParTypeDecl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericsParTypeDecl.jrag:45 */ public TypeDecl genericDecl(); }
2,786
26.058252
113
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/ParameterDeclaration.java
/* This file was generated with JastAdd2 (http://jastadd.org) version R20130212 (r1031) */ package soot.JastAddJ; import java.util.HashSet; 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; /** * A parameter declaration as used in either method parameter lists * or as a catch clause parameter. * @production ParameterDeclaration : {@link ASTNode} ::= <span class="component">{@link Modifiers}</span> <span class="component">TypeAccess:{@link Access}</span> <span class="component">&lt;ID:String&gt;</span>; * @ast node * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/java.ast:91 */ public class ParameterDeclaration extends ASTNode<ASTNode> implements Cloneable, SimpleSet, Iterator, Variable { /** * @apilevel low-level */ public void flushCache() { super.flushCache(); type_computed = false; type_value = null; sourceVariableDecl_computed = false; sourceVariableDecl_value = null; throwTypes_computed = false; throwTypes_value = null; localNum_computed = false; } /** * @apilevel internal */ public void flushCollectionCache() { super.flushCollectionCache(); } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public ParameterDeclaration clone() throws CloneNotSupportedException { ParameterDeclaration node = (ParameterDeclaration)super.clone(); node.type_computed = false; node.type_value = null; node.sourceVariableDecl_computed = false; node.sourceVariableDecl_value = null; node.throwTypes_computed = false; node.throwTypes_value = null; node.localNum_computed = false; node.in$Circle(false); node.is$Final(false); return node; } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public ParameterDeclaration copy() { try { ParameterDeclaration node = (ParameterDeclaration) clone(); node.parent = null; if(children != null) node.children = (ASTNode[]) children.clone(); return node; } catch (CloneNotSupportedException e) { throw new Error("Error: clone not supported for " + getClass().getName()); } } /** * Create a deep copy of the AST subtree at this node. * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level */ @SuppressWarnings({"unchecked", "cast"}) public ParameterDeclaration fullCopy() { ParameterDeclaration tree = (ParameterDeclaration) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) children[i]; if(child != null) { child = child.fullCopy(); tree.setChild(child, i); } } } return tree; } /** * @ast method * @aspect DataStructures * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DataStructures.jrag:117 */ public SimpleSet add(Object o) { return new SimpleSetImpl().add(this).add(o); } /** * @ast method * @aspect DataStructures * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DataStructures.jrag:121 */ public boolean isSingleton() { return true; } /** * @ast method * @aspect DataStructures * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DataStructures.jrag:122 */ public boolean isSingleton(Object o) { return contains(o); } /** * @ast method * @aspect DataStructures * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DataStructures.jrag:125 */ private ParameterDeclaration iterElem; /** * @ast method * @aspect DataStructures * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DataStructures.jrag:126 */ public Iterator iterator() { iterElem = this; return this; } /** * @ast method * @aspect DataStructures * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DataStructures.jrag:127 */ public boolean hasNext() { return iterElem != null; } /** * @ast method * @aspect DataStructures * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DataStructures.jrag:128 */ public Object next() { Object o = iterElem; iterElem = null; return o; } /** * @ast method * @aspect DataStructures * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DataStructures.jrag:129 */ public void remove() { throw new UnsupportedOperationException(); } /** * @ast method * @aspect NodeConstructors * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/NodeConstructors.jrag:11 */ public ParameterDeclaration(Access type, String name) { this(new Modifiers(new List()), type, name); } /** * @ast method * @aspect NodeConstructors * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/NodeConstructors.jrag:14 */ public ParameterDeclaration(TypeDecl type, String name) { this(new Modifiers(new List()), type.createQualifiedAccess(), name); } /** * @ast method * @aspect PrettyPrint * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/PrettyPrint.jadd:233 */ public void toString(StringBuffer s) { getModifiers().toString(s); getTypeAccess().toString(s); s.append(" " + name()); } /** * @ast method * @aspect EmitJimple * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/EmitJimple.jrag:397 */ public void jimplify2(Body b) { b.setLine(this); local = b.newLocal(name(), type().getSootType()); b.add(b.newIdentityStmt(local, b.newParameterRef(type().getSootType(), localNum(), this),this)); } /** * @ast method * @aspect EmitJimple * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/EmitJimple.jrag:402 */ public Local local; /** * @ast method * */ public ParameterDeclaration() { super(); } /** * Initializes the child array to the correct size. * Initializes List and Opt nta children. * @apilevel internal * @ast method * @ast method * */ public void init$Children() { children = new ASTNode[2]; } /** * @ast method * */ public ParameterDeclaration(Modifiers p0, Access p1, String p2) { setChild(p0, 0); setChild(p1, 1); setID(p2); } /** * @ast method * */ public ParameterDeclaration(Modifiers p0, Access p1, beaver.Symbol p2) { setChild(p0, 0); setChild(p1, 1); setID(p2); } /** * @apilevel low-level * @ast method * */ protected int numChildren() { return 2; } /** * @apilevel internal * @ast method * */ public boolean mayHaveRewrite() { return false; } /** * Replaces the Modifiers child. * @param node The new node to replace the Modifiers child. * @apilevel high-level * @ast method * */ public void setModifiers(Modifiers node) { setChild(node, 0); } /** * Retrieves the Modifiers child. * @return The current node used as the Modifiers child. * @apilevel high-level * @ast method * */ public Modifiers getModifiers() { return (Modifiers)getChild(0); } /** * Retrieves the Modifiers child. * <p><em>This method does not invoke AST transformations.</em></p> * @return The current node used as the Modifiers child. * @apilevel low-level * @ast method * */ public Modifiers getModifiersNoTransform() { return (Modifiers)getChildNoTransform(0); } /** * Replaces the TypeAccess child. * @param node The new node to replace the TypeAccess child. * @apilevel high-level * @ast method * */ public void setTypeAccess(Access node) { setChild(node, 1); } /** * Retrieves the TypeAccess child. * @return The current node used as the TypeAccess child. * @apilevel high-level * @ast method * */ public Access getTypeAccess() { return (Access)getChild(1); } /** * Retrieves the TypeAccess child. * <p><em>This method does not invoke AST transformations.</em></p> * @return The current node used as the TypeAccess child. * @apilevel low-level * @ast method * */ public Access getTypeAccessNoTransform() { return (Access)getChildNoTransform(1); } /** * Replaces the lexeme ID. * @param value The new value for the lexeme ID. * @apilevel high-level * @ast method * */ public void setID(String value) { tokenString_ID = value; } /** * @apilevel internal * @ast method * */ /** * @apilevel internal */ protected String tokenString_ID; /** * @ast method * */ public int IDstart; /** * @ast method * */ public int IDend; /** * JastAdd-internal setter for lexeme ID using the Beaver parser. * @apilevel internal * @ast method * */ 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(); } /** * Retrieves the value for the lexeme ID. * @return The value for the lexeme ID. * @apilevel high-level * @ast method * */ public String getID() { return tokenString_ID != null ? tokenString_ID : ""; } /** * @ast method * @aspect MultiCatch * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/MultiCatch.jrag:214 */ public void nameCheck() { SimpleSet decls = outerScope().lookupVariable(name()); for(Iterator iter = decls.iterator(); iter.hasNext(); ) { Variable var = (Variable)iter.next(); if(var instanceof VariableDeclaration) { VariableDeclaration decl = (VariableDeclaration)var; if (decl.enclosingBodyDecl() == enclosingBodyDecl()) error("duplicate declaration of parameter " + name()); } else if(var instanceof ParameterDeclaration) { ParameterDeclaration decl = (ParameterDeclaration)var; if(decl.enclosingBodyDecl() == enclosingBodyDecl()) error("duplicate declaration of parameter " + name()); } else if(var instanceof CatchParameterDeclaration) { CatchParameterDeclaration decl = (CatchParameterDeclaration)var; if(decl.enclosingBodyDecl() == enclosingBodyDecl()) error("duplicate declaration of parameter " + name()); } } // 8.4.1 if(!lookupVariable(name()).contains(this)) { error("duplicate declaration of parameter " + name()); } } /** * @attribute syn * @aspect DataStructures * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DataStructures.jrag:115 */ public int size() { ASTNode$State state = state(); try { return 1; } finally { } } /** * @attribute syn * @aspect DataStructures * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DataStructures.jrag:116 */ public boolean isEmpty() { ASTNode$State state = state(); try { return false; } finally { } } /** * @attribute syn * @aspect DataStructures * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DataStructures.jrag:120 */ public boolean contains(Object o) { ASTNode$State state = state(); try { return this == o; } finally { } } /** * @attribute syn * @aspect Modifiers * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/Modifiers.jrag:220 */ public boolean isSynthetic() { ASTNode$State state = state(); try { return getModifiers().isSynthetic(); } finally { } } /** * @attribute syn * @aspect PrettyPrint * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/PrettyPrint.jadd:800 */ public String dumpString() { ASTNode$State state = state(); try { return getClass().getName() + " [" + getID() + "]"; } finally { } } /** * @apilevel internal */ protected boolean type_computed = false; /** * @apilevel internal */ protected TypeDecl type_value; /** * @attribute syn * @aspect TypeAnalysis * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeAnalysis.jrag:253 */ @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; } /** * @apilevel internal */ private TypeDecl type_compute() { return getTypeAccess().type(); } /** * @attribute syn * @aspect Variables * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/VariableDeclaration.jrag:47 */ public boolean isParameter() { ASTNode$State state = state(); try { return true; } finally { } } /** * @attribute syn * @aspect Variables * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/VariableDeclaration.jrag:50 */ public boolean isClassVariable() { ASTNode$State state = state(); try { return false; } finally { } } /** * @attribute syn * @aspect Variables * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/VariableDeclaration.jrag:51 */ public boolean isInstanceVariable() { ASTNode$State state = state(); try { return false; } finally { } } /** * @attribute syn * @aspect Variables * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/VariableDeclaration.jrag:55 */ public boolean isLocalVariable() { ASTNode$State state = state(); try { return false; } finally { } } /** * @attribute syn * @aspect Variables * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/VariableDeclaration.jrag:73 */ public boolean isFinal() { ASTNode$State state = state(); try { return getModifiers().isFinal(); } finally { } } /** * @attribute syn * @aspect Variables * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/VariableDeclaration.jrag:74 */ public boolean isVolatile() { ASTNode$State state = state(); try { return getModifiers().isVolatile(); } finally { } } /** * @attribute syn * @aspect Variables * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/VariableDeclaration.jrag:75 */ public boolean isBlank() { ASTNode$State state = state(); try { return true; } finally { } } /** * @attribute syn * @aspect Variables * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/VariableDeclaration.jrag:76 */ public boolean isStatic() { ASTNode$State state = state(); try { return false; } finally { } } /** * @attribute syn * @aspect Variables * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/VariableDeclaration.jrag:78 */ public String name() { ASTNode$State state = state(); try { return getID(); } finally { } } /** * @attribute syn * @aspect Variables * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/VariableDeclaration.jrag:80 */ public boolean hasInit() { ASTNode$State state = state(); try { return false; } finally { } } /** * @attribute syn * @aspect Variables * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/VariableDeclaration.jrag:81 */ public Expr getInit() { ASTNode$State state = state(); try { throw new UnsupportedOperationException(); } finally { } } /** * @attribute syn * @aspect Variables * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/VariableDeclaration.jrag:82 */ public Constant constant() { ASTNode$State state = state(); try { throw new UnsupportedOperationException(); } finally { } } /** * @apilevel internal */ protected boolean sourceVariableDecl_computed = false; /** * @apilevel internal */ protected Variable sourceVariableDecl_value; /** * @attribute syn * @aspect SourceDeclarations * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:1523 */ @SuppressWarnings({"unchecked", "cast"}) public Variable sourceVariableDecl() { if(sourceVariableDecl_computed) { return sourceVariableDecl_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); sourceVariableDecl_value = sourceVariableDecl_compute(); if(isFinal && num == state().boundariesCrossed) sourceVariableDecl_computed = true; return sourceVariableDecl_value; } /** * @apilevel internal */ private Variable sourceVariableDecl_compute() { return this; } /** * @attribute syn * @aspect VariableArityParameters * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/VariableArityParameters.jrag:35 */ public boolean isVariableArity() { ASTNode$State state = state(); try { return false; } finally { } } /** * @apilevel internal */ protected boolean throwTypes_computed = false; /** * @apilevel internal */ protected Collection<TypeDecl> throwTypes_value; /** * @attribute syn * @aspect PreciseRethrow * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/PreciseRethrow.jrag:27 */ @SuppressWarnings({"unchecked", "cast"}) public Collection<TypeDecl> throwTypes() { if(throwTypes_computed) { return throwTypes_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); throwTypes_value = throwTypes_compute(); if(isFinal && num == state().boundariesCrossed) throwTypes_computed = true; return throwTypes_value; } /** * @apilevel internal */ private Collection<TypeDecl> throwTypes_compute() { if (isCatchParam() && effectivelyFinal()) { // the catch parameter must be final or implicitly // final (multi-catch) return catchClause().caughtExceptions(); } else { Collection<TypeDecl> tts = new LinkedList<TypeDecl>(); tts.add(type()); return tts; } } /** * @attribute syn * @aspect PreciseRethrow * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/PreciseRethrow.jrag:41 */ public boolean effectivelyFinal() { ASTNode$State state = state(); try { return isFinal() || !inhModifiedInScope(this); } finally { } } /** * Builds a copy of this ParameterDeclaration node where all occurrences * of type variables in the original type parameter list have been replaced * by the substitution type parameters. * * @return the substituted ParameterDeclaration node * @attribute syn * @aspect TypeInference * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/TypeInference.jrag:391 */ public ParameterDeclaration substituted(Collection<TypeVariable> original, List<TypeVariable> substitution) { ASTNode$State state = state(); try { return new ParameterDeclaration( (Modifiers) getModifiers().cloneSubtree(), getTypeAccess().substituted(original, substitution), getID()); } finally { } } /** * @attribute inh * @aspect VariableScope * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupVariable.jrag:22 */ @SuppressWarnings({"unchecked", "cast"}) public SimpleSet lookupVariable(String name) { ASTNode$State state = state(); SimpleSet lookupVariable_String_value = getParent().Define_SimpleSet_lookupVariable(this, null, name); return lookupVariable_String_value; } /** * @attribute inh * @aspect NameCheck * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/NameCheck.jrag:293 */ @SuppressWarnings({"unchecked", "cast"}) public VariableScope outerScope() { ASTNode$State state = state(); VariableScope outerScope_value = getParent().Define_VariableScope_outerScope(this, null); return outerScope_value; } /** * @attribute inh * @aspect NameCheck * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/NameCheck.jrag:354 */ @SuppressWarnings({"unchecked", "cast"}) public BodyDecl enclosingBodyDecl() { ASTNode$State state = state(); BodyDecl enclosingBodyDecl_value = getParent().Define_BodyDecl_enclosingBodyDecl(this, null); return enclosingBodyDecl_value; } /** * @attribute inh * @aspect NestedTypes * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeAnalysis.jrag:589 */ @SuppressWarnings({"unchecked", "cast"}) public TypeDecl hostType() { ASTNode$State state = state(); TypeDecl hostType_value = getParent().Define_TypeDecl_hostType(this, null); return hostType_value; } /** * @attribute inh * @aspect Variables * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/VariableDeclaration.jrag:52 */ @SuppressWarnings({"unchecked", "cast"}) public boolean isMethodParameter() { ASTNode$State state = state(); boolean isMethodParameter_value = getParent().Define_boolean_isMethodParameter(this, null); return isMethodParameter_value; } /** * @attribute inh * @aspect Variables * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/VariableDeclaration.jrag:53 */ @SuppressWarnings({"unchecked", "cast"}) public boolean isConstructorParameter() { ASTNode$State state = state(); boolean isConstructorParameter_value = getParent().Define_boolean_isConstructorParameter(this, null); return isConstructorParameter_value; } /** * @attribute inh * @aspect Variables * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/VariableDeclaration.jrag:54 */ @SuppressWarnings({"unchecked", "cast"}) public boolean isExceptionHandlerParameter() { ASTNode$State state = state(); boolean isExceptionHandlerParameter_value = getParent().Define_boolean_isExceptionHandlerParameter(this, null); return isExceptionHandlerParameter_value; } /** * @apilevel internal */ protected boolean localNum_computed = false; /** * @apilevel internal */ protected int localNum_value; /** * @attribute inh * @aspect LocalNum * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/LocalNum.jrag:13 */ @SuppressWarnings({"unchecked", "cast"}) public int localNum() { if(localNum_computed) { return localNum_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); localNum_value = getParent().Define_int_localNum(this, null); if(isFinal && num == state().boundariesCrossed) localNum_computed = true; return localNum_value; } /** * @return true if the variable var is modified in the local scope * @attribute inh * @aspect PreciseRethrow * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/PreciseRethrow.jrag:47 */ @SuppressWarnings({"unchecked", "cast"}) public boolean inhModifiedInScope(Variable var) { ASTNode$State state = state(); boolean inhModifiedInScope_Variable_value = getParent().Define_boolean_inhModifiedInScope(this, null, var); return inhModifiedInScope_Variable_value; } /** * @return true if this is the parameter declaration of a catch clause * @attribute inh * @aspect PreciseRethrow * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/PreciseRethrow.jrag:121 */ @SuppressWarnings({"unchecked", "cast"}) public boolean isCatchParam() { ASTNode$State state = state(); boolean isCatchParam_value = getParent().Define_boolean_isCatchParam(this, null); return isCatchParam_value; } /** * @attribute inh * @aspect PreciseRethrow * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/PreciseRethrow.jrag:127 */ @SuppressWarnings({"unchecked", "cast"}) public CatchClause catchClause() { ASTNode$State state = state(); CatchClause catchClause_value = getParent().Define_CatchClause_catchClause(this, null); return catchClause_value; } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/Modifiers.jrag:288 * @apilevel internal */ public boolean Define_boolean_mayBeFinal(ASTNode caller, ASTNode child) { if(caller == getModifiersNoTransform()) { return true; } else { return getParent().Define_boolean_mayBeFinal(this, caller); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Annotations.jrag:83 * @apilevel internal */ public boolean Define_boolean_mayUseAnnotationTarget(ASTNode caller, ASTNode child, String name) { if(caller == getModifiersNoTransform()) { return name.equals("PARAMETER"); } else { return getParent().Define_boolean_mayUseAnnotationTarget(this, caller, name); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Enums.jrag:79 * @apilevel internal */ public NameType Define_NameType_nameType(ASTNode caller, ASTNode child) { if(caller == getTypeAccessNoTransform()) { return NameType.TYPE_NAME; } else { return getParent().Define_NameType_nameType(this, caller); } } /** * @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); } }
26,920
28.978842
213
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/ParameterDeclarationSubstituted.java
/* This file was generated with JastAdd2 (http://jastadd.org) version R20130212 (r1031) */ package soot.JastAddJ; import java.util.HashSet; 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; /** * @production ParameterDeclarationSubstituted : {@link ParameterDeclaration} ::= <span class="component">&lt;Original:ParameterDeclaration&gt;</span>; * @ast node * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.ast:33 */ public class ParameterDeclarationSubstituted extends ParameterDeclaration implements Cloneable { /** * @apilevel low-level */ public void flushCache() { super.flushCache(); sourceVariableDecl_computed = false; sourceVariableDecl_value = null; } /** * @apilevel internal */ public void flushCollectionCache() { super.flushCollectionCache(); } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public ParameterDeclarationSubstituted clone() throws CloneNotSupportedException { ParameterDeclarationSubstituted node = (ParameterDeclarationSubstituted)super.clone(); node.sourceVariableDecl_computed = false; node.sourceVariableDecl_value = null; node.in$Circle(false); node.is$Final(false); return node; } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public ParameterDeclarationSubstituted copy() { try { ParameterDeclarationSubstituted node = (ParameterDeclarationSubstituted) clone(); node.parent = null; if(children != null) node.children = (ASTNode[]) children.clone(); return node; } catch (CloneNotSupportedException e) { throw new Error("Error: clone not supported for " + getClass().getName()); } } /** * Create a deep copy of the AST subtree at this node. * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level */ @SuppressWarnings({"unchecked", "cast"}) public ParameterDeclarationSubstituted fullCopy() { ParameterDeclarationSubstituted tree = (ParameterDeclarationSubstituted) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) children[i]; if(child != null) { child = child.fullCopy(); tree.setChild(child, i); } } } return tree; } /** * @ast method * */ public ParameterDeclarationSubstituted() { super(); } /** * Initializes the child array to the correct size. * Initializes List and Opt nta children. * @apilevel internal * @ast method * @ast method * */ public void init$Children() { children = new ASTNode[2]; } /** * @ast method * */ public ParameterDeclarationSubstituted(Modifiers p0, Access p1, String p2, ParameterDeclaration p3) { setChild(p0, 0); setChild(p1, 1); setID(p2); setOriginal(p3); } /** * @ast method * */ public ParameterDeclarationSubstituted(Modifiers p0, Access p1, beaver.Symbol p2, ParameterDeclaration p3) { setChild(p0, 0); setChild(p1, 1); setID(p2); setOriginal(p3); } /** * @apilevel low-level * @ast method * */ protected int numChildren() { return 2; } /** * @apilevel internal * @ast method * */ public boolean mayHaveRewrite() { return false; } /** * Replaces the Modifiers child. * @param node The new node to replace the Modifiers child. * @apilevel high-level * @ast method * */ public void setModifiers(Modifiers node) { setChild(node, 0); } /** * Retrieves the Modifiers child. * @return The current node used as the Modifiers child. * @apilevel high-level * @ast method * */ public Modifiers getModifiers() { return (Modifiers)getChild(0); } /** * Retrieves the Modifiers child. * <p><em>This method does not invoke AST transformations.</em></p> * @return The current node used as the Modifiers child. * @apilevel low-level * @ast method * */ public Modifiers getModifiersNoTransform() { return (Modifiers)getChildNoTransform(0); } /** * Replaces the TypeAccess child. * @param node The new node to replace the TypeAccess child. * @apilevel high-level * @ast method * */ public void setTypeAccess(Access node) { setChild(node, 1); } /** * Retrieves the TypeAccess child. * @return The current node used as the TypeAccess child. * @apilevel high-level * @ast method * */ public Access getTypeAccess() { return (Access)getChild(1); } /** * Retrieves the TypeAccess child. * <p><em>This method does not invoke AST transformations.</em></p> * @return The current node used as the TypeAccess child. * @apilevel low-level * @ast method * */ public Access getTypeAccessNoTransform() { return (Access)getChildNoTransform(1); } /** * Replaces the lexeme ID. * @param value The new value for the lexeme ID. * @apilevel high-level * @ast method * */ public void setID(String value) { tokenString_ID = value; } /** * JastAdd-internal setter for lexeme ID using the Beaver parser. * @apilevel internal * @ast method * */ 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(); } /** * Retrieves the value for the lexeme ID. * @return The value for the lexeme ID. * @apilevel high-level * @ast method * */ public String getID() { return tokenString_ID != null ? tokenString_ID : ""; } /** * Replaces the lexeme Original. * @param value The new value for the lexeme Original. * @apilevel high-level * @ast method * */ public void setOriginal(ParameterDeclaration value) { tokenParameterDeclaration_Original = value; } /** * @apilevel internal * @ast method * */ /** * @apilevel internal */ protected ParameterDeclaration tokenParameterDeclaration_Original; /** * Retrieves the value for the lexeme Original. * @return The value for the lexeme Original. * @apilevel high-level * @ast method * */ public ParameterDeclaration getOriginal() { return tokenParameterDeclaration_Original; } /** * @apilevel internal */ protected boolean sourceVariableDecl_computed = false; /** * @apilevel internal */ protected Variable sourceVariableDecl_value; /** * @attribute syn * @aspect SourceDeclarations * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:1524 */ @SuppressWarnings({"unchecked", "cast"}) public Variable sourceVariableDecl() { if(sourceVariableDecl_computed) { return sourceVariableDecl_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); sourceVariableDecl_value = sourceVariableDecl_compute(); if(isFinal && num == state().boundariesCrossed) sourceVariableDecl_computed = true; return sourceVariableDecl_value; } /** * @apilevel internal */ private Variable sourceVariableDecl_compute() { return getOriginal().sourceVariableDecl(); } /** * @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); } }
7,983
25.091503
151
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/Parameterization.java
package soot.JastAddJ; import java.util.HashSet; 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; /** * @ast interface * */ public interface Parameterization { boolean isRawType(); TypeDecl substitute(TypeVariable typeVariable); }
631
18.75
51
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/ParseName.java
/* This file was generated with JastAdd2 (http://jastadd.org) version R20130212 (r1031) */ package soot.JastAddJ; import java.util.HashSet; 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; /** * @production ParseName : {@link Access} ::= <span class="component">&lt;ID:String&gt;</span>; * @ast node * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/java.ast:33 */ public class ParseName extends Access implements Cloneable { /** * @apilevel low-level */ public void flushCache() { super.flushCache(); } /** * @apilevel internal */ public void flushCollectionCache() { super.flushCollectionCache(); } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public ParseName clone() throws CloneNotSupportedException { ParseName node = (ParseName)super.clone(); node.in$Circle(false); node.is$Final(false); return node; } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public ParseName copy() { try { ParseName node = (ParseName) clone(); node.parent = null; if(children != null) node.children = (ASTNode[]) children.clone(); return node; } catch (CloneNotSupportedException e) { throw new Error("Error: clone not supported for " + getClass().getName()); } } /** * Create a deep copy of the AST subtree at this node. * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level */ @SuppressWarnings({"unchecked", "cast"}) public ParseName fullCopy() { ParseName tree = (ParseName) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) children[i]; if(child != null) { child = child.fullCopy(); tree.setChild(child, i); } } } return tree; } /** * Parser debug printout. * @ast method * @aspect PrettyPrint * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/PrettyPrint.jrag:14 */ public void toString(StringBuffer sb) { sb.append(getID()); } /** * @ast method * */ public ParseName() { super(); } /** * Initializes the child array to the correct size. * Initializes List and Opt nta children. * @apilevel internal * @ast method * @ast method * */ public void init$Children() { } /** * @ast method * */ public ParseName(String p0) { setID(p0); } /** * @ast method * */ public ParseName(beaver.Symbol p0) { setID(p0); } /** * @apilevel low-level * @ast method * */ protected int numChildren() { return 0; } /** * @apilevel internal * @ast method * */ public boolean mayHaveRewrite() { return true; } /** * Replaces the lexeme ID. * @param value The new value for the lexeme ID. * @apilevel high-level * @ast method * */ public void setID(String value) { tokenString_ID = value; } /** * @apilevel internal * @ast method * */ /** * @apilevel internal */ protected String tokenString_ID; /** * @ast method * */ public int IDstart; /** * @ast method * */ public int IDend; /** * JastAdd-internal setter for lexeme ID using the Beaver parser. * @apilevel internal * @ast method * */ 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(); } /** * Retrieves the value for the lexeme ID. * @return The value for the lexeme ID. * @apilevel high-level * @ast method * */ public String getID() { return tokenString_ID != null ? tokenString_ID : ""; } /** * @attribute syn * @aspect TypeScopePropagation * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupType.jrag:430 */ public SimpleSet qualifiedLookupType(String name) { ASTNode$State state = state(); try { return SimpleSet.emptySet; } finally { } } /** * @attribute syn * @aspect VariableScope * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupVariable.jrag:148 */ public SimpleSet qualifiedLookupVariable(String name) { ASTNode$State state = state(); try { return SimpleSet.emptySet; } finally { } } /** * @attribute syn * @aspect PrettyPrint * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/PrettyPrint.jadd:800 */ public String dumpString() { ASTNode$State state = state(); try { return getClass().getName() + " [" + getID() + "]"; } finally { } } /** * @attribute syn * @aspect Names * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/QualifiedNames.jrag:14 */ public String name() { ASTNode$State state = state(); try { return getID(); } finally { } } /** * @apilevel internal */ public ASTNode rewriteTo() { // Declared in /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/SyntacticClassification.jrag at line 15 state().duringSyntacticClassification++; ASTNode result = rewriteRule0(); state().duringSyntacticClassification--; return result; } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/SyntacticClassification.jrag:15 * @apilevel internal */ private Access rewriteRule0() { return nameType().reclassify(name(), start, end); } }
6,244
23.111969
127
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/PathPart.java
package soot.JastAddJ; import java.io.File; import java.io.*; /** * @ast class * */ public class PathPart extends java.lang.Object { protected InputStream is; protected String pathName; protected String relativeName; protected String fullName; protected long age; protected Program program; protected boolean isSource; protected PathPart() {} protected String fileSuffix() { return isSource ? ".java" : ".class"; } public static PathPart createSourcePath(String fileName, Program program) { PathPart p = createPathPart(fileName); if(p != null) { p.isSource = true; p.program = program; } return p; } public static PathPart createClassPath(String fileName, Program program) { PathPart p = createPathPart(fileName); if(p != null) { p.isSource = false; p.program = program; } return p; } private static PathPart createPathPart(String s) { try { File f = new File(s); if(f.isDirectory()) return new FolderPart(f); else if(f.isFile()) return new ZipFilePart(f); } catch (IOException e) { // error in path } return null; } public InputStream getInputStream() { return is; } public long getAge() { return age; } public Program getProgram() { return program; } public void setProgram(Program program) { this.program = program; } // is there a package with the specified name on this path part public boolean hasPackage(String name) { return false; } // select a compilation unit from a canonical name // returns true of the compilation unit exists on this path public boolean selectCompilationUnit(String canonicalName) throws IOException { return false; } // load the return currently selected compilation unit public CompilationUnit getCompilationUnit() { long startTime = System.currentTimeMillis(); try{ if(!isSource) { if(program.options().verbose()) System.out.print("Loading .class file: " + fullName + " "); CompilationUnit u = program.bytecodeReader.read(is, fullName, program); u.setPathName(pathName); u.setRelativeName(relativeName); u.setFromSource(false); if(program.options().verbose()) System.out.println("from " + pathName + " in " + (System.currentTimeMillis() - startTime) + " ms"); return u; } else { if(program.options().verbose()) System.out.print("Loading .java file: " + fullName + " "); CompilationUnit u = program.javaParser.parse(is, fullName); u.setPathName(pathName); u.setRelativeName(relativeName); u.setFromSource(true); if(program.options().verbose()) System.out.println("in " + (System.currentTimeMillis() - startTime) + " ms"); return u; } } catch(Exception e) { throw new Error("Error: Failed to load " + fullName + ".", e); } finally { try{ if(is != null){ is.close(); is = null; } }catch(Exception e){ throw new Error("Error: Failed to close input stream for " + fullName + ".",e); } } } }
2,986
23.284553
104
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/PlaceholderMethodDecl.java
/* This file was generated with JastAdd2 (http://jastadd.org) version R20130212 (r1031) */ package soot.JastAddJ; import java.util.HashSet; 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; /** * Placeholder method for type inference on generic instance creation. * @production PlaceholderMethodDecl : {@link GenericMethodDecl}; * @ast node * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/TypeInference.ast:9 */ public class PlaceholderMethodDecl extends GenericMethodDecl implements Cloneable { /** * @apilevel low-level */ public void flushCache() { super.flushCache(); } /** * @apilevel internal */ public void flushCollectionCache() { super.flushCollectionCache(); } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public PlaceholderMethodDecl clone() throws CloneNotSupportedException { PlaceholderMethodDecl node = (PlaceholderMethodDecl)super.clone(); node.in$Circle(false); node.is$Final(false); return node; } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public PlaceholderMethodDecl copy() { try { PlaceholderMethodDecl node = (PlaceholderMethodDecl) clone(); node.parent = null; if(children != null) node.children = (ASTNode[]) children.clone(); return node; } catch (CloneNotSupportedException e) { throw new Error("Error: clone not supported for " + getClass().getName()); } } /** * Create a deep copy of the AST subtree at this node. * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level */ @SuppressWarnings({"unchecked", "cast"}) public PlaceholderMethodDecl fullCopy() { PlaceholderMethodDecl tree = (PlaceholderMethodDecl) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) children[i]; if(child != null) { child = child.fullCopy(); tree.setChild(child, i); } } } return tree; } /** * @ast method * @aspect TypeInference * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/TypeInference.jrag:22 */ public void nameCheck() { } /** * @ast method * @aspect TypeInference * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/TypeInference.jrag:23 */ public void typeCheck() { } /** * @ast method * @aspect TypeInference * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/TypeInference.jrag:24 */ public void exceptionHandling() { } /** * @ast method * @aspect TypeInference * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/TypeInference.jrag:25 */ public void checkUnreachableStmt() { } /** * @ast method * @aspect TypeInference * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/TypeInference.jrag:26 */ public void definiteAssignment() { } /** * @ast method * @aspect TypeInference * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/TypeInference.jrag:27 */ public void checkModifiers() { } /** * Placeholder methods are not pretty printed. * @ast method * @aspect TypeInference * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/TypeInference.jrag:32 */ public void toString(StringBuffer s) { } /** * @ast method * */ public PlaceholderMethodDecl() { super(); } /** * Initializes the child array to the correct size. * Initializes List and Opt nta children. * @apilevel internal * @ast method * @ast method * */ public void init$Children() { children = new ASTNode[6]; setChild(new List(), 2); setChild(new List(), 3); setChild(new Opt(), 4); setChild(new List(), 5); } /** * @ast method * */ public PlaceholderMethodDecl(Modifiers p0, Access p1, String p2, List<ParameterDeclaration> p3, List<Access> p4, Opt<Block> p5, List<TypeVariable> p6) { setChild(p0, 0); setChild(p1, 1); setID(p2); setChild(p3, 2); setChild(p4, 3); setChild(p5, 4); setChild(p6, 5); } /** * @ast method * */ public PlaceholderMethodDecl(Modifiers p0, Access p1, beaver.Symbol p2, List<ParameterDeclaration> p3, List<Access> p4, Opt<Block> p5, List<TypeVariable> p6) { setChild(p0, 0); setChild(p1, 1); setID(p2); setChild(p3, 2); setChild(p4, 3); setChild(p5, 4); setChild(p6, 5); } /** * @apilevel low-level * @ast method * */ protected int numChildren() { return 6; } /** * @apilevel internal * @ast method * */ public boolean mayHaveRewrite() { return false; } /** * Replaces the Modifiers child. * @param node The new node to replace the Modifiers child. * @apilevel high-level * @ast method * */ public void setModifiers(Modifiers node) { setChild(node, 0); } /** * Retrieves the Modifiers child. * @return The current node used as the Modifiers child. * @apilevel high-level * @ast method * */ public Modifiers getModifiers() { return (Modifiers)getChild(0); } /** * Retrieves the Modifiers child. * <p><em>This method does not invoke AST transformations.</em></p> * @return The current node used as the Modifiers child. * @apilevel low-level * @ast method * */ public Modifiers getModifiersNoTransform() { return (Modifiers)getChildNoTransform(0); } /** * Replaces the TypeAccess child. * @param node The new node to replace the TypeAccess child. * @apilevel high-level * @ast method * */ public void setTypeAccess(Access node) { setChild(node, 1); } /** * Retrieves the TypeAccess child. * @return The current node used as the TypeAccess child. * @apilevel high-level * @ast method * */ public Access getTypeAccess() { return (Access)getChild(1); } /** * Retrieves the TypeAccess child. * <p><em>This method does not invoke AST transformations.</em></p> * @return The current node used as the TypeAccess child. * @apilevel low-level * @ast method * */ public Access getTypeAccessNoTransform() { return (Access)getChildNoTransform(1); } /** * Replaces the lexeme ID. * @param value The new value for the lexeme ID. * @apilevel high-level * @ast method * */ public void setID(String value) { tokenString_ID = value; } /** * JastAdd-internal setter for lexeme ID using the Beaver parser. * @apilevel internal * @ast method * */ 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(); } /** * Retrieves the value for the lexeme ID. * @return The value for the lexeme ID. * @apilevel high-level * @ast method * */ public String getID() { return tokenString_ID != null ? tokenString_ID : ""; } /** * Replaces the Parameter list. * @param list The new list node to be used as the Parameter list. * @apilevel high-level * @ast method * */ public void setParameterList(List<ParameterDeclaration> list) { setChild(list, 2); } /** * Retrieves the number of children in the Parameter list. * @return Number of children in the Parameter list. * @apilevel high-level * @ast method * */ public int getNumParameter() { return getParameterList().getNumChild(); } /** * Retrieves the number of children in the Parameter list. * Calling this method will not trigger rewrites.. * @return Number of children in the Parameter list. * @apilevel low-level * @ast method * */ public int getNumParameterNoTransform() { return getParameterListNoTransform().getNumChildNoTransform(); } /** * Retrieves the element at index {@code i} in the Parameter list.. * @param i Index of the element to return. * @return The element at position {@code i} in the Parameter list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public ParameterDeclaration getParameter(int i) { return (ParameterDeclaration)getParameterList().getChild(i); } /** * Append an element to the Parameter list. * @param node The element to append to the Parameter list. * @apilevel high-level * @ast method * */ public void addParameter(ParameterDeclaration node) { List<ParameterDeclaration> list = (parent == null || state == null) ? getParameterListNoTransform() : getParameterList(); list.addChild(node); } /** * @apilevel low-level * @ast method * */ public void addParameterNoTransform(ParameterDeclaration node) { List<ParameterDeclaration> list = getParameterListNoTransform(); list.addChild(node); } /** * Replaces the Parameter list element at index {@code i} with the new node {@code node}. * @param node The new node to replace the old list element. * @param i The list index of the node to be replaced. * @apilevel high-level * @ast method * */ public void setParameter(ParameterDeclaration node, int i) { List<ParameterDeclaration> list = getParameterList(); list.setChild(node, i); } /** * Retrieves the Parameter list. * @return The node representing the Parameter list. * @apilevel high-level * @ast method * */ public List<ParameterDeclaration> getParameters() { return getParameterList(); } /** * Retrieves the Parameter list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the Parameter list. * @apilevel low-level * @ast method * */ public List<ParameterDeclaration> getParametersNoTransform() { return getParameterListNoTransform(); } /** * Retrieves the Parameter list. * @return The node representing the Parameter list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<ParameterDeclaration> getParameterList() { List<ParameterDeclaration> list = (List<ParameterDeclaration>)getChild(2); list.getNumChild(); return list; } /** * Retrieves the Parameter list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the Parameter list. * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<ParameterDeclaration> getParameterListNoTransform() { return (List<ParameterDeclaration>)getChildNoTransform(2); } /** * Replaces the Exception list. * @param list The new list node to be used as the Exception list. * @apilevel high-level * @ast method * */ public void setExceptionList(List<Access> list) { setChild(list, 3); } /** * Retrieves the number of children in the Exception list. * @return Number of children in the Exception list. * @apilevel high-level * @ast method * */ public int getNumException() { return getExceptionList().getNumChild(); } /** * Retrieves the number of children in the Exception list. * Calling this method will not trigger rewrites.. * @return Number of children in the Exception list. * @apilevel low-level * @ast method * */ public int getNumExceptionNoTransform() { return getExceptionListNoTransform().getNumChildNoTransform(); } /** * Retrieves the element at index {@code i} in the Exception list.. * @param i Index of the element to return. * @return The element at position {@code i} in the Exception list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public Access getException(int i) { return (Access)getExceptionList().getChild(i); } /** * Append an element to the Exception list. * @param node The element to append to the Exception list. * @apilevel high-level * @ast method * */ public void addException(Access node) { List<Access> list = (parent == null || state == null) ? getExceptionListNoTransform() : getExceptionList(); list.addChild(node); } /** * @apilevel low-level * @ast method * */ public void addExceptionNoTransform(Access node) { List<Access> list = getExceptionListNoTransform(); list.addChild(node); } /** * Replaces the Exception list element at index {@code i} with the new node {@code node}. * @param node The new node to replace the old list element. * @param i The list index of the node to be replaced. * @apilevel high-level * @ast method * */ public void setException(Access node, int i) { List<Access> list = getExceptionList(); list.setChild(node, i); } /** * Retrieves the Exception list. * @return The node representing the Exception list. * @apilevel high-level * @ast method * */ public List<Access> getExceptions() { return getExceptionList(); } /** * Retrieves the Exception list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the Exception list. * @apilevel low-level * @ast method * */ public List<Access> getExceptionsNoTransform() { return getExceptionListNoTransform(); } /** * Retrieves the Exception list. * @return The node representing the Exception list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<Access> getExceptionList() { List<Access> list = (List<Access>)getChild(3); list.getNumChild(); return list; } /** * Retrieves the Exception list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the Exception list. * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<Access> getExceptionListNoTransform() { return (List<Access>)getChildNoTransform(3); } /** * Replaces the optional node for the Block child. This is the {@code Opt} node containing the child Block, not the actual child! * @param opt The new node to be used as the optional node for the Block child. * @apilevel low-level * @ast method * */ public void setBlockOpt(Opt<Block> opt) { setChild(opt, 4); } /** * Check whether the optional Block child exists. * @return {@code true} if the optional Block child exists, {@code false} if it does not. * @apilevel high-level * @ast method * */ public boolean hasBlock() { return getBlockOpt().getNumChild() != 0; } /** * Retrieves the (optional) Block child. * @return The Block child, if it exists. Returns {@code null} otherwise. * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public Block getBlock() { return (Block)getBlockOpt().getChild(0); } /** * Replaces the (optional) Block child. * @param node The new node to be used as the Block child. * @apilevel high-level * @ast method * */ public void setBlock(Block node) { getBlockOpt().setChild(node, 0); } /** * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public Opt<Block> getBlockOpt() { return (Opt<Block>)getChild(4); } /** * Retrieves the optional node for child Block. This is the {@code Opt} node containing the child Block, not the actual child! * <p><em>This method does not invoke AST transformations.</em></p> * @return The optional node for child Block. * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public Opt<Block> getBlockOptNoTransform() { return (Opt<Block>)getChildNoTransform(4); } /** * Replaces the TypeParameter list. * @param list The new list node to be used as the TypeParameter list. * @apilevel high-level * @ast method * */ public void setTypeParameterList(List<TypeVariable> list) { setChild(list, 5); } /** * Retrieves the number of children in the TypeParameter list. * @return Number of children in the TypeParameter list. * @apilevel high-level * @ast method * */ public int getNumTypeParameter() { return getTypeParameterList().getNumChild(); } /** * Retrieves the number of children in the TypeParameter list. * Calling this method will not trigger rewrites.. * @return Number of children in the TypeParameter list. * @apilevel low-level * @ast method * */ public int getNumTypeParameterNoTransform() { return getTypeParameterListNoTransform().getNumChildNoTransform(); } /** * Retrieves the element at index {@code i} in the TypeParameter list.. * @param i Index of the element to return. * @return The element at position {@code i} in the TypeParameter list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public TypeVariable getTypeParameter(int i) { return (TypeVariable)getTypeParameterList().getChild(i); } /** * Append an element to the TypeParameter list. * @param node The element to append to the TypeParameter list. * @apilevel high-level * @ast method * */ public void addTypeParameter(TypeVariable node) { List<TypeVariable> list = (parent == null || state == null) ? getTypeParameterListNoTransform() : getTypeParameterList(); list.addChild(node); } /** * @apilevel low-level * @ast method * */ public void addTypeParameterNoTransform(TypeVariable node) { List<TypeVariable> list = getTypeParameterListNoTransform(); list.addChild(node); } /** * Replaces the TypeParameter list element at index {@code i} with the new node {@code node}. * @param node The new node to replace the old list element. * @param i The list index of the node to be replaced. * @apilevel high-level * @ast method * */ public void setTypeParameter(TypeVariable node, int i) { List<TypeVariable> list = getTypeParameterList(); list.setChild(node, i); } /** * Retrieves the TypeParameter list. * @return The node representing the TypeParameter list. * @apilevel high-level * @ast method * */ public List<TypeVariable> getTypeParameters() { return getTypeParameterList(); } /** * Retrieves the TypeParameter list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the TypeParameter list. * @apilevel low-level * @ast method * */ public List<TypeVariable> getTypeParametersNoTransform() { return getTypeParameterListNoTransform(); } /** * Retrieves the TypeParameter list. * @return The node representing the TypeParameter list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<TypeVariable> getTypeParameterList() { List<TypeVariable> list = (List<TypeVariable>)getChild(5); list.getNumChild(); return list; } /** * Retrieves the TypeParameter list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the TypeParameter list. * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<TypeVariable> getTypeParameterListNoTransform() { return (List<TypeVariable>)getChildNoTransform(5); } /** * @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); } }
20,424
27.289474
161
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/PlusExpr.java
/* This file was generated with JastAdd2 (http://jastadd.org) version R20130212 (r1031) */ package soot.JastAddJ; import java.util.HashSet; 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; /** * @production PlusExpr : {@link Unary}; * @ast node * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/java.ast:140 */ public class PlusExpr extends Unary implements Cloneable { /** * @apilevel low-level */ public void flushCache() { super.flushCache(); type_computed = false; type_value = null; } /** * @apilevel internal */ public void flushCollectionCache() { super.flushCollectionCache(); } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public PlusExpr clone() throws CloneNotSupportedException { PlusExpr node = (PlusExpr)super.clone(); node.type_computed = false; node.type_value = null; node.in$Circle(false); node.is$Final(false); return node; } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public PlusExpr copy() { try { PlusExpr node = (PlusExpr) clone(); node.parent = null; if(children != null) node.children = (ASTNode[]) children.clone(); return node; } catch (CloneNotSupportedException e) { throw new Error("Error: clone not supported for " + getClass().getName()); } } /** * Create a deep copy of the AST subtree at this node. * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level */ @SuppressWarnings({"unchecked", "cast"}) public PlusExpr fullCopy() { PlusExpr tree = (PlusExpr) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) children[i]; if(child != null) { child = child.fullCopy(); tree.setChild(child, i); } } } return tree; } /** * @ast method * @aspect TypeCheck * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeCheck.jrag:269 */ public void typeCheck() { if(!getOperand().type().isNumericType()) error("unary plus only operates on numeric types"); } /** * @ast method * @aspect Expressions * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/Expressions.jrag:695 */ public soot.Value eval(Body b) { return getOperand().eval(b); } /** * @ast method * */ public PlusExpr() { super(); } /** * Initializes the child array to the correct size. * Initializes List and Opt nta children. * @apilevel internal * @ast method * @ast method * */ public void init$Children() { children = new ASTNode[1]; } /** * @ast method * */ public PlusExpr(Expr p0) { setChild(p0, 0); } /** * @apilevel low-level * @ast method * */ protected int numChildren() { return 1; } /** * @apilevel internal * @ast method * */ public boolean mayHaveRewrite() { return false; } /** * Replaces the Operand child. * @param node The new node to replace the Operand child. * @apilevel high-level * @ast method * */ public void setOperand(Expr node) { setChild(node, 0); } /** * Retrieves the Operand child. * @return The current node used as the Operand child. * @apilevel high-level * @ast method * */ public Expr getOperand() { return (Expr)getChild(0); } /** * Retrieves the Operand child. * <p><em>This method does not invoke AST transformations.</em></p> * @return The current node used as the Operand child. * @apilevel low-level * @ast method * */ public Expr getOperandNoTransform() { return (Expr)getChildNoTransform(0); } /** * @attribute syn * @aspect ConstantExpression * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/ConstantExpression.jrag:91 */ public Constant constant() { ASTNode$State state = state(); try { return type().plus(getOperand().constant()); } finally { } } /** * @attribute syn * @aspect ConstantExpression * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/ConstantExpression.jrag:336 */ public boolean isConstant() { ASTNode$State state = state(); try { return getOperand().isConstant(); } finally { } } /** * @attribute syn * @aspect PrettyPrint * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/PrettyPrint.jadd:376 */ public String printPreOp() { ASTNode$State state = state(); try { return "+"; } finally { } } /** * @apilevel internal */ protected boolean type_computed = false; /** * @apilevel internal */ protected TypeDecl type_value; /** * @attribute syn * @aspect TypeAnalysis * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeAnalysis.jrag:315 */ @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; } /** * @apilevel internal */ private TypeDecl type_compute() { return getOperand().type().unaryNumericPromotion(); } /** * @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); } }
6,106
23.724696
113
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/PostDecExpr.java
/* This file was generated with JastAdd2 (http://jastadd.org) version R20130212 (r1031) */ package soot.JastAddJ; import java.util.HashSet; 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; /** * @production PostDecExpr : {@link PostfixExpr}; * @ast node * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/java.ast:148 */ public class PostDecExpr extends PostfixExpr implements Cloneable { /** * @apilevel low-level */ public void flushCache() { super.flushCache(); } /** * @apilevel internal */ public void flushCollectionCache() { super.flushCollectionCache(); } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public PostDecExpr clone() throws CloneNotSupportedException { PostDecExpr node = (PostDecExpr)super.clone(); node.in$Circle(false); node.is$Final(false); return node; } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public PostDecExpr copy() { try { PostDecExpr node = (PostDecExpr) clone(); node.parent = null; if(children != null) node.children = (ASTNode[]) children.clone(); return node; } catch (CloneNotSupportedException e) { throw new Error("Error: clone not supported for " + getClass().getName()); } } /** * Create a deep copy of the AST subtree at this node. * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level */ @SuppressWarnings({"unchecked", "cast"}) public PostDecExpr fullCopy() { PostDecExpr tree = (PostDecExpr) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) children[i]; if(child != null) { child = child.fullCopy(); tree.setChild(child, i); } } } return tree; } /** * @ast method * @aspect Expressions * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/Expressions.jrag:752 */ public soot.Value eval(Body b) { return emitPostfix(b, -1); } /** * @ast method * */ public PostDecExpr() { super(); } /** * Initializes the child array to the correct size. * Initializes List and Opt nta children. * @apilevel internal * @ast method * @ast method * */ public void init$Children() { children = new ASTNode[1]; } /** * @ast method * */ public PostDecExpr(Expr p0) { setChild(p0, 0); } /** * @apilevel low-level * @ast method * */ protected int numChildren() { return 1; } /** * @apilevel internal * @ast method * */ public boolean mayHaveRewrite() { return false; } /** * Replaces the Operand child. * @param node The new node to replace the Operand child. * @apilevel high-level * @ast method * */ public void setOperand(Expr node) { setChild(node, 0); } /** * Retrieves the Operand child. * @return The current node used as the Operand child. * @apilevel high-level * @ast method * */ public Expr getOperand() { return (Expr)getChild(0); } /** * Retrieves the Operand child. * <p><em>This method does not invoke AST transformations.</em></p> * @return The current node used as the Operand child. * @apilevel low-level * @ast method * */ public Expr getOperandNoTransform() { return (Expr)getChildNoTransform(0); } /** * @attribute syn * @aspect PrettyPrint * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/PrettyPrint.jadd:372 */ public String printPostOp() { ASTNode$State state = state(); try { return "--"; } finally { } } /** * @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); } }
4,303
22.519126
113
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/PostIncExpr.java
/* This file was generated with JastAdd2 (http://jastadd.org) version R20130212 (r1031) */ package soot.JastAddJ; import java.util.HashSet; 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; /** * @production PostIncExpr : {@link PostfixExpr}; * @ast node * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/java.ast:147 */ public class PostIncExpr extends PostfixExpr implements Cloneable { /** * @apilevel low-level */ public void flushCache() { super.flushCache(); } /** * @apilevel internal */ public void flushCollectionCache() { super.flushCollectionCache(); } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public PostIncExpr clone() throws CloneNotSupportedException { PostIncExpr node = (PostIncExpr)super.clone(); node.in$Circle(false); node.is$Final(false); return node; } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public PostIncExpr copy() { try { PostIncExpr node = (PostIncExpr) clone(); node.parent = null; if(children != null) node.children = (ASTNode[]) children.clone(); return node; } catch (CloneNotSupportedException e) { throw new Error("Error: clone not supported for " + getClass().getName()); } } /** * Create a deep copy of the AST subtree at this node. * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level */ @SuppressWarnings({"unchecked", "cast"}) public PostIncExpr fullCopy() { PostIncExpr tree = (PostIncExpr) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) children[i]; if(child != null) { child = child.fullCopy(); tree.setChild(child, i); } } } return tree; } /** * @ast method * @aspect Expressions * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/Expressions.jrag:751 */ public soot.Value eval(Body b) { return emitPostfix(b, 1); } /** * @ast method * */ public PostIncExpr() { super(); } /** * Initializes the child array to the correct size. * Initializes List and Opt nta children. * @apilevel internal * @ast method * @ast method * */ public void init$Children() { children = new ASTNode[1]; } /** * @ast method * */ public PostIncExpr(Expr p0) { setChild(p0, 0); } /** * @apilevel low-level * @ast method * */ protected int numChildren() { return 1; } /** * @apilevel internal * @ast method * */ public boolean mayHaveRewrite() { return false; } /** * Replaces the Operand child. * @param node The new node to replace the Operand child. * @apilevel high-level * @ast method * */ public void setOperand(Expr node) { setChild(node, 0); } /** * Retrieves the Operand child. * @return The current node used as the Operand child. * @apilevel high-level * @ast method * */ public Expr getOperand() { return (Expr)getChild(0); } /** * Retrieves the Operand child. * <p><em>This method does not invoke AST transformations.</em></p> * @return The current node used as the Operand child. * @apilevel low-level * @ast method * */ public Expr getOperandNoTransform() { return (Expr)getChildNoTransform(0); } /** * @attribute syn * @aspect PrettyPrint * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/PrettyPrint.jadd:372 */ public String printPostOp() { ASTNode$State state = state(); try { return "++"; } finally { } } /** * @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); } }
4,302
22.513661
113
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/PostfixExpr.java
/* This file was generated with JastAdd2 (http://jastadd.org) version R20130212 (r1031) */ package soot.JastAddJ; import java.util.HashSet; 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; /** * @production PostfixExpr : {@link Unary}; * @ast node * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/java.ast:146 */ public abstract class PostfixExpr extends Unary implements Cloneable { /** * @apilevel low-level */ public void flushCache() { super.flushCache(); } /** * @apilevel internal */ public void flushCollectionCache() { super.flushCollectionCache(); } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public PostfixExpr clone() throws CloneNotSupportedException { PostfixExpr node = (PostfixExpr)super.clone(); node.in$Circle(false); node.is$Final(false); return node; } /** * @ast method * @aspect DefiniteAssignment * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DefiniteAssignment.jrag:63 */ public void definiteAssignment() { if(getOperand().isVariable()) { Variable v = getOperand().varDecl(); if(v != null && v.isFinal()) { error("++ and -- can not be applied to final variable " + v); } } } /** * @ast method * @aspect DA * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DefiniteAssignment.jrag:471 */ protected boolean checkDUeverywhere(Variable v) { if(getOperand().isVariable() && getOperand().varDecl() == v) if(!isDAbefore(v)) return false; return super.checkDUeverywhere(v); } /** * @ast method * @aspect TypeCheck * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeCheck.jrag:293 */ public void typeCheck() { if(!getOperand().isVariable()) error("postfix expressions only work on variables"); else if(!getOperand().type().isNumericType()) error("postfix expressions only operates on numeric types"); } /** * @ast method * */ public PostfixExpr() { super(); } /** * Initializes the child array to the correct size. * Initializes List and Opt nta children. * @apilevel internal * @ast method * @ast method * */ public void init$Children() { children = new ASTNode[1]; } /** * @ast method * */ public PostfixExpr(Expr p0) { setChild(p0, 0); } /** * @apilevel low-level * @ast method * */ protected int numChildren() { return 1; } /** * @apilevel internal * @ast method * */ public boolean mayHaveRewrite() { return false; } /** * Replaces the Operand child. * @param node The new node to replace the Operand child. * @apilevel high-level * @ast method * */ public void setOperand(Expr node) { setChild(node, 0); } /** * Retrieves the Operand child. * @return The current node used as the Operand child. * @apilevel high-level * @ast method * */ public Expr getOperand() { return (Expr)getChild(0); } /** * Retrieves the Operand child. * <p><em>This method does not invoke AST transformations.</em></p> * @return The current node used as the Operand child. * @apilevel low-level * @ast method * */ public Expr getOperandNoTransform() { return (Expr)getChildNoTransform(0); } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DefiniteAssignment.jrag:45 * @apilevel internal */ public boolean Define_boolean_isDest(ASTNode caller, ASTNode child) { if(caller == getOperandNoTransform()) { return true; } else { return getParent().Define_boolean_isDest(this, caller); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DefiniteAssignment.jrag:53 * @apilevel internal */ public boolean Define_boolean_isIncOrDec(ASTNode caller, ASTNode child) { if(caller == getOperandNoTransform()) { return true; } else { return getParent().Define_boolean_isIncOrDec(this, caller); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/SyntacticClassification.jrag:98 * @apilevel internal */ public NameType Define_NameType_nameType(ASTNode caller, ASTNode child) { if(caller == getOperandNoTransform()) { return NameType.EXPRESSION_NAME; } else { return getParent().Define_NameType_nameType(this, caller); } } /** * @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); } }
5,101
24.767677
117
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/PreDecExpr.java
/* This file was generated with JastAdd2 (http://jastadd.org) version R20130212 (r1031) */ package soot.JastAddJ; import java.util.HashSet; 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; /** * @production PreDecExpr : {@link Unary}; * @ast node * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/java.ast:138 */ public class PreDecExpr extends Unary implements Cloneable { /** * @apilevel low-level */ public void flushCache() { super.flushCache(); } /** * @apilevel internal */ public void flushCollectionCache() { super.flushCollectionCache(); } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public PreDecExpr clone() throws CloneNotSupportedException { PreDecExpr node = (PreDecExpr)super.clone(); node.in$Circle(false); node.is$Final(false); return node; } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public PreDecExpr copy() { try { PreDecExpr node = (PreDecExpr) clone(); node.parent = null; if(children != null) node.children = (ASTNode[]) children.clone(); return node; } catch (CloneNotSupportedException e) { throw new Error("Error: clone not supported for " + getClass().getName()); } } /** * Create a deep copy of the AST subtree at this node. * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level */ @SuppressWarnings({"unchecked", "cast"}) public PreDecExpr fullCopy() { PreDecExpr tree = (PreDecExpr) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) children[i]; if(child != null) { child = child.fullCopy(); tree.setChild(child, i); } } } return tree; } /** * @ast method * @aspect DefiniteAssignment * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DefiniteAssignment.jrag:81 */ public void definiteAssignment() { if(getOperand().isVariable()) { Variable v = getOperand().varDecl(); if(v != null && v.isFinal()) { error("++ and -- can not be applied to final variable " + v); } } } /** * @ast method * @aspect DA * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DefiniteAssignment.jrag:483 */ protected boolean checkDUeverywhere(Variable v) { if(getOperand().isVariable() && getOperand().varDecl() == v) if(!isDAbefore(v)) return false; return super.checkDUeverywhere(v); } /** * @ast method * @aspect TypeCheck * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeCheck.jrag:309 */ public void typeCheck() { if(!getOperand().isVariable()) error("prefix decrement expression only work on variables"); else if(!getOperand().type().isNumericType()) error("unary decrement only operates on numeric types"); } /** * @ast method * @aspect Expressions * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/Expressions.jrag:770 */ public soot.Value eval(Body b) { return emitPrefix(b, -1); } /** * @ast method * */ public PreDecExpr() { super(); } /** * Initializes the child array to the correct size. * Initializes List and Opt nta children. * @apilevel internal * @ast method * @ast method * */ public void init$Children() { children = new ASTNode[1]; } /** * @ast method * */ public PreDecExpr(Expr p0) { setChild(p0, 0); } /** * @apilevel low-level * @ast method * */ protected int numChildren() { return 1; } /** * @apilevel internal * @ast method * */ public boolean mayHaveRewrite() { return false; } /** * Replaces the Operand child. * @param node The new node to replace the Operand child. * @apilevel high-level * @ast method * */ public void setOperand(Expr node) { setChild(node, 0); } /** * Retrieves the Operand child. * @return The current node used as the Operand child. * @apilevel high-level * @ast method * */ public Expr getOperand() { return (Expr)getChild(0); } /** * Retrieves the Operand child. * <p><em>This method does not invoke AST transformations.</em></p> * @return The current node used as the Operand child. * @apilevel low-level * @ast method * */ public Expr getOperandNoTransform() { return (Expr)getChildNoTransform(0); } /** * @attribute syn * @aspect PrettyPrint * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/PrettyPrint.jadd:376 */ public String printPreOp() { ASTNode$State state = state(); try { return "--"; } finally { } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DefiniteAssignment.jrag:47 * @apilevel internal */ public boolean Define_boolean_isDest(ASTNode caller, ASTNode child) { if(caller == getOperandNoTransform()) { return true; } else { return getParent().Define_boolean_isDest(this, caller); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DefiniteAssignment.jrag:55 * @apilevel internal */ public boolean Define_boolean_isIncOrDec(ASTNode caller, ASTNode child) { if(caller == getOperandNoTransform()) { return true; } else { return getParent().Define_boolean_isIncOrDec(this, caller); } } /** * @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); } }
6,216
24.904167
113
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/PreIncExpr.java
/* This file was generated with JastAdd2 (http://jastadd.org) version R20130212 (r1031) */ package soot.JastAddJ; import java.util.HashSet; 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; /** * @production PreIncExpr : {@link Unary}; * @ast node * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/java.ast:137 */ public class PreIncExpr extends Unary implements Cloneable { /** * @apilevel low-level */ public void flushCache() { super.flushCache(); } /** * @apilevel internal */ public void flushCollectionCache() { super.flushCollectionCache(); } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public PreIncExpr clone() throws CloneNotSupportedException { PreIncExpr node = (PreIncExpr)super.clone(); node.in$Circle(false); node.is$Final(false); return node; } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public PreIncExpr copy() { try { PreIncExpr node = (PreIncExpr) clone(); node.parent = null; if(children != null) node.children = (ASTNode[]) children.clone(); return node; } catch (CloneNotSupportedException e) { throw new Error("Error: clone not supported for " + getClass().getName()); } } /** * Create a deep copy of the AST subtree at this node. * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level */ @SuppressWarnings({"unchecked", "cast"}) public PreIncExpr fullCopy() { PreIncExpr tree = (PreIncExpr) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) children[i]; if(child != null) { child = child.fullCopy(); tree.setChild(child, i); } } } return tree; } /** * @ast method * @aspect DefiniteAssignment * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DefiniteAssignment.jrag:72 */ public void definiteAssignment() { if(getOperand().isVariable()) { Variable v = getOperand().varDecl(); if(v != null && v.isFinal()) { error("++ and -- can not be applied to final variable " + v); } } } /** * @ast method * @aspect DA * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DefiniteAssignment.jrag:477 */ protected boolean checkDUeverywhere(Variable v) { if(getOperand().isVariable() && getOperand().varDecl() == v) if(!isDAbefore(v)) return false; return super.checkDUeverywhere(v); } /** * @ast method * @aspect TypeCheck * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeCheck.jrag:301 */ public void typeCheck() { if(!getOperand().isVariable()) error("prefix increment expression only work on variables"); else if(!getOperand().type().isNumericType()) error("unary increment only operates on numeric types"); } /** * @ast method * @aspect Expressions * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/Expressions.jrag:769 */ public soot.Value eval(Body b) { return emitPrefix(b, 1); } /** * @ast method * */ public PreIncExpr() { super(); } /** * Initializes the child array to the correct size. * Initializes List and Opt nta children. * @apilevel internal * @ast method * @ast method * */ public void init$Children() { children = new ASTNode[1]; } /** * @ast method * */ public PreIncExpr(Expr p0) { setChild(p0, 0); } /** * @apilevel low-level * @ast method * */ protected int numChildren() { return 1; } /** * @apilevel internal * @ast method * */ public boolean mayHaveRewrite() { return false; } /** * Replaces the Operand child. * @param node The new node to replace the Operand child. * @apilevel high-level * @ast method * */ public void setOperand(Expr node) { setChild(node, 0); } /** * Retrieves the Operand child. * @return The current node used as the Operand child. * @apilevel high-level * @ast method * */ public Expr getOperand() { return (Expr)getChild(0); } /** * Retrieves the Operand child. * <p><em>This method does not invoke AST transformations.</em></p> * @return The current node used as the Operand child. * @apilevel low-level * @ast method * */ public Expr getOperandNoTransform() { return (Expr)getChildNoTransform(0); } /** * @attribute syn * @aspect PrettyPrint * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/PrettyPrint.jadd:376 */ public String printPreOp() { ASTNode$State state = state(); try { return "++"; } finally { } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DefiniteAssignment.jrag:46 * @apilevel internal */ public boolean Define_boolean_isDest(ASTNode caller, ASTNode child) { if(caller == getOperandNoTransform()) { return true; } else { return getParent().Define_boolean_isDest(this, caller); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DefiniteAssignment.jrag:54 * @apilevel internal */ public boolean Define_boolean_isIncOrDec(ASTNode caller, ASTNode child) { if(caller == getOperandNoTransform()) { return true; } else { return getParent().Define_boolean_isIncOrDec(this, caller); } } /** * @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); } }
6,215
24.9
113
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/PrimaryExpr.java
/* This file was generated with JastAdd2 (http://jastadd.org) version R20130212 (r1031) */ package soot.JastAddJ; import java.util.HashSet; 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; /** * @production PrimaryExpr : {@link Expr}; * @ast node * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/java.ast:129 */ public abstract class PrimaryExpr extends Expr implements Cloneable { /** * @apilevel low-level */ public void flushCache() { super.flushCache(); } /** * @apilevel internal */ public void flushCollectionCache() { super.flushCollectionCache(); } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public PrimaryExpr clone() throws CloneNotSupportedException { PrimaryExpr node = (PrimaryExpr)super.clone(); node.in$Circle(false); node.is$Final(false); return node; } /** * @ast method * */ public PrimaryExpr() { super(); } /** * Initializes the child array to the correct size. * Initializes List and Opt nta children. * @apilevel internal * @ast method * @ast method * */ public void init$Children() { } /** * @apilevel low-level * @ast method * */ protected int numChildren() { return 0; } /** * @apilevel internal * @ast method * */ public boolean mayHaveRewrite() { return false; } /** * @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); } }
1,892
19.802198
96
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/PrimitiveCompilationUnit.java
/* This file was generated with JastAdd2 (http://jastadd.org) version R20130212 (r1031) */ package soot.JastAddJ; import java.util.HashSet; 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; /** * @production PrimitiveCompilationUnit : {@link CompilationUnit}; * @ast node * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/java.ast:7 */ public class PrimitiveCompilationUnit extends CompilationUnit implements Cloneable { /** * @apilevel low-level */ public void flushCache() { super.flushCache(); typeBoolean_computed = false; typeBoolean_value = null; typeByte_computed = false; typeByte_value = null; typeShort_computed = false; typeShort_value = null; typeChar_computed = false; typeChar_value = null; typeInt_computed = false; typeInt_value = null; typeLong_computed = false; typeLong_value = null; typeFloat_computed = false; typeFloat_value = null; typeDouble_computed = false; typeDouble_value = null; typeVoid_computed = false; typeVoid_value = null; typeNull_computed = false; typeNull_value = null; unknownType_computed = false; unknownType_value = null; } /** * @apilevel internal */ public void flushCollectionCache() { super.flushCollectionCache(); } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public PrimitiveCompilationUnit clone() throws CloneNotSupportedException { PrimitiveCompilationUnit node = (PrimitiveCompilationUnit)super.clone(); node.typeBoolean_computed = false; node.typeBoolean_value = null; node.typeByte_computed = false; node.typeByte_value = null; node.typeShort_computed = false; node.typeShort_value = null; node.typeChar_computed = false; node.typeChar_value = null; node.typeInt_computed = false; node.typeInt_value = null; node.typeLong_computed = false; node.typeLong_value = null; node.typeFloat_computed = false; node.typeFloat_value = null; node.typeDouble_computed = false; node.typeDouble_value = null; node.typeVoid_computed = false; node.typeVoid_value = null; node.typeNull_computed = false; node.typeNull_value = null; node.unknownType_computed = false; node.unknownType_value = null; node.in$Circle(false); node.is$Final(false); return node; } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public PrimitiveCompilationUnit copy() { try { PrimitiveCompilationUnit node = (PrimitiveCompilationUnit) clone(); node.parent = null; if(children != null) node.children = (ASTNode[]) children.clone(); return node; } catch (CloneNotSupportedException e) { throw new Error("Error: clone not supported for " + getClass().getName()); } } /** * Create a deep copy of the AST subtree at this node. * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level */ @SuppressWarnings({"unchecked", "cast"}) public PrimitiveCompilationUnit fullCopy() { PrimitiveCompilationUnit tree = (PrimitiveCompilationUnit) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) children[i]; if(child != null) { child = child.fullCopy(); tree.setChild(child, i); } } } return tree; } /** * @ast method * */ public PrimitiveCompilationUnit() { super(); } /** * Initializes the child array to the correct size. * Initializes List and Opt nta children. * @apilevel internal * @ast method * @ast method * */ public void init$Children() { children = new ASTNode[2]; setChild(new List(), 0); setChild(new List(), 1); } /** * @ast method * */ public PrimitiveCompilationUnit(java.lang.String p0, List<ImportDecl> p1, List<TypeDecl> p2) { setPackageDecl(p0); setChild(p1, 0); setChild(p2, 1); } /** * @ast method * */ public PrimitiveCompilationUnit(beaver.Symbol p0, List<ImportDecl> p1, List<TypeDecl> p2) { setPackageDecl(p0); setChild(p1, 0); setChild(p2, 1); } /** * @apilevel low-level * @ast method * */ protected int numChildren() { return 2; } /** * @apilevel internal * @ast method * */ public boolean mayHaveRewrite() { return false; } /** * Replaces the lexeme PackageDecl. * @param value The new value for the lexeme PackageDecl. * @apilevel high-level * @ast method * */ public void setPackageDecl(java.lang.String value) { tokenjava_lang_String_PackageDecl = value; } /** * JastAdd-internal setter for lexeme PackageDecl using the Beaver parser. * @apilevel internal * @ast method * */ public void setPackageDecl(beaver.Symbol symbol) { if(symbol.value != null && !(symbol.value instanceof String)) throw new UnsupportedOperationException("setPackageDecl is only valid for String lexemes"); tokenjava_lang_String_PackageDecl = (String)symbol.value; PackageDeclstart = symbol.getStart(); PackageDeclend = symbol.getEnd(); } /** * Retrieves the value for the lexeme PackageDecl. * @return The value for the lexeme PackageDecl. * @apilevel high-level * @ast method * */ public java.lang.String getPackageDecl() { return tokenjava_lang_String_PackageDecl != null ? tokenjava_lang_String_PackageDecl : ""; } /** * Replaces the ImportDecl list. * @param list The new list node to be used as the ImportDecl list. * @apilevel high-level * @ast method * */ public void setImportDeclList(List<ImportDecl> list) { setChild(list, 0); } /** * Retrieves the number of children in the ImportDecl list. * @return Number of children in the ImportDecl list. * @apilevel high-level * @ast method * */ public int getNumImportDecl() { return getImportDeclList().getNumChild(); } /** * Retrieves the number of children in the ImportDecl list. * Calling this method will not trigger rewrites.. * @return Number of children in the ImportDecl list. * @apilevel low-level * @ast method * */ public int getNumImportDeclNoTransform() { return getImportDeclListNoTransform().getNumChildNoTransform(); } /** * Retrieves the element at index {@code i} in the ImportDecl list.. * @param i Index of the element to return. * @return The element at position {@code i} in the ImportDecl list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public ImportDecl getImportDecl(int i) { return (ImportDecl)getImportDeclList().getChild(i); } /** * Append an element to the ImportDecl list. * @param node The element to append to the ImportDecl list. * @apilevel high-level * @ast method * */ public void addImportDecl(ImportDecl node) { List<ImportDecl> list = (parent == null || state == null) ? getImportDeclListNoTransform() : getImportDeclList(); list.addChild(node); } /** * @apilevel low-level * @ast method * */ public void addImportDeclNoTransform(ImportDecl node) { List<ImportDecl> list = getImportDeclListNoTransform(); list.addChild(node); } /** * Replaces the ImportDecl list element at index {@code i} with the new node {@code node}. * @param node The new node to replace the old list element. * @param i The list index of the node to be replaced. * @apilevel high-level * @ast method * */ public void setImportDecl(ImportDecl node, int i) { List<ImportDecl> list = getImportDeclList(); list.setChild(node, i); } /** * Retrieves the ImportDecl list. * @return The node representing the ImportDecl list. * @apilevel high-level * @ast method * */ public List<ImportDecl> getImportDecls() { return getImportDeclList(); } /** * Retrieves the ImportDecl list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the ImportDecl list. * @apilevel low-level * @ast method * */ public List<ImportDecl> getImportDeclsNoTransform() { return getImportDeclListNoTransform(); } /** * Retrieves the ImportDecl list. * @return The node representing the ImportDecl list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<ImportDecl> getImportDeclList() { List<ImportDecl> list = (List<ImportDecl>)getChild(0); list.getNumChild(); return list; } /** * Retrieves the ImportDecl list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the ImportDecl list. * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<ImportDecl> getImportDeclListNoTransform() { return (List<ImportDecl>)getChildNoTransform(0); } /** * Replaces the TypeDecl list. * @param list The new list node to be used as the TypeDecl list. * @apilevel high-level * @ast method * */ public void setTypeDeclList(List<TypeDecl> list) { setChild(list, 1); } /** * Retrieves the number of children in the TypeDecl list. * @return Number of children in the TypeDecl list. * @apilevel high-level * @ast method * */ public int getNumTypeDecl() { return getTypeDeclList().getNumChild(); } /** * Retrieves the number of children in the TypeDecl list. * Calling this method will not trigger rewrites.. * @return Number of children in the TypeDecl list. * @apilevel low-level * @ast method * */ public int getNumTypeDeclNoTransform() { return getTypeDeclListNoTransform().getNumChildNoTransform(); } /** * Retrieves the element at index {@code i} in the TypeDecl list.. * @param i Index of the element to return. * @return The element at position {@code i} in the TypeDecl list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public TypeDecl getTypeDecl(int i) { return (TypeDecl)getTypeDeclList().getChild(i); } /** * Append an element to the TypeDecl list. * @param node The element to append to the TypeDecl list. * @apilevel high-level * @ast method * */ public void addTypeDecl(TypeDecl node) { List<TypeDecl> list = (parent == null || state == null) ? getTypeDeclListNoTransform() : getTypeDeclList(); list.addChild(node); } /** * @apilevel low-level * @ast method * */ public void addTypeDeclNoTransform(TypeDecl node) { List<TypeDecl> list = getTypeDeclListNoTransform(); list.addChild(node); } /** * Replaces the TypeDecl list element at index {@code i} with the new node {@code node}. * @param node The new node to replace the old list element. * @param i The list index of the node to be replaced. * @apilevel high-level * @ast method * */ public void setTypeDecl(TypeDecl node, int i) { List<TypeDecl> list = getTypeDeclList(); list.setChild(node, i); } /** * Retrieves the TypeDecl list. * @return The node representing the TypeDecl list. * @apilevel high-level * @ast method * */ public List<TypeDecl> getTypeDecls() { return getTypeDeclList(); } /** * Retrieves the TypeDecl list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the TypeDecl list. * @apilevel low-level * @ast method * */ public List<TypeDecl> getTypeDeclsNoTransform() { return getTypeDeclListNoTransform(); } /** * Retrieves the TypeDecl list. * @return The node representing the TypeDecl list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<TypeDecl> getTypeDeclList() { List<TypeDecl> list = (List<TypeDecl>)getChild(1); list.getNumChild(); return list; } /** * Retrieves the TypeDecl list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the TypeDecl list. * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<TypeDecl> getTypeDeclListNoTransform() { return (List<TypeDecl>)getChildNoTransform(1); } /** * @apilevel internal */ protected boolean typeBoolean_computed = false; /** * @apilevel internal */ protected TypeDecl typeBoolean_value; /* ES: Replacing this with a create method used in type lookup the first time a primitive type is requested private boolean Program.initPrimTypes = false; public void Program.addPrimitiveTypes() { if(!initPrimTypes) { initPrimTypes = true; CompilationUnit u = new CompilationUnit(); u.setPackageDecl(PRIMITIVE_PACKAGE_NAME); addCompilationUnit(u); TypeDecl classDecl = generateUnknownType(); u.addTypeDecl(classDecl); TypeDecl unknown = classDecl; classDecl = generatePrimitiveType(new BooleanType(), "boolean", unknown); u.addTypeDecl(classDecl); classDecl = generatePrimitiveType(new DoubleType(), "double", unknown); u.addTypeDecl(classDecl); classDecl = generatePrimitiveType(new FloatType(), "float", classDecl); u.addTypeDecl(classDecl); classDecl = generatePrimitiveType(new LongType(), "long", classDecl); u.addTypeDecl(classDecl); classDecl = generatePrimitiveType(new IntType(), "int", classDecl); u.addTypeDecl(classDecl); TypeDecl intDecl = classDecl; classDecl = generatePrimitiveType(new ShortType(), "short", classDecl); u.addTypeDecl(classDecl); classDecl = generatePrimitiveType(new ByteType(), "byte", classDecl); u.addTypeDecl(classDecl); classDecl = generatePrimitiveType(new CharType(), "char", intDecl); u.addTypeDecl(classDecl); classDecl = new NullType(); classDecl.setModifiers(new Modifiers(new List().add(new Modifier("public")))); classDecl.setID("null"); u.addTypeDecl(classDecl); classDecl = new VoidType(); classDecl.setModifiers(new Modifiers(new List().add(new Modifier("public")))); classDecl.setID("void"); u.addTypeDecl(classDecl); } } public TypeDecl Program.generatePrimitiveType(PrimitiveType type, String name, TypeDecl superType) { type.setModifiers(new Modifiers(new List().add(new Modifier("public")))); type.setID(name); if(superType != null) type.setSuperClassAccess(superType.createQualifiedAccess()); return type; } private TypeDecl Program.generateUnknownType() { ClassDecl classDecl = new UnknownType(); classDecl.setModifiers(new Modifiers(new List().add(new Modifier("public")))); classDecl.setID("Unknown"); MethodDecl methodDecl = new MethodDecl( new Modifiers(new List().add( new Modifier("public") )), new PrimitiveTypeAccess("Unknown"), "unknown", new List(), new List(), new Opt() ); classDecl.addBodyDecl(methodDecl); FieldDeclaration fieldDecl = new FieldDeclaration( new Modifiers(new List().add( new Modifier("public") )), new PrimitiveTypeAccess("Unknown"), "unknown", new Opt() ); classDecl.addBodyDecl(fieldDecl); ConstructorDecl constrDecl = new ConstructorDecl( new Modifiers(new List().add(new Modifier("public"))), "Unknown", new List(), new List(), new Opt(), new Block() ); classDecl.addBodyDecl(constrDecl); return classDecl; } * @attribute syn * @aspect PrimitiveTypes * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/PrimitiveTypes.jrag:113 */ @SuppressWarnings({"unchecked", "cast"}) public TypeDecl typeBoolean() { if(typeBoolean_computed) { return typeBoolean_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); typeBoolean_value = typeBoolean_compute(); typeBoolean_value.setParent(this); typeBoolean_value.is$Final = true; if(true) typeBoolean_computed = true; return typeBoolean_value; } /** * @apilevel internal */ private TypeDecl typeBoolean_compute() { BooleanType type = new BooleanType(); type.setModifiers(new Modifiers(new List().add(new Modifier("public")))); type.setID("boolean"); type.setSuperClassAccess(unknownType().createQualifiedAccess()); return type; } /** * @apilevel internal */ protected boolean typeByte_computed = false; /** * @apilevel internal */ protected TypeDecl typeByte_value; /** * @attribute syn * @aspect PrimitiveTypes * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/PrimitiveTypes.jrag:120 */ @SuppressWarnings({"unchecked", "cast"}) public TypeDecl typeByte() { if(typeByte_computed) { return typeByte_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); typeByte_value = typeByte_compute(); typeByte_value.setParent(this); typeByte_value.is$Final = true; if(true) typeByte_computed = true; return typeByte_value; } /** * @apilevel internal */ private TypeDecl typeByte_compute() { ByteType type = new ByteType(); type.setModifiers(new Modifiers(new List().add(new Modifier("public")))); type.setID("byte"); type.setSuperClassAccess(typeShort().createQualifiedAccess()); return type; } /** * @apilevel internal */ protected boolean typeShort_computed = false; /** * @apilevel internal */ protected TypeDecl typeShort_value; /** * @attribute syn * @aspect PrimitiveTypes * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/PrimitiveTypes.jrag:127 */ @SuppressWarnings({"unchecked", "cast"}) public TypeDecl typeShort() { if(typeShort_computed) { return typeShort_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); typeShort_value = typeShort_compute(); typeShort_value.setParent(this); typeShort_value.is$Final = true; if(true) typeShort_computed = true; return typeShort_value; } /** * @apilevel internal */ private TypeDecl typeShort_compute() { ShortType type = new ShortType(); type.setModifiers(new Modifiers(new List().add(new Modifier("public")))); type.setID("short"); type.setSuperClassAccess(typeInt().createQualifiedAccess()); return type; } /** * @apilevel internal */ protected boolean typeChar_computed = false; /** * @apilevel internal */ protected TypeDecl typeChar_value; /** * @attribute syn * @aspect PrimitiveTypes * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/PrimitiveTypes.jrag:134 */ @SuppressWarnings({"unchecked", "cast"}) public TypeDecl typeChar() { if(typeChar_computed) { return typeChar_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); typeChar_value = typeChar_compute(); typeChar_value.setParent(this); typeChar_value.is$Final = true; if(true) typeChar_computed = true; return typeChar_value; } /** * @apilevel internal */ private TypeDecl typeChar_compute() { CharType type = new CharType(); type.setModifiers(new Modifiers(new List().add(new Modifier("public")))); type.setID("char"); type.setSuperClassAccess(typeInt().createQualifiedAccess()); return type; } /** * @apilevel internal */ protected boolean typeInt_computed = false; /** * @apilevel internal */ protected TypeDecl typeInt_value; /** * @attribute syn * @aspect PrimitiveTypes * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/PrimitiveTypes.jrag:141 */ @SuppressWarnings({"unchecked", "cast"}) public TypeDecl typeInt() { if(typeInt_computed) { return typeInt_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); typeInt_value = typeInt_compute(); typeInt_value.setParent(this); typeInt_value.is$Final = true; if(true) typeInt_computed = true; return typeInt_value; } /** * @apilevel internal */ private TypeDecl typeInt_compute() { IntType type = new IntType(); type.setModifiers(new Modifiers(new List().add(new Modifier("public")))); type.setID("int"); type.setSuperClassAccess(typeLong().createQualifiedAccess()); return type; } /** * @apilevel internal */ protected boolean typeLong_computed = false; /** * @apilevel internal */ protected TypeDecl typeLong_value; /** * @attribute syn * @aspect PrimitiveTypes * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/PrimitiveTypes.jrag:148 */ @SuppressWarnings({"unchecked", "cast"}) public TypeDecl typeLong() { if(typeLong_computed) { return typeLong_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); typeLong_value = typeLong_compute(); typeLong_value.setParent(this); typeLong_value.is$Final = true; if(true) typeLong_computed = true; return typeLong_value; } /** * @apilevel internal */ private TypeDecl typeLong_compute() { LongType type = new LongType(); type.setModifiers(new Modifiers(new List().add(new Modifier("public")))); type.setID("long"); // Float doesn't seem right here, keeping it because the old code does this type.setSuperClassAccess(typeFloat().createQualifiedAccess()); return type; } /** * @apilevel internal */ protected boolean typeFloat_computed = false; /** * @apilevel internal */ protected TypeDecl typeFloat_value; /** * @attribute syn * @aspect PrimitiveTypes * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/PrimitiveTypes.jrag:156 */ @SuppressWarnings({"unchecked", "cast"}) public TypeDecl typeFloat() { if(typeFloat_computed) { return typeFloat_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); typeFloat_value = typeFloat_compute(); typeFloat_value.setParent(this); typeFloat_value.is$Final = true; if(true) typeFloat_computed = true; return typeFloat_value; } /** * @apilevel internal */ private TypeDecl typeFloat_compute() { FloatType type = new FloatType(); type.setModifiers(new Modifiers(new List().add(new Modifier("public")))); type.setID("float"); type.setSuperClassAccess(typeDouble().createQualifiedAccess()); return type; } /** * @apilevel internal */ protected boolean typeDouble_computed = false; /** * @apilevel internal */ protected TypeDecl typeDouble_value; /** * @attribute syn * @aspect PrimitiveTypes * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/PrimitiveTypes.jrag:163 */ @SuppressWarnings({"unchecked", "cast"}) public TypeDecl typeDouble() { if(typeDouble_computed) { return typeDouble_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); typeDouble_value = typeDouble_compute(); typeDouble_value.setParent(this); typeDouble_value.is$Final = true; if(true) typeDouble_computed = true; return typeDouble_value; } /** * @apilevel internal */ private TypeDecl typeDouble_compute() { DoubleType type = new DoubleType(); type.setModifiers(new Modifiers(new List().add(new Modifier("public")))); type.setID("double"); type.setSuperClassAccess(unknownType().createQualifiedAccess()); return type; } /** * @apilevel internal */ protected boolean typeVoid_computed = false; /** * @apilevel internal */ protected TypeDecl typeVoid_value; /** * @attribute syn * @aspect PrimitiveTypes * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/PrimitiveTypes.jrag:170 */ @SuppressWarnings({"unchecked", "cast"}) public TypeDecl typeVoid() { if(typeVoid_computed) { return typeVoid_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); typeVoid_value = typeVoid_compute(); typeVoid_value.setParent(this); typeVoid_value.is$Final = true; if(true) typeVoid_computed = true; return typeVoid_value; } /** * @apilevel internal */ private TypeDecl typeVoid_compute() { VoidType classDecl = new VoidType(); classDecl.setModifiers(new Modifiers(new List().add(new Modifier("public")))); classDecl.setID("void"); return classDecl; } /** * @apilevel internal */ protected boolean typeNull_computed = false; /** * @apilevel internal */ protected TypeDecl typeNull_value; /** * @attribute syn * @aspect PrimitiveTypes * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/PrimitiveTypes.jrag:176 */ @SuppressWarnings({"unchecked", "cast"}) public TypeDecl typeNull() { if(typeNull_computed) { return typeNull_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); typeNull_value = typeNull_compute(); typeNull_value.setParent(this); typeNull_value.is$Final = true; if(true) typeNull_computed = true; return typeNull_value; } /** * @apilevel internal */ private TypeDecl typeNull_compute() { NullType classDecl = new NullType(); classDecl.setModifiers(new Modifiers(new List().add(new Modifier("public")))); classDecl.setID("null"); return classDecl; } /** * @apilevel internal */ protected boolean unknownType_computed = false; /** * @apilevel internal */ protected TypeDecl unknownType_value; /** * @attribute syn * @aspect PrimitiveTypes * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/PrimitiveTypes.jrag:182 */ @SuppressWarnings({"unchecked", "cast"}) public TypeDecl unknownType() { if(unknownType_computed) { return unknownType_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); unknownType_value = unknownType_compute(); unknownType_value.setParent(this); unknownType_value.is$Final = true; if(true) unknownType_computed = true; return unknownType_value; } /** * @apilevel internal */ private TypeDecl unknownType_compute() { ClassDecl classDecl = new UnknownType(); classDecl.setModifiers(new Modifiers(new List().add(new Modifier("public")))); classDecl.setID("Unknown"); MethodDecl methodDecl = new MethodDecl( new Modifiers(new List().add( new Modifier("public") )), new PrimitiveTypeAccess("Unknown"), "unknown", new List(), new List(), new Opt() ); classDecl.addBodyDecl(methodDecl); FieldDeclaration fieldDecl = new FieldDeclaration( new Modifiers(new List().add( new Modifier("public") )), new PrimitiveTypeAccess("Unknown"), "unknown", new Opt() ); classDecl.addBodyDecl(fieldDecl); ConstructorDecl constrDecl = new ConstructorDecl( new Modifiers(new List().add(new Modifier("public"))), "Unknown", new List(), new List(), new Opt(), new Block() ); classDecl.addBodyDecl(constrDecl); return classDecl; } /** * @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); } }
28,707
27.736737
117
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/PrimitiveType.java
/* This file was generated with JastAdd2 (http://jastadd.org) version R20130212 (r1031) */ package soot.JastAddJ; import java.util.HashSet; 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; /** * @production PrimitiveType : {@link TypeDecl} ::= <span class="component">{@link Modifiers}</span> <span class="component">&lt;ID:String&gt;</span> <span class="component">[SuperClassAccess:{@link Access}]</span> <span class="component">{@link BodyDecl}*</span>; * @ast node * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/java.ast:45 */ public class PrimitiveType extends TypeDecl implements Cloneable { /** * @apilevel low-level */ public void flushCache() { super.flushCache(); narrowingConversionTo_TypeDecl_values = null; instanceOf_TypeDecl_values = null; subtype_TypeDecl_values = null; } /** * @apilevel internal */ public void flushCollectionCache() { super.flushCollectionCache(); } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public PrimitiveType clone() throws CloneNotSupportedException { PrimitiveType node = (PrimitiveType)super.clone(); node.narrowingConversionTo_TypeDecl_values = null; node.instanceOf_TypeDecl_values = null; node.subtype_TypeDecl_values = null; node.in$Circle(false); node.is$Final(false); return node; } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public PrimitiveType copy() { try { PrimitiveType node = (PrimitiveType) clone(); node.parent = null; if(children != null) node.children = (ASTNode[]) children.clone(); return node; } catch (CloneNotSupportedException e) { throw new Error("Error: clone not supported for " + getClass().getName()); } } /** * Create a deep copy of the AST subtree at this node. * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level */ @SuppressWarnings({"unchecked", "cast"}) public PrimitiveType fullCopy() { PrimitiveType tree = (PrimitiveType) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) children[i]; if(child != null) { child = child.fullCopy(); tree.setChild(child, i); } } } return tree; } /** * @ast method * @aspect CreateQualifiedAccesses * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/QualifiedNames.jrag:108 */ public Access createQualifiedAccess() { return new PrimitiveTypeAccess(name()); } /** * @ast method * @aspect SuperClasses * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeAnalysis.jrag:608 */ public boolean hasSuperclass() { return !isObject(); } /** * @ast method * */ public PrimitiveType() { super(); } /** * Initializes the child array to the correct size. * Initializes List and Opt nta children. * @apilevel internal * @ast method * @ast method * */ public void init$Children() { children = new ASTNode[3]; setChild(new Opt(), 1); setChild(new List(), 2); } /** * @ast method * */ public PrimitiveType(Modifiers p0, String p1, Opt<Access> p2, List<BodyDecl> p3) { setChild(p0, 0); setID(p1); setChild(p2, 1); setChild(p3, 2); } /** * @ast method * */ public PrimitiveType(Modifiers p0, beaver.Symbol p1, Opt<Access> p2, List<BodyDecl> p3) { setChild(p0, 0); setID(p1); setChild(p2, 1); setChild(p3, 2); } /** * @apilevel low-level * @ast method * */ protected int numChildren() { return 3; } /** * @apilevel internal * @ast method * */ public boolean mayHaveRewrite() { return false; } /** * Replaces the Modifiers child. * @param node The new node to replace the Modifiers child. * @apilevel high-level * @ast method * */ public void setModifiers(Modifiers node) { setChild(node, 0); } /** * Retrieves the Modifiers child. * @return The current node used as the Modifiers child. * @apilevel high-level * @ast method * */ public Modifiers getModifiers() { return (Modifiers)getChild(0); } /** * Retrieves the Modifiers child. * <p><em>This method does not invoke AST transformations.</em></p> * @return The current node used as the Modifiers child. * @apilevel low-level * @ast method * */ public Modifiers getModifiersNoTransform() { return (Modifiers)getChildNoTransform(0); } /** * Replaces the lexeme ID. * @param value The new value for the lexeme ID. * @apilevel high-level * @ast method * */ public void setID(String value) { tokenString_ID = value; } /** * JastAdd-internal setter for lexeme ID using the Beaver parser. * @apilevel internal * @ast method * */ 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(); } /** * Retrieves the value for the lexeme ID. * @return The value for the lexeme ID. * @apilevel high-level * @ast method * */ public String getID() { return tokenString_ID != null ? tokenString_ID : ""; } /** * Replaces the optional node for the SuperClassAccess child. This is the {@code Opt} node containing the child SuperClassAccess, not the actual child! * @param opt The new node to be used as the optional node for the SuperClassAccess child. * @apilevel low-level * @ast method * */ public void setSuperClassAccessOpt(Opt<Access> opt) { setChild(opt, 1); } /** * Check whether the optional SuperClassAccess child exists. * @return {@code true} if the optional SuperClassAccess child exists, {@code false} if it does not. * @apilevel high-level * @ast method * */ public boolean hasSuperClassAccess() { return getSuperClassAccessOpt().getNumChild() != 0; } /** * Retrieves the (optional) SuperClassAccess child. * @return The SuperClassAccess child, if it exists. Returns {@code null} otherwise. * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public Access getSuperClassAccess() { return (Access)getSuperClassAccessOpt().getChild(0); } /** * Replaces the (optional) SuperClassAccess child. * @param node The new node to be used as the SuperClassAccess child. * @apilevel high-level * @ast method * */ public void setSuperClassAccess(Access node) { getSuperClassAccessOpt().setChild(node, 0); } /** * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public Opt<Access> getSuperClassAccessOpt() { return (Opt<Access>)getChild(1); } /** * Retrieves the optional node for child SuperClassAccess. This is the {@code Opt} node containing the child SuperClassAccess, not the actual child! * <p><em>This method does not invoke AST transformations.</em></p> * @return The optional node for child SuperClassAccess. * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public Opt<Access> getSuperClassAccessOptNoTransform() { return (Opt<Access>)getChildNoTransform(1); } /** * Replaces the BodyDecl list. * @param list The new list node to be used as the BodyDecl list. * @apilevel high-level * @ast method * */ public void setBodyDeclList(List<BodyDecl> list) { setChild(list, 2); } /** * Retrieves the number of children in the BodyDecl list. * @return Number of children in the BodyDecl list. * @apilevel high-level * @ast method * */ public int getNumBodyDecl() { return getBodyDeclList().getNumChild(); } /** * Retrieves the number of children in the BodyDecl list. * Calling this method will not trigger rewrites.. * @return Number of children in the BodyDecl list. * @apilevel low-level * @ast method * */ public int getNumBodyDeclNoTransform() { return getBodyDeclListNoTransform().getNumChildNoTransform(); } /** * Retrieves the element at index {@code i} in the BodyDecl list.. * @param i Index of the element to return. * @return The element at position {@code i} in the BodyDecl list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public BodyDecl getBodyDecl(int i) { return (BodyDecl)getBodyDeclList().getChild(i); } /** * Append an element to the BodyDecl list. * @param node The element to append to the BodyDecl list. * @apilevel high-level * @ast method * */ public void addBodyDecl(BodyDecl node) { List<BodyDecl> list = (parent == null || state == null) ? getBodyDeclListNoTransform() : getBodyDeclList(); list.addChild(node); } /** * @apilevel low-level * @ast method * */ public void addBodyDeclNoTransform(BodyDecl node) { List<BodyDecl> list = getBodyDeclListNoTransform(); list.addChild(node); } /** * Replaces the BodyDecl list element at index {@code i} with the new node {@code node}. * @param node The new node to replace the old list element. * @param i The list index of the node to be replaced. * @apilevel high-level * @ast method * */ public void setBodyDecl(BodyDecl node, int i) { List<BodyDecl> list = getBodyDeclList(); list.setChild(node, i); } /** * Retrieves the BodyDecl list. * @return The node representing the BodyDecl list. * @apilevel high-level * @ast method * */ public List<BodyDecl> getBodyDecls() { return getBodyDeclList(); } /** * Retrieves the BodyDecl list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the BodyDecl list. * @apilevel low-level * @ast method * */ public List<BodyDecl> getBodyDeclsNoTransform() { return getBodyDeclListNoTransform(); } /** * Retrieves the BodyDecl list. * @return The node representing the BodyDecl list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<BodyDecl> getBodyDeclList() { List<BodyDecl> list = (List<BodyDecl>)getChild(2); list.getNumChild(); return list; } /** * Retrieves the BodyDecl list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the BodyDecl list. * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<BodyDecl> getBodyDeclListNoTransform() { return (List<BodyDecl>)getChildNoTransform(2); } /** * @attribute syn * @aspect TypeConversion * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeAnalysis.jrag:17 */ public boolean wideningConversionTo(TypeDecl type) { ASTNode$State state = state(); try { return instanceOf(type); } finally { } } protected java.util.Map narrowingConversionTo_TypeDecl_values; /** * @attribute syn * @aspect TypeConversion * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeAnalysis.jrag:27 */ @SuppressWarnings({"unchecked", "cast"}) public boolean narrowingConversionTo(TypeDecl type) { Object _parameters = type; if(narrowingConversionTo_TypeDecl_values == null) narrowingConversionTo_TypeDecl_values = new java.util.HashMap(4); if(narrowingConversionTo_TypeDecl_values.containsKey(_parameters)) { return ((Boolean)narrowingConversionTo_TypeDecl_values.get(_parameters)).booleanValue(); } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); boolean narrowingConversionTo_TypeDecl_value = narrowingConversionTo_compute(type); if(isFinal && num == state().boundariesCrossed) narrowingConversionTo_TypeDecl_values.put(_parameters, Boolean.valueOf(narrowingConversionTo_TypeDecl_value)); return narrowingConversionTo_TypeDecl_value; } /** * @apilevel internal */ private boolean narrowingConversionTo_compute(TypeDecl type) { return type.instanceOf(this); } /** * @attribute syn * @aspect TypeAnalysis * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeAnalysis.jrag:168 */ public boolean isPrimitiveType() { ASTNode$State state = state(); try { return true; } finally { } } /** * @attribute syn * @aspect TypeAnalysis * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeAnalysis.jrag:221 */ public boolean isPrimitive() { ASTNode$State state = state(); try { return true; } finally { } } protected java.util.Map instanceOf_TypeDecl_values; /** * @attribute syn * @aspect GenericsSubtype * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericsSubtype.jrag:390 */ @SuppressWarnings({"unchecked", "cast"}) public boolean instanceOf(TypeDecl type) { Object _parameters = type; if(instanceOf_TypeDecl_values == null) instanceOf_TypeDecl_values = new java.util.HashMap(4); if(instanceOf_TypeDecl_values.containsKey(_parameters)) { return ((Boolean)instanceOf_TypeDecl_values.get(_parameters)).booleanValue(); } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); boolean instanceOf_TypeDecl_value = instanceOf_compute(type); if(isFinal && num == state().boundariesCrossed) instanceOf_TypeDecl_values.put(_parameters, Boolean.valueOf(instanceOf_TypeDecl_value)); return instanceOf_TypeDecl_value; } /** * @apilevel internal */ private boolean instanceOf_compute(TypeDecl type) { return subtype(type); } /** * @attribute syn * @aspect TypeWideningAndIdentity * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeAnalysis.jrag:475 */ public boolean isSupertypeOfPrimitiveType(PrimitiveType type) { ASTNode$State state = state(); try { if(super.isSupertypeOfPrimitiveType(type)) return true; return type.hasSuperclass() && type.superclass().isPrimitive() && type.superclass().instanceOf(this); } finally { } } /** * @attribute syn * @aspect SuperClasses * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeAnalysis.jrag:612 */ public TypeDecl superclass() { ASTNode$State state = state(); try { return getSuperClassAccess().type(); } finally { } } /* It is a compile-time error if the return type of a method declared in an annotation type is any type other than one of the following: one of the primitive types, String, Class and any invocation of Class, an enum type (\ufffd8.9), an annotation type, or an array (\ufffd10) of one of the preceding types.* @attribute syn * @aspect Annotations * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Annotations.jrag:121 */ public boolean isValidAnnotationMethodReturnType() { ASTNode$State state = state(); try { return true; } finally { } } /* NumericTypes, BooleanTypes TypeChecking (ensure that an expression of a certain type is valid in a particular context) TypeComputation (compute the type of an expression) CodeGeneration (output code including implicit type conversions and promotions) NumericTypes: binaryNumericPromotion, unaryNumericPromotion, assignmentConversion, methodInvocationConversion, castingConversion numeric operations that do not use these kinds of conversions and promotions explicitly need to be refined BooleanTypes: assignmentConversion, methodInvocationConversion, castingConversion * @attribute syn * @aspect AutoBoxing * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/AutoBoxing.jrag:31 */ public boolean boxingConversionTo(TypeDecl typeDecl) { ASTNode$State state = state(); try { return boxed() == typeDecl; } finally { } } protected java.util.Map subtype_TypeDecl_values; /** * @attribute syn * @aspect GenericsSubtype * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericsSubtype.jrag:410 */ @SuppressWarnings({"unchecked", "cast"}) public boolean subtype(TypeDecl type) { Object _parameters = type; if(subtype_TypeDecl_values == null) subtype_TypeDecl_values = new java.util.HashMap(4); ASTNode$State.CircularValue _value; if(subtype_TypeDecl_values.containsKey(_parameters)) { Object _o = subtype_TypeDecl_values.get(_parameters); if(!(_o instanceof ASTNode$State.CircularValue)) { return ((Boolean)_o).booleanValue(); } else _value = (ASTNode$State.CircularValue)_o; } else { _value = new ASTNode$State.CircularValue(); subtype_TypeDecl_values.put(_parameters, _value); _value.value = Boolean.valueOf(true); } ASTNode$State state = state(); if (!state.IN_CIRCLE) { state.IN_CIRCLE = true; int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); boolean new_subtype_TypeDecl_value; do { _value.visited = new Integer(state.CIRCLE_INDEX); state.CHANGE = false; new_subtype_TypeDecl_value = subtype_compute(type); if (new_subtype_TypeDecl_value!=((Boolean)_value.value).booleanValue()) { state.CHANGE = true; _value.value = Boolean.valueOf(new_subtype_TypeDecl_value); } state.CIRCLE_INDEX++; } while (state.CHANGE); if(isFinal && num == state().boundariesCrossed) { subtype_TypeDecl_values.put(_parameters, new_subtype_TypeDecl_value); } else { subtype_TypeDecl_values.remove(_parameters); state.RESET_CYCLE = true; subtype_compute(type); state.RESET_CYCLE = false; } state.IN_CIRCLE = false; return new_subtype_TypeDecl_value; } if(!new Integer(state.CIRCLE_INDEX).equals(_value.visited)) { _value.visited = new Integer(state.CIRCLE_INDEX); boolean new_subtype_TypeDecl_value = subtype_compute(type); if (state.RESET_CYCLE) { subtype_TypeDecl_values.remove(_parameters); } else if (new_subtype_TypeDecl_value!=((Boolean)_value.value).booleanValue()) { state.CHANGE = true; _value.value = new_subtype_TypeDecl_value; } return new_subtype_TypeDecl_value; } return ((Boolean)_value.value).booleanValue(); } /** * @apilevel internal */ private boolean subtype_compute(TypeDecl type) { return type.supertypePrimitiveType(this); } /** * @attribute syn * @aspect GenericsSubtype * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericsSubtype.jrag:472 */ public boolean supertypePrimitiveType(PrimitiveType type) { ASTNode$State state = state(); try { if(super.supertypePrimitiveType(type)) return true; return type.hasSuperclass() && type.superclass().isPrimitive() && type.superclass().subtype(this); } finally { } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeAnalysis.jrag:577 * @apilevel internal */ public TypeDecl Define_TypeDecl_hostType(ASTNode caller, ASTNode child) { if(caller == getSuperClassAccessOptNoTransform()) { return hostType(); } else { return super.Define_TypeDecl_hostType(caller, child); } } /** * @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); } }
20,567
30.353659
264
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/PrimitiveTypeAccess.java
/* This file was generated with JastAdd2 (http://jastadd.org) version R20130212 (r1031) */ package soot.JastAddJ; import java.util.HashSet; 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; /** * @production PrimitiveTypeAccess : {@link TypeAccess} ::= <span class="component">&lt;Package:String&gt;</span> <span class="component">&lt;ID:String&gt;</span> <span class="component">&lt;Name:String&gt;</span>; * @ast node * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/java.ast:24 */ public class PrimitiveTypeAccess extends TypeAccess implements Cloneable { /** * @apilevel low-level */ public void flushCache() { super.flushCache(); decls_computed = false; decls_value = null; getPackage_computed = false; getPackage_value = null; getID_computed = false; getID_value = null; } /** * @apilevel internal */ public void flushCollectionCache() { super.flushCollectionCache(); } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public PrimitiveTypeAccess clone() throws CloneNotSupportedException { PrimitiveTypeAccess node = (PrimitiveTypeAccess)super.clone(); node.decls_computed = false; node.decls_value = null; node.getPackage_computed = false; node.getPackage_value = null; node.getID_computed = false; node.getID_value = null; node.in$Circle(false); node.is$Final(false); return node; } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public PrimitiveTypeAccess copy() { try { PrimitiveTypeAccess node = (PrimitiveTypeAccess) clone(); node.parent = null; if(children != null) node.children = (ASTNode[]) children.clone(); return node; } catch (CloneNotSupportedException e) { throw new Error("Error: clone not supported for " + getClass().getName()); } } /** * Create a deep copy of the AST subtree at this node. * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level */ @SuppressWarnings({"unchecked", "cast"}) public PrimitiveTypeAccess fullCopy() { PrimitiveTypeAccess tree = (PrimitiveTypeAccess) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) children[i]; if(child != null) { child = child.fullCopy(); tree.setChild(child, i); } } } return tree; } /** * @ast method * */ public PrimitiveTypeAccess() { super(); } /** * Initializes the child array to the correct size. * Initializes List and Opt nta children. * @apilevel internal * @ast method * @ast method * */ public void init$Children() { } /** * @ast method * */ public PrimitiveTypeAccess(String p0) { setName(p0); } /** * @ast method * */ public PrimitiveTypeAccess(beaver.Symbol p0) { setName(p0); } /** * @apilevel low-level * @ast method * */ protected int numChildren() { return 0; } /** * @apilevel internal * @ast method * */ public boolean mayHaveRewrite() { return false; } /** * Replaces the lexeme Name. * @param value The new value for the lexeme Name. * @apilevel high-level * @ast method * */ public void setName(String value) { tokenString_Name = value; } /** * @apilevel internal * @ast method * */ /** * @apilevel internal */ protected String tokenString_Name; /** * @ast method * */ public int Namestart; /** * @ast method * */ public int Nameend; /** * JastAdd-internal setter for lexeme Name using the Beaver parser. * @apilevel internal * @ast method * */ public void setName(beaver.Symbol symbol) { if(symbol.value != null && !(symbol.value instanceof String)) throw new UnsupportedOperationException("setName is only valid for String lexemes"); tokenString_Name = (String)symbol.value; Namestart = symbol.getStart(); Nameend = symbol.getEnd(); } /** * Retrieves the value for the lexeme Name. * @return The value for the lexeme Name. * @apilevel high-level * @ast method * */ public String getName() { return tokenString_Name != null ? tokenString_Name : ""; } /** * Replaces the lexeme Package. * @param value The new value for the lexeme Package. * @apilevel high-level * @ast method * */ public void setPackage(String value) { tokenString_Package = value; } /** * @apilevel internal * @ast method * */ /** * @apilevel internal */ protected String tokenString_Package; /** * Replaces the lexeme ID. * @param value The new value for the lexeme ID. * @apilevel high-level * @ast method * */ public void setID(String value) { tokenString_ID = value; } /** * @apilevel internal * @ast method * */ /** * @apilevel internal */ protected String tokenString_ID; /** * @apilevel internal */ protected boolean decls_computed = false; /** * @apilevel internal */ protected SimpleSet decls_value; /** * @attribute syn * @aspect TypeScopePropagation * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupType.jrag:234 */ @SuppressWarnings({"unchecked", "cast"}) public SimpleSet decls() { if(decls_computed) { return decls_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); decls_value = decls_compute(); if(isFinal && num == state().boundariesCrossed) decls_computed = true; return decls_value; } /** * @apilevel internal */ private SimpleSet decls_compute() { return lookupType(PRIMITIVE_PACKAGE_NAME, name()); } /** * @apilevel internal */ protected boolean getPackage_computed = false; /** * @apilevel internal */ protected String getPackage_value; /** * @attribute syn nta * @aspect TypeScopePropagation * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupType.jrag:235 */ @SuppressWarnings({"unchecked", "cast"}) public String getPackage() { if(getPackage_computed) { return getPackage_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); getPackage_value = getPackage_compute(); setPackage(getPackage_value); if(isFinal && num == state().boundariesCrossed) getPackage_computed = true; return getPackage_value; } /** * @apilevel internal */ private String getPackage_compute() { return PRIMITIVE_PACKAGE_NAME; } /** * @apilevel internal */ protected boolean getID_computed = false; /** * @apilevel internal */ protected String getID_value; /** * @attribute syn nta * @aspect TypeScopePropagation * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupType.jrag:236 */ @SuppressWarnings({"unchecked", "cast"}) public String getID() { if(getID_computed) { return getID_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); getID_value = getID_compute(); setID(getID_value); if(isFinal && num == state().boundariesCrossed) getID_computed = true; return getID_value; } /** * @apilevel internal */ private String getID_compute() { return getName(); } /** * @attribute syn * @aspect PrettyPrint * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/PrettyPrint.jadd:800 */ public String dumpString() { ASTNode$State state = state(); try { return getClass().getName() + " [" + getName() + "]"; } finally { } } /** * @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); } }
8,484
23.382184
214
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/Problem.java
package soot.JastAddJ; import java.util.HashSet; 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; /** * @ast class * */ public class Problem extends java.lang.Object implements Comparable { public int compareTo(Object o) { if(o instanceof Problem) { Problem other = (Problem)o; if(!fileName.equals(other.fileName)) return fileName.compareTo(other.fileName); if(line != other.line) return line - other.line; return message.compareTo(other.message); } return 0; } public static class Severity { public static final Severity ERROR = new Severity(); public static final Severity WARNING = new Severity(); private Severity() { } } public static class Kind { public static final Kind OTHER = new Kind(); public static final Kind LEXICAL = new Kind(); public static final Kind SYNTACTIC = new Kind(); public static final Kind SEMANTIC = new Kind(); private Kind() { } } protected int line = -1; public int line() { return line; } protected int column = -1; public int column() { return column; } protected int endLine = -1; public int endLine() { return endLine; } protected int endColumn = -1; public int endColumn() { return endColumn; } protected String fileName; public String fileName() { return fileName; } public void setFileName(String fileName) { this.fileName = fileName; } protected String message; public String message() { return message; } protected Severity severity = Severity.ERROR; public Severity severity() { return severity; } protected Kind kind = Kind.OTHER; public Kind kind() { return kind; } public Problem(String fileName, String message) { this.fileName = fileName; this.message = message; } public Problem(String fileName, String message, int line) { this(fileName, message); this.line = line; } public Problem(String fileName, String message, int line, Severity severity) { this(fileName, message); this.line = line; this.severity = severity; } public Problem(String fileName, String message, int line, int column, Severity severity) { this(fileName, message); this.line = line; this.column = column; this.severity = severity; } public Problem(String fileName, String message, int line, Severity severity, Kind kind) { this(fileName, message); this.line = line; this.kind = kind; this.severity = severity; } public Problem(String fileName, String message, int line, int column, Severity severity, Kind kind) { this(fileName, message); this.line = line; this.column = column; this.kind = kind; this.severity = severity; } public Problem(String fileName, String message, int line, int column, int endLine, int endColumn, Severity severity, Kind kind) { this(fileName, message); this.line = line; this.column = column; this.endLine = endLine; this.endColumn = endColumn; this.kind = kind; this.severity = severity; } public String toString() { String location = ""; if(line != -1 && column != -1) location = line + "," + column + ":"; else if(line != -1) location = line + ":"; String s = ""; if(this.kind == Kind.LEXICAL) s = "Lexical Error: "; else if(this.kind == Kind.SYNTACTIC) s = "Syntactic Error: "; else if(this.kind == Kind.SEMANTIC) s = "Semantic Error: "; return fileName + ":" + location + "\n" + " " + s + message; } }
4,113
21.98324
133
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/Program.java
/* This file was generated with JastAdd2 (http://jastadd.org) version R20130212 (r1031) */ package soot.JastAddJ; import java.io.File; import java.util.*; import java.util.ArrayList; import java.io.*; import java.util.Collection; /** * @production Program : {@link ASTNode} ::= <span class="component">{@link CompilationUnit}*</span>; * @ast node * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/java.ast:1 */ public class Program extends ASTNode<ASTNode> implements Cloneable { /** * @apilevel low-level */ public void flushCache() { super.flushCache(); typeObject_computed = false; typeObject_value = null; typeCloneable_computed = false; typeCloneable_value = null; typeSerializable_computed = false; typeSerializable_value = null; typeBoolean_computed = false; typeBoolean_value = null; typeByte_computed = false; typeByte_value = null; typeShort_computed = false; typeShort_value = null; typeChar_computed = false; typeChar_value = null; typeInt_computed = false; typeInt_value = null; typeLong_computed = false; typeLong_value = null; typeFloat_computed = false; typeFloat_value = null; typeDouble_computed = false; typeDouble_value = null; typeString_computed = false; typeString_value = null; typeVoid_computed = false; typeVoid_value = null; typeNull_computed = false; typeNull_value = null; unknownType_computed = false; unknownType_value = null; hasPackage_String_values = null; lookupType_String_String_values = null; lookupLibType_String_String_values = null; getLibCompilationUnit_String_values = null; getLibCompilationUnit_String_list = null; getPrimitiveCompilationUnit_computed = false; getPrimitiveCompilationUnit_value = null; unknownConstructor_computed = false; unknownConstructor_value = null; wildcards_computed = false; wildcards_value = null; } /** * @apilevel internal */ public void flushCollectionCache() { super.flushCollectionCache(); } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public Program clone() throws CloneNotSupportedException { Program node = (Program)super.clone(); node.typeObject_computed = false; node.typeObject_value = null; node.typeCloneable_computed = false; node.typeCloneable_value = null; node.typeSerializable_computed = false; node.typeSerializable_value = null; node.typeBoolean_computed = false; node.typeBoolean_value = null; node.typeByte_computed = false; node.typeByte_value = null; node.typeShort_computed = false; node.typeShort_value = null; node.typeChar_computed = false; node.typeChar_value = null; node.typeInt_computed = false; node.typeInt_value = null; node.typeLong_computed = false; node.typeLong_value = null; node.typeFloat_computed = false; node.typeFloat_value = null; node.typeDouble_computed = false; node.typeDouble_value = null; node.typeString_computed = false; node.typeString_value = null; node.typeVoid_computed = false; node.typeVoid_value = null; node.typeNull_computed = false; node.typeNull_value = null; node.unknownType_computed = false; node.unknownType_value = null; node.hasPackage_String_values = null; node.lookupType_String_String_values = null; node.lookupLibType_String_String_values = null; node.getLibCompilationUnit_String_values = null; node.getLibCompilationUnit_String_list = null; node.getPrimitiveCompilationUnit_computed = false; node.getPrimitiveCompilationUnit_value = null; node.unknownConstructor_computed = false; node.unknownConstructor_value = null; node.wildcards_computed = false; node.wildcards_value = null; node.in$Circle(false); node.is$Final(false); return node; } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public Program copy() { try { Program node = (Program) clone(); node.parent = null; if(children != null) node.children = (ASTNode[]) children.clone(); return node; } catch (CloneNotSupportedException e) { throw new Error("Error: clone not supported for " + getClass().getName()); } } /** * Create a deep copy of the AST subtree at this node. * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level */ @SuppressWarnings({"unchecked", "cast"}) public Program fullCopy() { Program tree = (Program) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) children[i]; if(child != null) { child = child.fullCopy(); tree.setChild(child, i); } } } return tree; } /** * @ast method * @aspect ClassPath * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/ClassPath.jrag:22 */ protected BytecodeReader bytecodeReader; /** * @ast method * @aspect ClassPath * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/ClassPath.jrag:23 */ public void initBytecodeReader(BytecodeReader r) { bytecodeReader = r; } /** * @ast method * @aspect ClassPath * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/ClassPath.jrag:24 */ protected JavaParser javaParser; /** * @ast method * @aspect ClassPath * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/ClassPath.jrag:25 */ public void initJavaParser(JavaParser p) { javaParser = p; } /** * Add a filename to the list of source files to process. * @return The CompilationUnit representing the source file, * or <code>null</code> if no such file exists * @ast method * @aspect ClassPath * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/ClassPath.jrag:39 */ public CompilationUnit addSourceFile(String name) { return sourceFiles.addSourceFile(name); } /** * @ast method * @aspect ClassPath * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/ClassPath.jrag:44 */ public Iterator compilationUnitIterator() { initPaths(); return new Iterator() { int index = 0; public boolean hasNext() { return index < getNumCompilationUnit() || !sourceFiles.isEmpty(); } public Object next() { if(getNumCompilationUnit() == index) { String typename = (String)sourceFiles.keySet().iterator().next(); CompilationUnit u = getCompilationUnit(typename); if(u != null) { addCompilationUnit(u); getCompilationUnit(getNumCompilationUnit()-1); } else throw new Error("File " + typename + " not found"); } return getCompilationUnit(index++); } public void remove() { throw new UnsupportedOperationException(); } }; } /** * @ast method * @aspect ClassPath * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/ClassPath.jrag:73 */ public InputStream getInputStream(String name) { initPaths(); try { for(Iterator iter = classPath.iterator(); iter.hasNext(); ) { PathPart part = (PathPart)iter.next(); if(part.selectCompilationUnit(name)) return part.getInputStream(); } } catch(IOException e) {} throw new Error("Could not find nested type " + name); } /** * @return <code>true</code> if there is a package with the given name on * the path * @ast method * @aspect ClassPath * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/ClassPath.jrag:143 */ public boolean isPackage(String name) { if(sourceFiles.hasPackage(name)) return true; for(Iterator iter = classPath.iterator(); iter.hasNext(); ) { PathPart part = (PathPart)iter.next(); if(part.hasPackage(name)) return true; } for(Iterator iter = sourcePath.iterator(); iter.hasNext(); ) { PathPart part = (PathPart)iter.next(); if(part.hasPackage(name)) return true; } return false; } /** * @ast method * @aspect ClassPath * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/ClassPath.jrag:173 */ private boolean pathsInitialized = false; /** * @ast method * @aspect ClassPath * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/ClassPath.jrag:174 */ private java.util.ArrayList classPath; /** * @ast method * @aspect ClassPath * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/ClassPath.jrag:175 */ private java.util.ArrayList sourcePath; /** * @ast method * @aspect ClassPath * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/ClassPath.jrag:176 */ private FileNamesPart sourceFiles = new FileNamesPart(this); /** * @ast method * @aspect ClassPath * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/ClassPath.jrag:178 */ public void pushClassPath(String name) { PathPart part = PathPart.createSourcePath(name, this); if(part != null) { sourcePath.add(part); System.out.println("Pushing source path " + name); } else throw new Error("Could not push source path " + name); part = PathPart.createClassPath(name, this); if(part != null) { classPath.add(part); System.out.println("Pushing class path " + name); } } /** * @ast method * @aspect ClassPath * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/ClassPath.jrag:192 */ public void popClassPath() { if(sourcePath.size() > 0) sourcePath.remove(sourcePath.size()-1); if(classPath.size() > 0) classPath.remove(classPath.size()-1); } /** * @ast method * @aspect ClassPath * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/ClassPath.jrag:199 */ public void initPaths() { if(!pathsInitialized) { pathsInitialized = true; //System.err.println("Initializing class paths"); ArrayList classPaths = new ArrayList(); ArrayList sourcePaths = new ArrayList(); String[] bootclasspaths; if(options().hasValueForOption("-bootclasspath")) bootclasspaths = options().getValueForOption("-bootclasspath").split(File.pathSeparator); else bootclasspaths = System.getProperty("sun.boot.class.path").split(File.pathSeparator); for(int i = 0; i < bootclasspaths.length; i++) { classPaths.add(bootclasspaths[i]); //System.err.println("Adding classpath " + bootclasspaths[i]); } String[] extdirs; if(options().hasValueForOption("-extdirs")) extdirs = options().getValueForOption("-extdirs").split(File.pathSeparator); else extdirs = System.getProperty("java.ext.dirs").split(File.pathSeparator); for(int i = 0; i < extdirs.length; i++) { classPaths.add(extdirs[i]); //System.err.println("Adding classpath " + extdirs[i]); } String[] userClasses = null; if(options().hasValueForOption("-classpath")) userClasses = options().getValueForOption("-classpath").split(File.pathSeparator); else if(options().hasValueForOption("-cp")) userClasses = options().getValueForOption("-cp").split(File.pathSeparator); else { userClasses = ".".split(File.pathSeparator); } if(!options().hasValueForOption("-sourcepath")) { for(int i = 0; i < userClasses.length; i++) { classPaths.add(userClasses[i]); sourcePaths.add(userClasses[i]); //System.err.println("Adding classpath/sourcepath " + userClasses[i]); } } else { for(int i = 0; i < userClasses.length; i++) { classPaths.add(userClasses[i]); //System.err.println("Adding classpath " + userClasses[i]); } userClasses = options().getValueForOption("-sourcepath").split(File.pathSeparator); for(int i = 0; i < userClasses.length; i++) { sourcePaths.add(userClasses[i]); //System.err.println("Adding sourcepath " + userClasses[i]); } } classPath = new ArrayList(); sourcePath = new ArrayList(); for(Iterator iter = classPaths.iterator(); iter.hasNext(); ) { String s = (String)iter.next(); PathPart part = PathPart.createClassPath(s, this); if(part != null) { classPath.add(part); //System.out.println("Adding classpath " + s); } else if(options().verbose()) System.out.println("Warning: Could not use " + s + " as class path"); } for(Iterator iter = sourcePaths.iterator(); iter.hasNext(); ) { String s = (String)iter.next(); PathPart part = PathPart.createSourcePath(s, this); if(part != null) { sourcePath.add(part); //System.out.println("Adding sourcepath " + s); } else if(options().verbose()) System.out.println("Warning: Could not use " + s + " as source path"); } } } /** * Add a path part to the library class path. * @ast method * @aspect ClassPath * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/ClassPath.jrag:284 */ public void addClassPath(PathPart pathPart) { classPath.add(pathPart); pathPart.setProgram(this); } /** * Add a path part to the user class path. * @ast method * @aspect ClassPath * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/ClassPath.jrag:292 */ public void addSourcePath(PathPart pathPart) { sourcePath.add(pathPart); pathPart.setProgram(this); } /** * @ast method * @aspect ClassPath * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/ClassPath.jrag:298 */ public void simpleReset() { lookupType_String_String_values = new HashMap(); hasPackage_String_values = new HashMap(); List list = new List(); for(int i = 0; i < getNumCompilationUnit(); i++) { CompilationUnit unit = getCompilationUnit(i); if(!unit.fromSource()) { list.add(unit); } } setCompilationUnitList(list); } /** * @ast method * @aspect ErrorCheck * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/ErrorCheck.jrag:208 */ public void errorCheck(Collection collection) { for(Iterator iter = compilationUnitIterator(); iter.hasNext(); ) { CompilationUnit cu = (CompilationUnit)iter.next(); if(cu.fromSource()) { cu.collectErrors(); collection.addAll(cu.errors); } } } /** * @ast method * @aspect ErrorCheck * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/ErrorCheck.jrag:217 */ public void errorCheck(Collection collection, Collection warn) { for(Iterator iter = compilationUnitIterator(); iter.hasNext(); ) { CompilationUnit cu = (CompilationUnit)iter.next(); if(cu.fromSource()) { cu.collectErrors(); collection.addAll(cu.errors); warn.addAll(cu.warnings); } } } /** * @ast method * @aspect ErrorCheck * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/ErrorCheck.jrag:238 */ public boolean errorCheck() { Collection collection = new LinkedList(); errorCheck(collection); if(collection.isEmpty()) return false; System.out.println("Errors:"); for(Iterator iter = collection.iterator(); iter.hasNext(); ) { String s = (String)iter.next(); System.out.println(s); } return true; } /** * @ast method * @aspect LookupFullyQualifiedTypes * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupType.jrag:101 */ public int classFileReadTime; /** * @ast method * @aspect PrettyPrint * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/PrettyPrint.jadd:23 */ public void toString(StringBuffer s) { for(Iterator iter = compilationUnitIterator(); iter.hasNext(); ) { CompilationUnit cu = (CompilationUnit)iter.next(); if(cu.fromSource()) { cu.toString(s); } } } /** * @ast method * @aspect PrettyPrint * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/PrettyPrint.jadd:821 */ public String dumpTree() { StringBuffer s = new StringBuffer(); for(Iterator iter = compilationUnitIterator(); iter.hasNext(); ) { CompilationUnit cu = (CompilationUnit)iter.next(); if(cu.fromSource()) { s.append(cu.dumpTree()); } } return s.toString(); } /** * @ast method * @aspect EmitJimple * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/EmitJimple.jrag:19 */ public void jimplify1() { for(Iterator iter = compilationUnitIterator(); iter.hasNext(); ) { CompilationUnit u = (CompilationUnit)iter.next(); if(u.fromSource()) u.jimplify1phase1(); } for(Iterator iter = compilationUnitIterator(); iter.hasNext(); ) { CompilationUnit u = (CompilationUnit)iter.next(); if(u.fromSource()) u.jimplify1phase2(); } } /** * @ast method * @aspect EmitJimple * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/EmitJimple.jrag:359 */ public void jimplify2() { for(Iterator iter = compilationUnitIterator(); iter.hasNext(); ) { CompilationUnit u = (CompilationUnit)iter.next(); if(u.fromSource()) u.jimplify2(); } } /** * @ast method * @aspect ClassLoading * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/SootJastAddJ/ClassLoading.jrag:3 */ public static final int SRC_PREC_JAVA = 1; /** * @ast method * @aspect ClassLoading * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/SootJastAddJ/ClassLoading.jrag:4 */ public static final int SRC_PREC_CLASS = 2; /** * @ast method * @aspect ClassLoading * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/SootJastAddJ/ClassLoading.jrag:5 */ public static final int SRC_PREC_ONLY_CLASS = 3; /** * @ast method * @aspect ClassLoading * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/SootJastAddJ/ClassLoading.jrag:7 */ private int srcPrec = 0; /** * @ast method * @aspect ClassLoading * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/SootJastAddJ/ClassLoading.jrag:8 */ public void setSrcPrec(int i) { srcPrec = i; } /** * @ast method * @aspect ClassLoading * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/SootJastAddJ/ClassLoading.jrag:14 */ private HashMap loadedCompilationUnit = new HashMap(); /** * @ast method * @aspect ClassLoading * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/SootJastAddJ/ClassLoading.jrag:15 */ public boolean hasLoadedCompilationUnit(String fileName) { return loadedCompilationUnit.containsKey(fileName); } /** * @ast method * @aspect ClassLoading * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/SootJastAddJ/ClassLoading.jrag:18 */ public CompilationUnit getCachedOrLoadCompilationUnit(String fileName) { if(loadedCompilationUnit.containsKey(fileName)) return (CompilationUnit)loadedCompilationUnit.get(fileName); addSourceFile(fileName); return (CompilationUnit)loadedCompilationUnit.get(fileName); } /** * @ast method * @aspect IncrementalJimple * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/SootJastAddJ/IncrementalJimple.jrag:12 */ public void releaseCompilationUnitForFile(String fileName) { //clear caches lookupType_String_String_values = new HashMap(); hasPackage_String_values = new HashMap(); loadedCompilationUnit.remove(fileName); List<CompilationUnit> newList = new List<CompilationUnit>(); for (soot.JastAddJ.CompilationUnit cu : getCompilationUnits()) { boolean dontAdd = false; if(cu.fromSource()) { String pathName = cu.pathName(); if (pathName.equals(fileName)) { dontAdd = true; } } if(!dontAdd) { newList.add(cu); } } setCompilationUnitList(newList); } /** * @ast method * */ public Program() { super(); is$Final(true); } /** * Initializes the child array to the correct size. * Initializes List and Opt nta children. * @apilevel internal * @ast method * @ast method * */ public void init$Children() { children = new ASTNode[1]; setChild(new List(), 0); } /** * @ast method * */ public Program(List<CompilationUnit> p0) { setChild(p0, 0); is$Final(true); } /** * @apilevel low-level * @ast method * */ protected int numChildren() { return 1; } /** * @apilevel internal * @ast method * */ public boolean mayHaveRewrite() { return false; } /** * Replaces the CompilationUnit list. * @param list The new list node to be used as the CompilationUnit list. * @apilevel high-level * @ast method * */ public void setCompilationUnitList(List<CompilationUnit> list) { setChild(list, 0); } /** * Retrieves the number of children in the CompilationUnit list. * @return Number of children in the CompilationUnit list. * @apilevel high-level * @ast method * */ public int getNumCompilationUnit() { return getCompilationUnitList().getNumChild(); } /** * Retrieves the number of children in the CompilationUnit list. * Calling this method will not trigger rewrites.. * @return Number of children in the CompilationUnit list. * @apilevel low-level * @ast method * */ public int getNumCompilationUnitNoTransform() { return getCompilationUnitListNoTransform().getNumChildNoTransform(); } /** * Retrieves the element at index {@code i} in the CompilationUnit list.. * @param i Index of the element to return. * @return The element at position {@code i} in the CompilationUnit list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public CompilationUnit getCompilationUnit(int i) { return (CompilationUnit)getCompilationUnitList().getChild(i); } /** * Append an element to the CompilationUnit list. * @param node The element to append to the CompilationUnit list. * @apilevel high-level * @ast method * */ public void refined__Program_addCompilationUnit(CompilationUnit node) { List<CompilationUnit> list = (parent == null || state == null) ? getCompilationUnitListNoTransform() : getCompilationUnitList(); list.addChild(node); } /** * @apilevel low-level * @ast method * */ public void addCompilationUnitNoTransform(CompilationUnit node) { List<CompilationUnit> list = getCompilationUnitListNoTransform(); list.addChild(node); } /** * Replaces the CompilationUnit list element at index {@code i} with the new node {@code node}. * @param node The new node to replace the old list element. * @param i The list index of the node to be replaced. * @apilevel high-level * @ast method * */ public void setCompilationUnit(CompilationUnit node, int i) { List<CompilationUnit> list = getCompilationUnitList(); list.setChild(node, i); } /** * Retrieves the CompilationUnit list. * @return The node representing the CompilationUnit list. * @apilevel high-level * @ast method * */ public List<CompilationUnit> getCompilationUnits() { return getCompilationUnitList(); } /** * Retrieves the CompilationUnit list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the CompilationUnit list. * @apilevel low-level * @ast method * */ public List<CompilationUnit> getCompilationUnitsNoTransform() { return getCompilationUnitListNoTransform(); } /** * Retrieves the CompilationUnit list. * @return The node representing the CompilationUnit list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<CompilationUnit> refined__Program_getCompilationUnitList() { List<CompilationUnit> list = (List<CompilationUnit>)getChild(0); list.getNumChild(); return list; } /** * Retrieves the CompilationUnit list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the CompilationUnit list. * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<CompilationUnit> getCompilationUnitListNoTransform() { return (List<CompilationUnit>)getChildNoTransform(0); } /** * @ast method * @aspect ClassLoading * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/SootJastAddJ/ClassLoading.jrag:36 */ public CompilationUnit getCompilationUnit(String name) { initPaths(); try { if(sourceFiles.selectCompilationUnit(name)) return sourceFiles.getCompilationUnit(); PathPart sourcePart = null; PathPart classPart = null; for(Iterator iter = sourcePath.iterator(); iter.hasNext() && sourcePart == null; ) { PathPart part = (PathPart)iter.next(); if(part.selectCompilationUnit(name)) sourcePart = part; } for(Iterator iter = classPath.iterator(); iter.hasNext() && classPart == null; ) { PathPart part = (PathPart)iter.next(); if(part.selectCompilationUnit(name)) classPart = part; } if(sourcePart != null && srcPrec == SRC_PREC_JAVA) { CompilationUnit unit = getCachedOrLoadCompilationUnit(new File(sourcePart.pathName).getCanonicalPath()); int index = name.lastIndexOf('.'); if(index == -1) return unit; String pkgName = name.substring(0, index); if(pkgName.equals(unit.getPackageDecl())) return unit; } if(classPart != null && srcPrec == SRC_PREC_CLASS) { CompilationUnit unit = classPart.getCompilationUnit(); int index = name.lastIndexOf('.'); if(index == -1) return unit; String pkgName = name.substring(0, index); if(pkgName.equals(unit.getPackageDecl())) return unit; } if(srcPrec == SRC_PREC_ONLY_CLASS) { if(classPart != null) { CompilationUnit unit = classPart.getCompilationUnit(); int index = name.lastIndexOf('.'); if(index == -1) return unit; String pkgName = name.substring(0, index); if(pkgName.equals(unit.getPackageDecl())) return unit; } } else if(sourcePart != null && (classPart == null || classPart.getAge() <= sourcePart.getAge())) { CompilationUnit unit = getCachedOrLoadCompilationUnit(new File(sourcePart.pathName).getCanonicalPath()); int index = name.lastIndexOf('.'); if(index == -1) return unit; String pkgName = name.substring(0, index); if(pkgName.equals(unit.getPackageDecl())) return unit; } else if(classPart != null) { CompilationUnit unit = classPart.getCompilationUnit(); int index = name.lastIndexOf('.'); if(index == -1) return unit; String pkgName = name.substring(0, index); if(pkgName.equals(unit.getPackageDecl())) return unit; } return null; } catch(IOException e) { } return null; } /** * @ast method * @aspect ClassLoading * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/SootJastAddJ/ClassLoading.jrag:25 */ void addCompilationUnit(CompilationUnit unit) { try { if(unit.pathName() != null) { String fileName = new File(unit.pathName()).getCanonicalPath(); loadedCompilationUnit.put(fileName, unit); } } catch (IOException e) { } refined__Program_addCompilationUnit(unit); } /** * @ast method * @aspect ClassPath * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/ClassPath.jrag:87 */ public List getCompilationUnitList() { initPaths(); return refined__Program_getCompilationUnitList(); } /** * @apilevel internal */ protected boolean typeObject_computed = false; /** * @apilevel internal */ protected TypeDecl typeObject_value; /** * @attribute syn * @aspect SpecialClasses * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupType.jrag:15 */ @SuppressWarnings({"unchecked", "cast"}) public TypeDecl typeObject() { if(typeObject_computed) { return typeObject_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); typeObject_value = typeObject_compute(); if(isFinal && num == state().boundariesCrossed) typeObject_computed = true; return typeObject_value; } /** * @apilevel internal */ private TypeDecl typeObject_compute() { return lookupType("java.lang", "Object"); } /** * @apilevel internal */ protected boolean typeCloneable_computed = false; /** * @apilevel internal */ protected TypeDecl typeCloneable_value; /** * @attribute syn * @aspect SpecialClasses * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupType.jrag:16 */ @SuppressWarnings({"unchecked", "cast"}) public TypeDecl typeCloneable() { if(typeCloneable_computed) { return typeCloneable_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); typeCloneable_value = typeCloneable_compute(); if(isFinal && num == state().boundariesCrossed) typeCloneable_computed = true; return typeCloneable_value; } /** * @apilevel internal */ private TypeDecl typeCloneable_compute() { return lookupType("java.lang", "Cloneable"); } /** * @apilevel internal */ protected boolean typeSerializable_computed = false; /** * @apilevel internal */ protected TypeDecl typeSerializable_value; /** * @attribute syn * @aspect SpecialClasses * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupType.jrag:17 */ @SuppressWarnings({"unchecked", "cast"}) public TypeDecl typeSerializable() { if(typeSerializable_computed) { return typeSerializable_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); typeSerializable_value = typeSerializable_compute(); if(isFinal && num == state().boundariesCrossed) typeSerializable_computed = true; return typeSerializable_value; } /** * @apilevel internal */ private TypeDecl typeSerializable_compute() { return lookupType("java.io", "Serializable"); } /** * @apilevel internal */ protected boolean typeBoolean_computed = false; /** * @apilevel internal */ protected TypeDecl typeBoolean_value; /** * @attribute syn * @aspect SpecialClasses * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupType.jrag:22 */ @SuppressWarnings({"unchecked", "cast"}) public TypeDecl typeBoolean() { if(typeBoolean_computed) { return typeBoolean_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); typeBoolean_value = typeBoolean_compute(); if(isFinal && num == state().boundariesCrossed) typeBoolean_computed = true; return typeBoolean_value; } /** * @apilevel internal */ private TypeDecl typeBoolean_compute() { return lookupType(PRIMITIVE_PACKAGE_NAME, "boolean"); } /** * @apilevel internal */ protected boolean typeByte_computed = false; /** * @apilevel internal */ protected TypeDecl typeByte_value; /** * @attribute syn * @aspect SpecialClasses * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupType.jrag:23 */ @SuppressWarnings({"unchecked", "cast"}) public TypeDecl typeByte() { if(typeByte_computed) { return typeByte_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); typeByte_value = typeByte_compute(); if(isFinal && num == state().boundariesCrossed) typeByte_computed = true; return typeByte_value; } /** * @apilevel internal */ private TypeDecl typeByte_compute() { return lookupType(PRIMITIVE_PACKAGE_NAME , "byte"); } /** * @apilevel internal */ protected boolean typeShort_computed = false; /** * @apilevel internal */ protected TypeDecl typeShort_value; /** * @attribute syn * @aspect SpecialClasses * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupType.jrag:24 */ @SuppressWarnings({"unchecked", "cast"}) public TypeDecl typeShort() { if(typeShort_computed) { return typeShort_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); typeShort_value = typeShort_compute(); if(isFinal && num == state().boundariesCrossed) typeShort_computed = true; return typeShort_value; } /** * @apilevel internal */ private TypeDecl typeShort_compute() { return lookupType(PRIMITIVE_PACKAGE_NAME , "short"); } /** * @apilevel internal */ protected boolean typeChar_computed = false; /** * @apilevel internal */ protected TypeDecl typeChar_value; /** * @attribute syn * @aspect SpecialClasses * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupType.jrag:25 */ @SuppressWarnings({"unchecked", "cast"}) public TypeDecl typeChar() { if(typeChar_computed) { return typeChar_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); typeChar_value = typeChar_compute(); if(isFinal && num == state().boundariesCrossed) typeChar_computed = true; return typeChar_value; } /** * @apilevel internal */ private TypeDecl typeChar_compute() { return lookupType(PRIMITIVE_PACKAGE_NAME , "char"); } /** * @apilevel internal */ protected boolean typeInt_computed = false; /** * @apilevel internal */ protected TypeDecl typeInt_value; /** * @attribute syn * @aspect SpecialClasses * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupType.jrag:26 */ @SuppressWarnings({"unchecked", "cast"}) public TypeDecl typeInt() { if(typeInt_computed) { return typeInt_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); typeInt_value = typeInt_compute(); if(isFinal && num == state().boundariesCrossed) typeInt_computed = true; return typeInt_value; } /** * @apilevel internal */ private TypeDecl typeInt_compute() { return lookupType(PRIMITIVE_PACKAGE_NAME , "int"); } /** * @apilevel internal */ protected boolean typeLong_computed = false; /** * @apilevel internal */ protected TypeDecl typeLong_value; /** * @attribute syn * @aspect SpecialClasses * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupType.jrag:27 */ @SuppressWarnings({"unchecked", "cast"}) public TypeDecl typeLong() { if(typeLong_computed) { return typeLong_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); typeLong_value = typeLong_compute(); if(isFinal && num == state().boundariesCrossed) typeLong_computed = true; return typeLong_value; } /** * @apilevel internal */ private TypeDecl typeLong_compute() { return lookupType(PRIMITIVE_PACKAGE_NAME , "long"); } /** * @apilevel internal */ protected boolean typeFloat_computed = false; /** * @apilevel internal */ protected TypeDecl typeFloat_value; /** * @attribute syn * @aspect SpecialClasses * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupType.jrag:28 */ @SuppressWarnings({"unchecked", "cast"}) public TypeDecl typeFloat() { if(typeFloat_computed) { return typeFloat_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); typeFloat_value = typeFloat_compute(); if(isFinal && num == state().boundariesCrossed) typeFloat_computed = true; return typeFloat_value; } /** * @apilevel internal */ private TypeDecl typeFloat_compute() { return lookupType(PRIMITIVE_PACKAGE_NAME , "float"); } /** * @apilevel internal */ protected boolean typeDouble_computed = false; /** * @apilevel internal */ protected TypeDecl typeDouble_value; /** * @attribute syn * @aspect SpecialClasses * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupType.jrag:29 */ @SuppressWarnings({"unchecked", "cast"}) public TypeDecl typeDouble() { if(typeDouble_computed) { return typeDouble_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); typeDouble_value = typeDouble_compute(); if(isFinal && num == state().boundariesCrossed) typeDouble_computed = true; return typeDouble_value; } /** * @apilevel internal */ private TypeDecl typeDouble_compute() { return lookupType(PRIMITIVE_PACKAGE_NAME , "double"); } /** * @apilevel internal */ protected boolean typeString_computed = false; /** * @apilevel internal */ protected TypeDecl typeString_value; /** * @attribute syn * @aspect SpecialClasses * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupType.jrag:30 */ @SuppressWarnings({"unchecked", "cast"}) public TypeDecl typeString() { if(typeString_computed) { return typeString_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); typeString_value = typeString_compute(); if(isFinal && num == state().boundariesCrossed) typeString_computed = true; return typeString_value; } /** * @apilevel internal */ private TypeDecl typeString_compute() { return lookupType("java.lang", "String"); } /** * @apilevel internal */ protected boolean typeVoid_computed = false; /** * @apilevel internal */ protected TypeDecl typeVoid_value; /** * @attribute syn * @aspect SpecialClasses * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupType.jrag:41 */ @SuppressWarnings({"unchecked", "cast"}) public TypeDecl typeVoid() { if(typeVoid_computed) { return typeVoid_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); typeVoid_value = typeVoid_compute(); if(isFinal && num == state().boundariesCrossed) typeVoid_computed = true; return typeVoid_value; } /** * @apilevel internal */ private TypeDecl typeVoid_compute() { return lookupType(PRIMITIVE_PACKAGE_NAME, "void"); } /** * @apilevel internal */ protected boolean typeNull_computed = false; /** * @apilevel internal */ protected TypeDecl typeNull_value; /** * @attribute syn * @aspect SpecialClasses * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupType.jrag:43 */ @SuppressWarnings({"unchecked", "cast"}) public TypeDecl typeNull() { if(typeNull_computed) { return typeNull_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); typeNull_value = typeNull_compute(); if(isFinal && num == state().boundariesCrossed) typeNull_computed = true; return typeNull_value; } /** * @apilevel internal */ private TypeDecl typeNull_compute() { return lookupType(PRIMITIVE_PACKAGE_NAME, "null"); } /** * @apilevel internal */ protected boolean unknownType_computed = false; /** * @apilevel internal */ protected TypeDecl unknownType_value; /** * @attribute syn * @aspect SpecialClasses * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupType.jrag:46 */ @SuppressWarnings({"unchecked", "cast"}) public TypeDecl unknownType() { if(unknownType_computed) { return unknownType_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); unknownType_value = unknownType_compute(); if(isFinal && num == state().boundariesCrossed) unknownType_computed = true; return unknownType_value; } /** * @apilevel internal */ private TypeDecl unknownType_compute() { return lookupType(PRIMITIVE_PACKAGE_NAME, "Unknown"); } protected java.util.Map hasPackage_String_values; /** * @attribute syn * @aspect LookupFullyQualifiedTypes * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupType.jrag:77 */ @SuppressWarnings({"unchecked", "cast"}) public boolean hasPackage(String packageName) { Object _parameters = packageName; if(hasPackage_String_values == null) hasPackage_String_values = new java.util.HashMap(4); if(hasPackage_String_values.containsKey(_parameters)) { return ((Boolean)hasPackage_String_values.get(_parameters)).booleanValue(); } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); boolean hasPackage_String_value = hasPackage_compute(packageName); if(isFinal && num == state().boundariesCrossed) hasPackage_String_values.put(_parameters, Boolean.valueOf(hasPackage_String_value)); return hasPackage_String_value; } /** * @apilevel internal */ private boolean hasPackage_compute(String packageName) { return isPackage(packageName); } protected java.util.Map lookupType_String_String_values; /** * Checks from-source compilation units for the given type. * If no matching compilation unit is found the library compliation units * will be searched. * @attribute syn * @aspect LookupFullyQualifiedTypes * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupType.jrag:158 */ @SuppressWarnings({"unchecked", "cast"}) public TypeDecl lookupType(String packageName, String typeName) { java.util.List _parameters = new java.util.ArrayList(2); _parameters.add(packageName); _parameters.add(typeName); if(lookupType_String_String_values == null) lookupType_String_String_values = new java.util.HashMap(4); if(lookupType_String_String_values.containsKey(_parameters)) { return (TypeDecl)lookupType_String_String_values.get(_parameters); } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); TypeDecl lookupType_String_String_value = lookupType_compute(packageName, typeName); if(isFinal && num == state().boundariesCrossed) lookupType_String_String_values.put(_parameters, lookupType_String_String_value); return lookupType_String_String_value; } /** * @apilevel internal */ private TypeDecl lookupType_compute(String packageName, String typeName) { String fullName = packageName.equals("") ? typeName : packageName + "." + typeName; // Check for type in source for(int i = 0; i < getNumCompilationUnit(); i++) { for(int j = 0; j < getCompilationUnit(i).getNumTypeDecl(); j++) { TypeDecl type = getCompilationUnit(i).getTypeDecl(j); if(type.fullName().equals(fullName)) { return type; } } } // Check for type in library return lookupLibType(packageName, typeName); } protected java.util.Map lookupLibType_String_String_values; /** * Lookup types in the library * @attribute syn * @aspect LookupFullyQualifiedTypes * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupType.jrag:175 */ @SuppressWarnings({"unchecked", "cast"}) public TypeDecl lookupLibType(String packageName, String typeName) { java.util.List _parameters = new java.util.ArrayList(2); _parameters.add(packageName); _parameters.add(typeName); if(lookupLibType_String_String_values == null) lookupLibType_String_String_values = new java.util.HashMap(4); if(lookupLibType_String_String_values.containsKey(_parameters)) { return (TypeDecl)lookupLibType_String_String_values.get(_parameters); } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); TypeDecl lookupLibType_String_String_value = lookupLibType_compute(packageName, typeName); if(isFinal && num == state().boundariesCrossed) lookupLibType_String_String_values.put(_parameters, lookupLibType_String_String_value); return lookupLibType_String_String_value; } /** * @apilevel internal */ private TypeDecl lookupLibType_compute(String packageName, String typeName) { String fullName = packageName.equals("") ? typeName : packageName + "." + typeName; // Check the primitive types if (packageName.equals(PRIMITIVE_PACKAGE_NAME)) { PrimitiveCompilationUnit unit = getPrimitiveCompilationUnit(); if (typeName.equals("boolean")) return unit.typeBoolean(); if (typeName.equals("byte")) return unit.typeByte(); if (typeName.equals("short")) return unit.typeShort(); if (typeName.equals("char")) return unit.typeChar(); if (typeName.equals("int")) return unit.typeInt(); if (typeName.equals("long")) return unit.typeLong(); if (typeName.equals("float")) return unit.typeFloat(); if (typeName.equals("double")) return unit.typeDouble(); if (typeName.equals("null")) return unit.typeNull(); if (typeName.equals("void")) return unit.typeVoid(); if (typeName.equals("Unknown")) return unit.unknownType(); // Is this needed? } // Check the library: // A type may not be in the library but an NTA cannot map to null. // We need to do some double work to step around this. // We check the classpath directly (the same thing the library NTA does) // to prevent that we call the nta for a name that gives null back //else if (getCompilationUnit(fullName) != null) { // Found a library unit, check it for type CompilationUnit libUnit = getLibCompilationUnit(fullName); if (libUnit != null) { for(int j = 0; j < libUnit.getNumTypeDecl(); j++) { TypeDecl type = libUnit.getTypeDecl(j); if(type.fullName().equals(fullName)) { return type; } } } // No type found in the library return null; } /** * @apilevel internal */ protected java.util.Map getLibCompilationUnit_String_values; /** * @apilevel internal */ protected List getLibCompilationUnit_String_list; /** * @attribute syn * @aspect LookupFullyQualifiedTypes * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupType.jrag:213 */ @SuppressWarnings({"unchecked", "cast"}) public CompilationUnit getLibCompilationUnit(String fullName) { Object _parameters = fullName; if(getLibCompilationUnit_String_values == null) getLibCompilationUnit_String_values = new java.util.HashMap(4); if(getLibCompilationUnit_String_values.containsKey(_parameters)) { return (CompilationUnit)getLibCompilationUnit_String_values.get(_parameters); } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); CompilationUnit getLibCompilationUnit_String_value = getLibCompilationUnit_compute(fullName); if(getLibCompilationUnit_String_list == null) { getLibCompilationUnit_String_list = new List(); getLibCompilationUnit_String_list.is$Final = true; getLibCompilationUnit_String_list.setParent(this); } getLibCompilationUnit_String_list.add(getLibCompilationUnit_String_value); if(getLibCompilationUnit_String_value != null) { getLibCompilationUnit_String_value.is$Final = true; } if(true) getLibCompilationUnit_String_values.put(_parameters, getLibCompilationUnit_String_value); return getLibCompilationUnit_String_value; } /** * @apilevel internal */ private CompilationUnit getLibCompilationUnit_compute(String fullName) { return getCompilationUnit(fullName); } /** * @apilevel internal */ protected boolean getPrimitiveCompilationUnit_computed = false; /** * @apilevel internal */ protected PrimitiveCompilationUnit getPrimitiveCompilationUnit_value; /** * @attribute syn * @aspect PrimitiveTypes * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/PrimitiveTypes.jrag:219 */ @SuppressWarnings({"unchecked", "cast"}) public PrimitiveCompilationUnit getPrimitiveCompilationUnit() { if(getPrimitiveCompilationUnit_computed) { return getPrimitiveCompilationUnit_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); getPrimitiveCompilationUnit_value = getPrimitiveCompilationUnit_compute(); getPrimitiveCompilationUnit_value.setParent(this); getPrimitiveCompilationUnit_value.is$Final = true; if(true) getPrimitiveCompilationUnit_computed = true; return getPrimitiveCompilationUnit_value; } /** * @apilevel internal */ private PrimitiveCompilationUnit getPrimitiveCompilationUnit_compute() { PrimitiveCompilationUnit u = new PrimitiveCompilationUnit(); u.setPackageDecl(PRIMITIVE_PACKAGE_NAME); return u; } /** * @apilevel internal */ protected boolean unknownConstructor_computed = false; /** * @apilevel internal */ protected ConstructorDecl unknownConstructor_value; /** * @attribute syn * @aspect TypeAnalysis * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeAnalysis.jrag:245 */ @SuppressWarnings({"unchecked", "cast"}) public ConstructorDecl unknownConstructor() { if(unknownConstructor_computed) { return unknownConstructor_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); unknownConstructor_value = unknownConstructor_compute(); if(isFinal && num == state().boundariesCrossed) unknownConstructor_computed = true; return unknownConstructor_value; } /** * @apilevel internal */ private ConstructorDecl unknownConstructor_compute() { return (ConstructorDecl)unknownType().constructors().iterator().next(); } /** * @apilevel internal */ protected boolean wildcards_computed = false; /** * @apilevel internal */ protected WildcardsCompilationUnit wildcards_value; /** * @attribute syn * @aspect LookupParTypeDecl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:1358 */ @SuppressWarnings({"unchecked", "cast"}) public WildcardsCompilationUnit wildcards() { if(wildcards_computed) { return wildcards_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); wildcards_value = wildcards_compute(); wildcards_value.setParent(this); wildcards_value.is$Final = true; if(true) wildcards_computed = true; return wildcards_value; } /** * @apilevel internal */ private WildcardsCompilationUnit wildcards_compute() { return new WildcardsCompilationUnit( "wildcards", new List(), new List() ); } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/AnonymousClasses.jrag:16 * @apilevel internal */ public TypeDecl Define_TypeDecl_superType(ASTNode caller, ASTNode child) { { int childIndex = this.getIndexOfChild(caller); return null; } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/AnonymousClasses.jrag:26 * @apilevel internal */ public ConstructorDecl Define_ConstructorDecl_constructorDecl(ASTNode caller, ASTNode child) { { int childIndex = this.getIndexOfChild(caller); return null; } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/Arrays.jrag:19 * @apilevel internal */ public TypeDecl Define_TypeDecl_componentType(ASTNode caller, ASTNode child) { { int childIndex = this.getIndexOfChild(caller); return unknownType(); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/BranchTarget.jrag:172 * @apilevel internal */ public LabeledStmt Define_LabeledStmt_lookupLabel(ASTNode caller, ASTNode child, String name) { { int childIndex = this.getIndexOfChild(caller); return null; } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DefiniteAssignment.jrag:16 * @apilevel internal */ public boolean Define_boolean_isDest(ASTNode caller, ASTNode child) { { int childIndex = this.getIndexOfChild(caller); return false; } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DefiniteAssignment.jrag:26 * @apilevel internal */ public boolean Define_boolean_isSource(ASTNode caller, ASTNode child) { { int childIndex = this.getIndexOfChild(caller); return true; } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DefiniteAssignment.jrag:50 * @apilevel internal */ public boolean Define_boolean_isIncOrDec(ASTNode caller, ASTNode child) { { int childIndex = this.getIndexOfChild(caller); return false; } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DefiniteAssignment.jrag:324 * @apilevel internal */ public boolean Define_boolean_isDAbefore(ASTNode caller, ASTNode child, Variable v) { { int childIndex = this.getIndexOfChild(caller); return true; } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DefiniteAssignment.jrag:710 * @apilevel internal */ public boolean Define_boolean_isDUbefore(ASTNode caller, ASTNode child, Variable v) { { int childIndex = this.getIndexOfChild(caller); return true; } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/ExceptionHandling.jrag:13 * @apilevel internal */ public TypeDecl Define_TypeDecl_typeException(ASTNode caller, ASTNode child) { { int childIndex = this.getIndexOfChild(caller); return lookupType("java.lang", "Exception"); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/ExceptionHandling.jrag:15 * @apilevel internal */ public TypeDecl Define_TypeDecl_typeRuntimeException(ASTNode caller, ASTNode child) { { int childIndex = this.getIndexOfChild(caller); return lookupType("java.lang", "RuntimeException"); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/ExceptionHandling.jrag:17 * @apilevel internal */ public TypeDecl Define_TypeDecl_typeError(ASTNode caller, ASTNode child) { { int childIndex = this.getIndexOfChild(caller); return lookupType("java.lang", "Error"); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/ExceptionHandling.jrag:19 * @apilevel internal */ public TypeDecl Define_TypeDecl_typeNullPointerException(ASTNode caller, ASTNode child) { { int childIndex = this.getIndexOfChild(caller); return lookupType("java.lang", "NullPointerException"); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/ExceptionHandling.jrag:21 * @apilevel internal */ public TypeDecl Define_TypeDecl_typeThrowable(ASTNode caller, ASTNode child) { { int childIndex = this.getIndexOfChild(caller); return lookupType("java.lang", "Throwable"); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/ExceptionHandling.jrag:137 * @apilevel internal */ public boolean Define_boolean_handlesException(ASTNode caller, ASTNode child, TypeDecl exceptionType) { { int childIndex = this.getIndexOfChild(caller); { throw new Error("Operation handlesException not supported"); } } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupConstructor.jrag:15 * @apilevel internal */ public Collection Define_Collection_lookupConstructor(ASTNode caller, ASTNode child) { { int childIndex = this.getIndexOfChild(caller); return Collections.EMPTY_LIST; } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupConstructor.jrag:24 * @apilevel internal */ public Collection Define_Collection_lookupSuperConstructor(ASTNode caller, ASTNode child) { { int childIndex = this.getIndexOfChild(caller); return Collections.EMPTY_LIST; } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupMethod.jrag:21 * @apilevel internal */ public Expr Define_Expr_nestedScope(ASTNode caller, ASTNode child) { { int childIndex = this.getIndexOfChild(caller); { throw new UnsupportedOperationException(); } } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupMethod.jrag:33 * @apilevel internal */ public Collection Define_Collection_lookupMethod(ASTNode caller, ASTNode child, String name) { { int childIndex = this.getIndexOfChild(caller); return Collections.EMPTY_LIST; } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupType.jrag:18 * @apilevel internal */ public TypeDecl Define_TypeDecl_typeObject(ASTNode caller, ASTNode child) { { int childIndex = this.getIndexOfChild(caller); return typeObject(); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupType.jrag:19 * @apilevel internal */ public TypeDecl Define_TypeDecl_typeCloneable(ASTNode caller, ASTNode child) { { int childIndex = this.getIndexOfChild(caller); return typeCloneable(); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupType.jrag:20 * @apilevel internal */ public TypeDecl Define_TypeDecl_typeSerializable(ASTNode caller, ASTNode child) { { int childIndex = this.getIndexOfChild(caller); return typeSerializable(); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupType.jrag:31 * @apilevel internal */ public TypeDecl Define_TypeDecl_typeBoolean(ASTNode caller, ASTNode child) { { int childIndex = this.getIndexOfChild(caller); return typeBoolean(); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupType.jrag:32 * @apilevel internal */ public TypeDecl Define_TypeDecl_typeByte(ASTNode caller, ASTNode child) { { int childIndex = this.getIndexOfChild(caller); return typeByte(); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupType.jrag:33 * @apilevel internal */ public TypeDecl Define_TypeDecl_typeShort(ASTNode caller, ASTNode child) { { int childIndex = this.getIndexOfChild(caller); return typeShort(); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupType.jrag:34 * @apilevel internal */ public TypeDecl Define_TypeDecl_typeChar(ASTNode caller, ASTNode child) { { int childIndex = this.getIndexOfChild(caller); return typeChar(); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupType.jrag:35 * @apilevel internal */ public TypeDecl Define_TypeDecl_typeInt(ASTNode caller, ASTNode child) { { int childIndex = this.getIndexOfChild(caller); return typeInt(); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupType.jrag:36 * @apilevel internal */ public TypeDecl Define_TypeDecl_typeLong(ASTNode caller, ASTNode child) { { int childIndex = this.getIndexOfChild(caller); return typeLong(); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupType.jrag:37 * @apilevel internal */ public TypeDecl Define_TypeDecl_typeFloat(ASTNode caller, ASTNode child) { { int childIndex = this.getIndexOfChild(caller); return typeFloat(); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupType.jrag:38 * @apilevel internal */ public TypeDecl Define_TypeDecl_typeDouble(ASTNode caller, ASTNode child) { { int childIndex = this.getIndexOfChild(caller); return typeDouble(); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupType.jrag:39 * @apilevel internal */ public TypeDecl Define_TypeDecl_typeString(ASTNode caller, ASTNode child) { { int childIndex = this.getIndexOfChild(caller); return typeString(); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupType.jrag:42 * @apilevel internal */ public TypeDecl Define_TypeDecl_typeVoid(ASTNode caller, ASTNode child) { { int childIndex = this.getIndexOfChild(caller); return typeVoid(); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupType.jrag:44 * @apilevel internal */ public TypeDecl Define_TypeDecl_typeNull(ASTNode caller, ASTNode child) { { int childIndex = this.getIndexOfChild(caller); return typeNull(); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupType.jrag:47 * @apilevel internal */ public TypeDecl Define_TypeDecl_unknownType(ASTNode caller, ASTNode child) { { int childIndex = this.getIndexOfChild(caller); return unknownType(); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupType.jrag:81 * @apilevel internal */ public boolean Define_boolean_hasPackage(ASTNode caller, ASTNode child, String packageName) { { int childIndex = this.getIndexOfChild(caller); return hasPackage(packageName); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupType.jrag:151 * @apilevel internal */ public TypeDecl Define_TypeDecl_lookupType(ASTNode caller, ASTNode child, String packageName, String typeName) { { int childIndex = this.getIndexOfChild(caller); return lookupType(packageName, typeName); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupType.jrag:266 * @apilevel internal */ public SimpleSet Define_SimpleSet_lookupType(ASTNode caller, ASTNode child, String name) { { int childIndex = this.getIndexOfChild(caller); return SimpleSet.emptySet; } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupVariable.jrag:24 * @apilevel internal */ public SimpleSet Define_SimpleSet_lookupVariable(ASTNode caller, ASTNode child, String name) { { int childIndex = this.getIndexOfChild(caller); return SimpleSet.emptySet; } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/Modifiers.jrag:290 * @apilevel internal */ public boolean Define_boolean_mayBePublic(ASTNode caller, ASTNode child) { { int childIndex = this.getIndexOfChild(caller); return false; } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/Modifiers.jrag:291 * @apilevel internal */ public boolean Define_boolean_mayBeProtected(ASTNode caller, ASTNode child) { { int childIndex = this.getIndexOfChild(caller); return false; } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/Modifiers.jrag:292 * @apilevel internal */ public boolean Define_boolean_mayBePrivate(ASTNode caller, ASTNode child) { { int childIndex = this.getIndexOfChild(caller); return false; } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/Modifiers.jrag:293 * @apilevel internal */ public boolean Define_boolean_mayBeStatic(ASTNode caller, ASTNode child) { { int childIndex = this.getIndexOfChild(caller); return false; } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/Modifiers.jrag:294 * @apilevel internal */ public boolean Define_boolean_mayBeFinal(ASTNode caller, ASTNode child) { { int childIndex = this.getIndexOfChild(caller); return false; } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/Modifiers.jrag:295 * @apilevel internal */ public boolean Define_boolean_mayBeAbstract(ASTNode caller, ASTNode child) { { int childIndex = this.getIndexOfChild(caller); return false; } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/Modifiers.jrag:296 * @apilevel internal */ public boolean Define_boolean_mayBeVolatile(ASTNode caller, ASTNode child) { { int childIndex = this.getIndexOfChild(caller); return false; } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/Modifiers.jrag:297 * @apilevel internal */ public boolean Define_boolean_mayBeTransient(ASTNode caller, ASTNode child) { { int childIndex = this.getIndexOfChild(caller); return false; } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/Modifiers.jrag:298 * @apilevel internal */ public boolean Define_boolean_mayBeStrictfp(ASTNode caller, ASTNode child) { { int childIndex = this.getIndexOfChild(caller); return false; } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/Modifiers.jrag:299 * @apilevel internal */ public boolean Define_boolean_mayBeSynchronized(ASTNode caller, ASTNode child) { { int childIndex = this.getIndexOfChild(caller); return false; } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/Modifiers.jrag:300 * @apilevel internal */ public boolean Define_boolean_mayBeNative(ASTNode caller, ASTNode child) { { int childIndex = this.getIndexOfChild(caller); return false; } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/NameCheck.jrag:249 * @apilevel internal */ public ASTNode Define_ASTNode_enclosingBlock(ASTNode caller, ASTNode child) { { int childIndex = this.getIndexOfChild(caller); return null; } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/NameCheck.jrag:300 * @apilevel internal */ public VariableScope Define_VariableScope_outerScope(ASTNode caller, ASTNode child) { { int childIndex = this.getIndexOfChild(caller); { throw new UnsupportedOperationException("outerScope() not defined"); } } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/NameCheck.jrag:368 * @apilevel internal */ public boolean Define_boolean_insideLoop(ASTNode caller, ASTNode child) { { int childIndex = this.getIndexOfChild(caller); return false; } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/NameCheck.jrag:375 * @apilevel internal */ public boolean Define_boolean_insideSwitch(ASTNode caller, ASTNode child) { { int childIndex = this.getIndexOfChild(caller); return false; } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/NameCheck.jrag:425 * @apilevel internal */ public Case Define_Case_bind(ASTNode caller, ASTNode child, Case c) { { int childIndex = this.getIndexOfChild(caller); return null; } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/PrettyPrint.jadd:354 * @apilevel internal */ public String Define_String_typeDeclIndent(ASTNode caller, ASTNode child) { { int childIndex = this.getIndexOfChild(caller); return ""; } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/SyntacticClassification.jrag:64 * @apilevel internal */ public NameType Define_NameType_nameType(ASTNode caller, ASTNode child) { { int childIndex = this.getIndexOfChild(caller); return NameType.NO_NAME; } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeAnalysis.jrag:219 * @apilevel internal */ public boolean Define_boolean_isAnonymous(ASTNode caller, ASTNode child) { { int childIndex = this.getIndexOfChild(caller); return false; } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeAnalysis.jrag:233 * @apilevel internal */ public Variable Define_Variable_unknownField(ASTNode caller, ASTNode child) { { int childIndex = this.getIndexOfChild(caller); return unknownType().findSingleVariable("unknown"); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeAnalysis.jrag:237 * @apilevel internal */ public MethodDecl Define_MethodDecl_unknownMethod(ASTNode caller, ASTNode child) { { int childIndex = this.getIndexOfChild(caller); { for(Iterator iter = unknownType().memberMethods("unknown").iterator(); iter.hasNext(); ) { MethodDecl m = (MethodDecl)iter.next(); return m; } throw new Error("Could not find method unknown in type Unknown"); } } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeAnalysis.jrag:244 * @apilevel internal */ public ConstructorDecl Define_ConstructorDecl_unknownConstructor(ASTNode caller, ASTNode child) { { int childIndex = this.getIndexOfChild(caller); return unknownConstructor(); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeAnalysis.jrag:256 * @apilevel internal */ public TypeDecl Define_TypeDecl_declType(ASTNode caller, ASTNode child) { { int i = this.getIndexOfChild(caller); return null; } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeAnalysis.jrag:513 * @apilevel internal */ public BodyDecl Define_BodyDecl_enclosingBodyDecl(ASTNode caller, ASTNode child) { { int childIndex = this.getIndexOfChild(caller); return null; } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeAnalysis.jrag:531 * @apilevel internal */ public boolean Define_boolean_isMemberType(ASTNode caller, ASTNode child) { { int childIndex = this.getIndexOfChild(caller); return false; } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeAnalysis.jrag:582 * @apilevel internal */ public TypeDecl Define_TypeDecl_hostType(ASTNode caller, ASTNode child) { { int childIndex = this.getIndexOfChild(caller); return null; } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeCheck.jrag:360 * @apilevel internal */ public TypeDecl Define_TypeDecl_switchType(ASTNode caller, ASTNode child) { { int childIndex = this.getIndexOfChild(caller); return unknownType(); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeCheck.jrag:406 * @apilevel internal */ public TypeDecl Define_TypeDecl_returnType(ASTNode caller, ASTNode child) { { int childIndex = this.getIndexOfChild(caller); return typeVoid(); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeCheck.jrag:506 * @apilevel internal */ public TypeDecl Define_TypeDecl_enclosingInstance(ASTNode caller, ASTNode child) { { int childIndex = this.getIndexOfChild(caller); return null; } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeHierarchyCheck.jrag:14 * @apilevel internal */ public String Define_String_methodHost(ASTNode caller, ASTNode child) { { int childIndex = this.getIndexOfChild(caller); { throw new Error("Needs extra equation for methodHost()"); } } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeHierarchyCheck.jrag:128 * @apilevel internal */ public boolean Define_boolean_inExplicitConstructorInvocation(ASTNode caller, ASTNode child) { { int childIndex = this.getIndexOfChild(caller); return false; } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeHierarchyCheck.jrag:137 * @apilevel internal */ public boolean Define_boolean_inStaticContext(ASTNode caller, ASTNode child) { { int childIndex = this.getIndexOfChild(caller); return false; } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/UnreachableStatements.jrag:162 * @apilevel internal */ public boolean Define_boolean_reportUnreachable(ASTNode caller, ASTNode child) { { int childIndex = this.getIndexOfChild(caller); return true; } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/VariableDeclaration.jrag:68 * @apilevel internal */ public boolean Define_boolean_isMethodParameter(ASTNode caller, ASTNode child) { { int childIndex = this.getIndexOfChild(caller); return false; } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/VariableDeclaration.jrag:69 * @apilevel internal */ public boolean Define_boolean_isConstructorParameter(ASTNode caller, ASTNode child) { { int childIndex = this.getIndexOfChild(caller); return false; } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/VariableDeclaration.jrag:70 * @apilevel internal */ public boolean Define_boolean_isExceptionHandlerParameter(ASTNode caller, ASTNode child) { { int childIndex = this.getIndexOfChild(caller); return false; } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Annotations.jrag:94 * @apilevel internal */ public boolean Define_boolean_mayUseAnnotationTarget(ASTNode caller, ASTNode child, String name) { { int childIndex = this.getIndexOfChild(caller); return false; } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Annotations.jrag:180 * @apilevel internal */ public ElementValue Define_ElementValue_lookupElementTypeValue(ASTNode caller, ASTNode child, String name) { { int childIndex = this.getIndexOfChild(caller); return null; } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Annotations.jrag:269 * @apilevel internal */ public boolean Define_boolean_withinSuppressWarnings(ASTNode caller, ASTNode child, String s) { { int childIndex = this.getIndexOfChild(caller); return false; } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Annotations.jrag:371 * @apilevel internal */ public boolean Define_boolean_withinDeprecatedAnnotation(ASTNode caller, ASTNode child) { { int childIndex = this.getIndexOfChild(caller); return false; } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Annotations.jrag:430 * @apilevel internal */ public Annotation Define_Annotation_lookupAnnotation(ASTNode caller, ASTNode child, TypeDecl typeDecl) { { int i = this.getIndexOfChild(caller); return null; } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Annotations.jrag:463 * @apilevel internal */ public TypeDecl Define_TypeDecl_enclosingAnnotationDecl(ASTNode caller, ASTNode child) { { int childIndex = this.getIndexOfChild(caller); return unknownType(); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericMethodsInference.jrag:39 * @apilevel internal */ public TypeDecl Define_TypeDecl_assignConvertedType(ASTNode caller, ASTNode child) { { int childIndex = this.getIndexOfChild(caller); return typeNull(); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:267 * @apilevel internal */ public boolean Define_boolean_inExtendsOrImplements(ASTNode caller, ASTNode child) { { int childIndex = this.getIndexOfChild(caller); return false; } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:1385 * @apilevel internal */ public TypeDecl Define_TypeDecl_typeWildcard(ASTNode caller, ASTNode child) { { int childIndex = this.getIndexOfChild(caller); return wildcards().typeWildcard(); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:1396 * @apilevel internal */ public TypeDecl Define_TypeDecl_lookupWildcardExtends(ASTNode caller, ASTNode child, TypeDecl typeDecl) { { int childIndex = this.getIndexOfChild(caller); return wildcards().lookupWildcardExtends(typeDecl); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:1409 * @apilevel internal */ public TypeDecl Define_TypeDecl_lookupWildcardSuper(ASTNode caller, ASTNode child, TypeDecl typeDecl) { { int childIndex = this.getIndexOfChild(caller); return wildcards().lookupWildcardSuper(typeDecl); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:1431 * @apilevel internal */ public LUBType Define_LUBType_lookupLUBType(ASTNode caller, ASTNode child, Collection bounds) { { int childIndex = this.getIndexOfChild(caller); return wildcards().lookupLUBType(bounds); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:1469 * @apilevel internal */ public GLBType Define_GLBType_lookupGLBType(ASTNode caller, ASTNode child, ArrayList bounds) { { int childIndex = this.getIndexOfChild(caller); return wildcards().lookupGLBType(bounds); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericsParTypeDecl.jrag:46 * @apilevel internal */ public TypeDecl Define_TypeDecl_genericDecl(ASTNode caller, ASTNode child) { { int childIndex = this.getIndexOfChild(caller); return null; } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/VariableArityParameters.jrag:24 * @apilevel internal */ public boolean Define_boolean_variableArityValid(ASTNode caller, ASTNode child) { { int childIndex = this.getIndexOfChild(caller); return false; } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Backend/InnerClasses.jrag:64 * @apilevel internal */ public TypeDecl Define_TypeDecl_expectedType(ASTNode caller, ASTNode child) { { int i = this.getIndexOfChild(caller); return null; } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/BooleanExpressions.jrag:49 * @apilevel internal */ public soot.jimple.Stmt Define_soot_jimple_Stmt_condition_false_label(ASTNode caller, ASTNode child) { if(caller == getCompilationUnitListNoTransform()) { int i = caller.getIndexOfChild(child); { throw new Error("condition_false_label not implemented"); } } else { return getParent().Define_soot_jimple_Stmt_condition_false_label(this, caller); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/BooleanExpressions.jrag:53 * @apilevel internal */ public soot.jimple.Stmt Define_soot_jimple_Stmt_condition_true_label(ASTNode caller, ASTNode child) { if(caller == getCompilationUnitListNoTransform()) { int i = caller.getIndexOfChild(child); { throw new Error("condition_true_label not implemented"); } } else { return getParent().Define_soot_jimple_Stmt_condition_true_label(this, caller); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/LocalNum.jrag:15 * @apilevel internal */ public int Define_int_localNum(ASTNode caller, ASTNode child) { if(caller == getCompilationUnitListNoTransform()) { int index = caller.getIndexOfChild(child); return 0; } else { return getParent().Define_int_localNum(this, caller); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/Statements.jrag:349 * @apilevel internal */ public boolean Define_boolean_enclosedByExceptionHandler(ASTNode caller, ASTNode child) { { int childIndex = this.getIndexOfChild(caller); return false; } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/Statements.jrag:465 * @apilevel internal */ public ArrayList Define_ArrayList_exceptionRanges(ASTNode caller, ASTNode child) { { int childIndex = this.getIndexOfChild(caller); return null; } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/PreciseRethrow.jrag:122 * @apilevel internal */ public boolean Define_boolean_isCatchParam(ASTNode caller, ASTNode child) { { int i = this.getIndexOfChild(caller); return false; } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/PreciseRethrow.jrag:130 * @apilevel internal */ public CatchClause Define_CatchClause_catchClause(ASTNode caller, ASTNode child) { { int i = this.getIndexOfChild(caller); { throw new IllegalStateException("Could not find parent " + "catch clause"); } } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/TryWithResources.jrag:154 * @apilevel internal */ public boolean Define_boolean_resourcePreviouslyDeclared(ASTNode caller, ASTNode child, String name) { { int i = this.getIndexOfChild(caller); return false; } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/TypeInference.jrag:70 * @apilevel internal */ public ClassInstanceExpr Define_ClassInstanceExpr_getClassInstanceExpr(ASTNode caller, ASTNode child) { { int i = this.getIndexOfChild(caller); return null; } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/TypeInference.jrag:462 * @apilevel internal */ public boolean Define_boolean_isAnonymousDecl(ASTNode caller, ASTNode child) { { int childIndex = this.getIndexOfChild(caller); return false; } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/TypeInference.jrag:479 * @apilevel internal */ public boolean Define_boolean_isExplicitGenericConstructorAccess(ASTNode caller, ASTNode child) { { int i = this.getIndexOfChild(caller); return false; } } /** * @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); } }
87,047
31.675676
141
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/RShiftExpr.java
/* This file was generated with JastAdd2 (http://jastadd.org) version R20130212 (r1031) */ package soot.JastAddJ; import java.util.HashSet; 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; /** * @production RShiftExpr : {@link ShiftExpr}; * @ast node * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/java.ast:163 */ public class RShiftExpr extends ShiftExpr implements Cloneable { /** * @apilevel low-level */ public void flushCache() { super.flushCache(); } /** * @apilevel internal */ public void flushCollectionCache() { super.flushCollectionCache(); } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public RShiftExpr clone() throws CloneNotSupportedException { RShiftExpr node = (RShiftExpr)super.clone(); node.in$Circle(false); node.is$Final(false); return node; } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public RShiftExpr copy() { try { RShiftExpr node = (RShiftExpr) clone(); node.parent = null; if(children != null) node.children = (ASTNode[]) children.clone(); return node; } catch (CloneNotSupportedException e) { throw new Error("Error: clone not supported for " + getClass().getName()); } } /** * Create a deep copy of the AST subtree at this node. * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level */ @SuppressWarnings({"unchecked", "cast"}) public RShiftExpr fullCopy() { RShiftExpr tree = (RShiftExpr) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) children[i]; if(child != null) { child = child.fullCopy(); tree.setChild(child, i); } } } return tree; } /** * @ast method * @aspect Expressions * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/Expressions.jrag:799 */ public soot.Value eval(Body b) { return emitShiftExpr(b); } /** * @ast method * @aspect Expressions * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/Expressions.jrag:823 */ public soot.Value emitOperation(Body b, soot.Value left, soot.Value right) { return asLocal(b, b.newShrExpr(asImmediate(b, left), asImmediate(b, right), this)); } /** * @ast method * */ public RShiftExpr() { super(); } /** * Initializes the child array to the correct size. * Initializes List and Opt nta children. * @apilevel internal * @ast method * @ast method * */ public void init$Children() { children = new ASTNode[2]; } /** * @ast method * */ public RShiftExpr(Expr p0, Expr p1) { setChild(p0, 0); setChild(p1, 1); } /** * @apilevel low-level * @ast method * */ protected int numChildren() { return 2; } /** * @apilevel internal * @ast method * */ public boolean mayHaveRewrite() { return false; } /** * Replaces the LeftOperand child. * @param node The new node to replace the LeftOperand child. * @apilevel high-level * @ast method * */ public void setLeftOperand(Expr node) { setChild(node, 0); } /** * Retrieves the LeftOperand child. * @return The current node used as the LeftOperand child. * @apilevel high-level * @ast method * */ public Expr getLeftOperand() { return (Expr)getChild(0); } /** * Retrieves the LeftOperand child. * <p><em>This method does not invoke AST transformations.</em></p> * @return The current node used as the LeftOperand child. * @apilevel low-level * @ast method * */ public Expr getLeftOperandNoTransform() { return (Expr)getChildNoTransform(0); } /** * Replaces the RightOperand child. * @param node The new node to replace the RightOperand child. * @apilevel high-level * @ast method * */ public void setRightOperand(Expr node) { setChild(node, 1); } /** * Retrieves the RightOperand child. * @return The current node used as the RightOperand child. * @apilevel high-level * @ast method * */ public Expr getRightOperand() { return (Expr)getChild(1); } /** * Retrieves the RightOperand child. * <p><em>This method does not invoke AST transformations.</em></p> * @return The current node used as the RightOperand child. * @apilevel low-level * @ast method * */ public Expr getRightOperandNoTransform() { return (Expr)getChildNoTransform(1); } /** * @attribute syn * @aspect ConstantExpression * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/ConstantExpression.jrag:91 */ public Constant constant() { ASTNode$State state = state(); try { return type().rshift(getLeftOperand().constant(), getRightOperand().constant()); } finally { } } /** * @attribute syn * @aspect PrettyPrint * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/PrettyPrint.jadd:400 */ public String printOp() { ASTNode$State state = state(); try { return " >> "; } finally { } } /** * @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); } }
5,836
23.944444
113
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/RawClassDecl.java
/* This file was generated with JastAdd2 (http://jastadd.org) version R20130212 (r1031) */ package soot.JastAddJ; import java.util.HashSet; 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; /** * @production RawClassDecl : {@link ParClassDecl} ::= <span class="component">Argument:{@link Access}*</span>; * @ast node * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.ast:7 */ public class RawClassDecl extends ParClassDecl implements Cloneable { /** * @apilevel low-level */ public void flushCache() { super.flushCache(); getArgumentList_computed = false; getArgumentList_value = null; subtype_TypeDecl_values = null; instanceOf_TypeDecl_values = null; } /** * @apilevel internal */ public void flushCollectionCache() { super.flushCollectionCache(); } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public RawClassDecl clone() throws CloneNotSupportedException { RawClassDecl node = (RawClassDecl)super.clone(); node.getArgumentList_computed = false; node.getArgumentList_value = null; node.subtype_TypeDecl_values = null; node.instanceOf_TypeDecl_values = null; node.in$Circle(false); node.is$Final(false); return node; } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public RawClassDecl copy() { try { RawClassDecl node = (RawClassDecl) clone(); node.parent = null; if(children != null) node.children = (ASTNode[]) children.clone(); return node; } catch (CloneNotSupportedException e) { throw new Error("Error: clone not supported for " + getClass().getName()); } } /** * Create a deep copy of the AST subtree at this node. * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level */ @SuppressWarnings({"unchecked", "cast"}) public RawClassDecl fullCopy() { RawClassDecl tree = (RawClassDecl) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { switch (i) { case 2: tree.children[i] = new Opt(); continue; case 3: case 4: case 5: tree.children[i] = new List(); continue; } ASTNode child = (ASTNode) children[i]; if(child != null) { child = child.fullCopy(); tree.setChild(child, i); } } } return tree; } /** * @ast method * @aspect LookupParTypeDecl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:899 */ public Access substitute(Parameterization parTypeDecl) { return createBoundAccess(); } /** * @ast method * @aspect LookupParTypeDecl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:954 */ public Access substituteReturnType(Parameterization parTypeDecl) { return createBoundAccess(); } /** * @ast method * @aspect LookupParTypeDecl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:974 */ public Access substituteParameterType(Parameterization parTypeDecl) { return createBoundAccess(); } /** * @ast method * */ public RawClassDecl() { super(); } /** * Initializes the child array to the correct size. * Initializes List and Opt nta children. * @apilevel internal * @ast method * @ast method * */ public void init$Children() { children = new ASTNode[5]; setChild(new Opt(), 1); setChild(new List(), 2); setChild(new List(), 3); setChild(new List(), 4); } /** * @ast method * */ public RawClassDecl(Modifiers p0, String p1) { setChild(p0, 0); setID(p1); } /** * @ast method * */ public RawClassDecl(Modifiers p0, beaver.Symbol p1) { setChild(p0, 0); setID(p1); } /** * @apilevel low-level * @ast method * */ protected int numChildren() { return 1; } /** * @apilevel internal * @ast method * */ public boolean mayHaveRewrite() { return false; } /** * Replaces the Modifiers child. * @param node The new node to replace the Modifiers child. * @apilevel high-level * @ast method * */ public void setModifiers(Modifiers node) { setChild(node, 0); } /** * Retrieves the Modifiers child. * @return The current node used as the Modifiers child. * @apilevel high-level * @ast method * */ public Modifiers getModifiers() { return (Modifiers)getChild(0); } /** * Retrieves the Modifiers child. * <p><em>This method does not invoke AST transformations.</em></p> * @return The current node used as the Modifiers child. * @apilevel low-level * @ast method * */ public Modifiers getModifiersNoTransform() { return (Modifiers)getChildNoTransform(0); } /** * Replaces the lexeme ID. * @param value The new value for the lexeme ID. * @apilevel high-level * @ast method * */ public void setID(String value) { tokenString_ID = value; } /** * JastAdd-internal setter for lexeme ID using the Beaver parser. * @apilevel internal * @ast method * */ 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(); } /** * Retrieves the value for the lexeme ID. * @return The value for the lexeme ID. * @apilevel high-level * @ast method * */ public String getID() { return tokenString_ID != null ? tokenString_ID : ""; } /** * Replaces the optional node for the SuperClassAccess child. This is the {@code Opt} node containing the child SuperClassAccess, not the actual child! * @param opt The new node to be used as the optional node for the SuperClassAccess child. * @apilevel low-level * @ast method * */ public void setSuperClassAccessOpt(Opt<Access> opt) { setChild(opt, 1); } /** * Check whether the optional SuperClassAccess child exists. * @return {@code true} if the optional SuperClassAccess child exists, {@code false} if it does not. * @apilevel high-level * @ast method * */ public boolean hasSuperClassAccess() { return getSuperClassAccessOpt().getNumChild() != 0; } /** * Retrieves the (optional) SuperClassAccess child. * @return The SuperClassAccess child, if it exists. Returns {@code null} otherwise. * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public Access getSuperClassAccess() { return (Access)getSuperClassAccessOpt().getChild(0); } /** * Replaces the (optional) SuperClassAccess child. * @param node The new node to be used as the SuperClassAccess child. * @apilevel high-level * @ast method * */ public void setSuperClassAccess(Access node) { getSuperClassAccessOpt().setChild(node, 0); } /** * Retrieves the optional node for child SuperClassAccess. This is the {@code Opt} node containing the child SuperClassAccess, not the actual child! * <p><em>This method does not invoke AST transformations.</em></p> * @return The optional node for child SuperClassAccess. * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public Opt<Access> getSuperClassAccessOptNoTransform() { return (Opt<Access>)getChildNoTransform(1); } /** * Retrieves the child position of the optional child SuperClassAccess. * @return The the child position of the optional child SuperClassAccess. * @apilevel low-level * @ast method * */ protected int getSuperClassAccessOptChildPosition() { return 1; } /** * Replaces the Implements list. * @param list The new list node to be used as the Implements list. * @apilevel high-level * @ast method * */ public void setImplementsList(List<Access> list) { setChild(list, 2); } /** * Retrieves the number of children in the Implements list. * @return Number of children in the Implements list. * @apilevel high-level * @ast method * */ public int getNumImplements() { return getImplementsList().getNumChild(); } /** * Retrieves the number of children in the Implements list. * Calling this method will not trigger rewrites.. * @return Number of children in the Implements list. * @apilevel low-level * @ast method * */ public int getNumImplementsNoTransform() { return getImplementsListNoTransform().getNumChildNoTransform(); } /** * Retrieves the element at index {@code i} in the Implements list.. * @param i Index of the element to return. * @return The element at position {@code i} in the Implements list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public Access getImplements(int i) { return (Access)getImplementsList().getChild(i); } /** * Append an element to the Implements list. * @param node The element to append to the Implements list. * @apilevel high-level * @ast method * */ public void addImplements(Access node) { List<Access> list = (parent == null || state == null) ? getImplementsListNoTransform() : getImplementsList(); list.addChild(node); } /** * @apilevel low-level * @ast method * */ public void addImplementsNoTransform(Access node) { List<Access> list = getImplementsListNoTransform(); list.addChild(node); } /** * Replaces the Implements list element at index {@code i} with the new node {@code node}. * @param node The new node to replace the old list element. * @param i The list index of the node to be replaced. * @apilevel high-level * @ast method * */ public void setImplements(Access node, int i) { List<Access> list = getImplementsList(); list.setChild(node, i); } /** * Retrieves the Implements list. * @return The node representing the Implements list. * @apilevel high-level * @ast method * */ public List<Access> getImplementss() { return getImplementsList(); } /** * Retrieves the Implements list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the Implements list. * @apilevel low-level * @ast method * */ public List<Access> getImplementssNoTransform() { return getImplementsListNoTransform(); } /** * Retrieves the Implements list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the Implements list. * @apilevel low-level * @ast method * */ public List<Access> getImplementsListNoTransform() { return (List<Access>)getChildNoTransform(2); } /** * Retrieves the child position of the Implements list. * @return The the child position of the Implements list. * @apilevel low-level * @ast method * */ protected int getImplementsListChildPosition() { return 2; } /** * Replaces the BodyDecl list. * @param list The new list node to be used as the BodyDecl list. * @apilevel high-level * @ast method * */ public void setBodyDeclList(List<BodyDecl> list) { setChild(list, 3); } /** * Retrieves the number of children in the BodyDecl list. * @return Number of children in the BodyDecl list. * @apilevel high-level * @ast method * */ public int getNumBodyDecl() { return getBodyDeclList().getNumChild(); } /** * Retrieves the number of children in the BodyDecl list. * Calling this method will not trigger rewrites.. * @return Number of children in the BodyDecl list. * @apilevel low-level * @ast method * */ public int getNumBodyDeclNoTransform() { return getBodyDeclListNoTransform().getNumChildNoTransform(); } /** * Retrieves the element at index {@code i} in the BodyDecl list.. * @param i Index of the element to return. * @return The element at position {@code i} in the BodyDecl list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public BodyDecl getBodyDecl(int i) { return (BodyDecl)getBodyDeclList().getChild(i); } /** * Append an element to the BodyDecl list. * @param node The element to append to the BodyDecl list. * @apilevel high-level * @ast method * */ public void addBodyDecl(BodyDecl node) { List<BodyDecl> list = (parent == null || state == null) ? getBodyDeclListNoTransform() : getBodyDeclList(); list.addChild(node); } /** * @apilevel low-level * @ast method * */ public void addBodyDeclNoTransform(BodyDecl node) { List<BodyDecl> list = getBodyDeclListNoTransform(); list.addChild(node); } /** * Replaces the BodyDecl list element at index {@code i} with the new node {@code node}. * @param node The new node to replace the old list element. * @param i The list index of the node to be replaced. * @apilevel high-level * @ast method * */ public void setBodyDecl(BodyDecl node, int i) { List<BodyDecl> list = getBodyDeclList(); list.setChild(node, i); } /** * Retrieves the BodyDecl list. * @return The node representing the BodyDecl list. * @apilevel high-level * @ast method * */ public List<BodyDecl> getBodyDecls() { return getBodyDeclList(); } /** * Retrieves the BodyDecl list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the BodyDecl list. * @apilevel low-level * @ast method * */ public List<BodyDecl> getBodyDeclsNoTransform() { return getBodyDeclListNoTransform(); } /** * Retrieves the BodyDecl list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the BodyDecl list. * @apilevel low-level * @ast method * */ public List<BodyDecl> getBodyDeclListNoTransform() { return (List<BodyDecl>)getChildNoTransform(3); } /** * Retrieves the child position of the BodyDecl list. * @return The the child position of the BodyDecl list. * @apilevel low-level * @ast method * */ protected int getBodyDeclListChildPosition() { return 3; } /** * Replaces the Argument list. * @param list The new list node to be used as the Argument list. * @apilevel high-level * @ast method * */ public void setArgumentList(List<Access> list) { setChild(list, 4); } /** * Retrieves the number of children in the Argument list. * @return Number of children in the Argument list. * @apilevel high-level * @ast method * */ public int getNumArgument() { return getArgumentList().getNumChild(); } /** * Retrieves the number of children in the Argument list. * Calling this method will not trigger rewrites.. * @return Number of children in the Argument list. * @apilevel low-level * @ast method * */ public int getNumArgumentNoTransform() { return getArgumentListNoTransform().getNumChildNoTransform(); } /** * Retrieves the element at index {@code i} in the Argument list.. * @param i Index of the element to return. * @return The element at position {@code i} in the Argument list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public Access getArgument(int i) { return (Access)getArgumentList().getChild(i); } /** * Append an element to the Argument list. * @param node The element to append to the Argument list. * @apilevel high-level * @ast method * */ public void addArgument(Access node) { List<Access> list = (parent == null || state == null) ? getArgumentListNoTransform() : getArgumentList(); list.addChild(node); } /** * @apilevel low-level * @ast method * */ public void addArgumentNoTransform(Access node) { List<Access> list = getArgumentListNoTransform(); list.addChild(node); } /** * Replaces the Argument list element at index {@code i} with the new node {@code node}. * @param node The new node to replace the old list element. * @param i The list index of the node to be replaced. * @apilevel high-level * @ast method * */ public void setArgument(Access node, int i) { List<Access> list = getArgumentList(); list.setChild(node, i); } /** * Retrieves the Argument list. * @return The node representing the Argument list. * @apilevel high-level * @ast method * */ public List<Access> getArguments() { return getArgumentList(); } /** * Retrieves the Argument list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the Argument list. * @apilevel low-level * @ast method * */ public List<Access> getArgumentsNoTransform() { return getArgumentListNoTransform(); } /** * Retrieves the Argument list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the Argument list. * @apilevel low-level * @ast method * */ public List<Access> getArgumentListNoTransform() { return (List<Access>)getChildNoTransform(4); } /** * Retrieves the child position of the Argument list. * @return The the child position of the Argument list. * @apilevel low-level * @ast method * */ protected int getArgumentListChildPosition() { return 4; } /** * @attribute syn * @aspect NestedTypes * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeAnalysis.jrag:569 */ public TypeDecl hostType() { ASTNode$State state = state(); try { return original(); } finally { } } /** * @attribute syn * @aspect Generics * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:245 */ public boolean isRawType() { ASTNode$State state = state(); try { return true; } finally { } } /** * @attribute syn * @aspect LookupParTypeDecl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:577 */ public boolean sameSignature(Access a) { ASTNode$State state = state(); try { return a instanceof TypeAccess && a.type() == this; } finally { } } /** * @apilevel internal */ protected boolean getArgumentList_computed = false; /** * @apilevel internal */ protected List getArgumentList_value; /** * @attribute syn nta * @aspect LookupParTypeDecl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:755 */ @SuppressWarnings({"unchecked", "cast"}) public List getArgumentList() { if(getArgumentList_computed) { return (List) getChild(getArgumentListChildPosition()); } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); getArgumentList_value = getArgumentList_compute(); setArgumentList(getArgumentList_value); if(true) getArgumentList_computed = true; return (List) getChild(getArgumentListChildPosition()); } /** * @apilevel internal */ private List getArgumentList_compute() { return ((GenericClassDecl)genericDecl()).createArgumentList(new ArrayList()); } /** * @attribute syn * @aspect GenericsParTypeDecl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericsParTypeDecl.jrag:30 */ public String nameWithArgs() { ASTNode$State state = state(); try { return name(); } finally { } } /** * @attribute syn * @aspect GenericsSubtype * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericsSubtype.jrag:14 */ public boolean supertypeGenericClassDecl(GenericClassDecl type) { ASTNode$State state = state(); try { return type.subtype(genericDecl().original()); } finally { } } protected java.util.Map subtype_TypeDecl_values; /** * @attribute syn * @aspect GenericsSubtype * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericsSubtype.jrag:25 */ @SuppressWarnings({"unchecked", "cast"}) public boolean subtype(TypeDecl type) { Object _parameters = type; if(subtype_TypeDecl_values == null) subtype_TypeDecl_values = new java.util.HashMap(4); ASTNode$State.CircularValue _value; if(subtype_TypeDecl_values.containsKey(_parameters)) { Object _o = subtype_TypeDecl_values.get(_parameters); if(!(_o instanceof ASTNode$State.CircularValue)) { return ((Boolean)_o).booleanValue(); } else _value = (ASTNode$State.CircularValue)_o; } else { _value = new ASTNode$State.CircularValue(); subtype_TypeDecl_values.put(_parameters, _value); _value.value = Boolean.valueOf(true); } ASTNode$State state = state(); if (!state.IN_CIRCLE) { state.IN_CIRCLE = true; int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); boolean new_subtype_TypeDecl_value; do { _value.visited = new Integer(state.CIRCLE_INDEX); state.CHANGE = false; new_subtype_TypeDecl_value = subtype_compute(type); if (new_subtype_TypeDecl_value!=((Boolean)_value.value).booleanValue()) { state.CHANGE = true; _value.value = Boolean.valueOf(new_subtype_TypeDecl_value); } state.CIRCLE_INDEX++; } while (state.CHANGE); if(isFinal && num == state().boundariesCrossed) { subtype_TypeDecl_values.put(_parameters, new_subtype_TypeDecl_value); } else { subtype_TypeDecl_values.remove(_parameters); state.RESET_CYCLE = true; subtype_compute(type); state.RESET_CYCLE = false; } state.IN_CIRCLE = false; return new_subtype_TypeDecl_value; } if(!new Integer(state.CIRCLE_INDEX).equals(_value.visited)) { _value.visited = new Integer(state.CIRCLE_INDEX); boolean new_subtype_TypeDecl_value = subtype_compute(type); if (state.RESET_CYCLE) { subtype_TypeDecl_values.remove(_parameters); } else if (new_subtype_TypeDecl_value!=((Boolean)_value.value).booleanValue()) { state.CHANGE = true; _value.value = new_subtype_TypeDecl_value; } return new_subtype_TypeDecl_value; } return ((Boolean)_value.value).booleanValue(); } /** * @apilevel internal */ private boolean subtype_compute(TypeDecl type) { return type.supertypeRawClassDecl(this); } /** * @attribute syn * @aspect GenericsSubtype * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericsSubtype.jrag:421 */ public boolean supertypeClassDecl(ClassDecl type) { ASTNode$State state = state(); try { return type.subtype(genericDecl().original()); } finally { } } /** * @attribute syn * @aspect GenericsSubtype * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericsSubtype.jrag:437 */ public boolean supertypeInterfaceDecl(InterfaceDecl type) { ASTNode$State state = state(); try { return type.subtype(genericDecl().original()); } finally { } } /** * @attribute syn * @aspect GenericsSubtype * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericsSubtype.jrag:125 */ public boolean supertypeParClassDecl(ParClassDecl type) { ASTNode$State state = state(); try { return type.genericDecl().original().subtype(genericDecl().original()); } finally { } } protected java.util.Map instanceOf_TypeDecl_values; /** * @attribute syn * @aspect GenericsSubtype * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericsSubtype.jrag:397 */ @SuppressWarnings({"unchecked", "cast"}) public boolean instanceOf(TypeDecl type) { Object _parameters = type; if(instanceOf_TypeDecl_values == null) instanceOf_TypeDecl_values = new java.util.HashMap(4); if(instanceOf_TypeDecl_values.containsKey(_parameters)) { return ((Boolean)instanceOf_TypeDecl_values.get(_parameters)).booleanValue(); } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); boolean instanceOf_TypeDecl_value = instanceOf_compute(type); if(isFinal && num == state().boundariesCrossed) instanceOf_TypeDecl_values.put(_parameters, Boolean.valueOf(instanceOf_TypeDecl_value)); return instanceOf_TypeDecl_value; } /** * @apilevel internal */ private boolean instanceOf_compute(TypeDecl type) { return subtype(type); } /** * @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); } }
25,768
28.483982
153
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/RawConstructorDecl.java
/* This file was generated with JastAdd2 (http://jastadd.org) version R20130212 (r1031) */ package soot.JastAddJ; import java.util.HashSet; 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; /** * @production RawConstructorDecl : {@link ParConstructorDecl}; * @ast node * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericMethods.ast:11 */ public class RawConstructorDecl extends ParConstructorDecl implements Cloneable { /** * @apilevel low-level */ public void flushCache() { super.flushCache(); } /** * @apilevel internal */ public void flushCollectionCache() { super.flushCollectionCache(); } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public RawConstructorDecl clone() throws CloneNotSupportedException { RawConstructorDecl node = (RawConstructorDecl)super.clone(); node.in$Circle(false); node.is$Final(false); return node; } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public RawConstructorDecl copy() { try { RawConstructorDecl node = (RawConstructorDecl) clone(); node.parent = null; if(children != null) node.children = (ASTNode[]) children.clone(); return node; } catch (CloneNotSupportedException e) { throw new Error("Error: clone not supported for " + getClass().getName()); } } /** * Create a deep copy of the AST subtree at this node. * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level */ @SuppressWarnings({"unchecked", "cast"}) public RawConstructorDecl fullCopy() { RawConstructorDecl tree = (RawConstructorDecl) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) children[i]; if(child != null) { child = child.fullCopy(); tree.setChild(child, i); } } } return tree; } /** * @ast method * */ public RawConstructorDecl() { super(); } /** * Initializes the child array to the correct size. * Initializes List and Opt nta children. * @apilevel internal * @ast method * @ast method * */ public void init$Children() { children = new ASTNode[6]; setChild(new List(), 1); setChild(new List(), 2); setChild(new Opt(), 3); setChild(new List(), 5); } /** * @ast method * */ public RawConstructorDecl(Modifiers p0, String p1, List<ParameterDeclaration> p2, List<Access> p3, Opt<Stmt> p4, Block p5, List<Access> p6) { setChild(p0, 0); setID(p1); setChild(p2, 1); setChild(p3, 2); setChild(p4, 3); setChild(p5, 4); setChild(p6, 5); } /** * @ast method * */ public RawConstructorDecl(Modifiers p0, beaver.Symbol p1, List<ParameterDeclaration> p2, List<Access> p3, Opt<Stmt> p4, Block p5, List<Access> p6) { setChild(p0, 0); setID(p1); setChild(p2, 1); setChild(p3, 2); setChild(p4, 3); setChild(p5, 4); setChild(p6, 5); } /** * @apilevel low-level * @ast method * */ protected int numChildren() { return 6; } /** * @apilevel internal * @ast method * */ public boolean mayHaveRewrite() { return true; } /** * Replaces the Modifiers child. * @param node The new node to replace the Modifiers child. * @apilevel high-level * @ast method * */ public void setModifiers(Modifiers node) { setChild(node, 0); } /** * Retrieves the Modifiers child. * @return The current node used as the Modifiers child. * @apilevel high-level * @ast method * */ public Modifiers getModifiers() { return (Modifiers)getChild(0); } /** * Retrieves the Modifiers child. * <p><em>This method does not invoke AST transformations.</em></p> * @return The current node used as the Modifiers child. * @apilevel low-level * @ast method * */ public Modifiers getModifiersNoTransform() { return (Modifiers)getChildNoTransform(0); } /** * Replaces the lexeme ID. * @param value The new value for the lexeme ID. * @apilevel high-level * @ast method * */ public void setID(String value) { tokenString_ID = value; } /** * JastAdd-internal setter for lexeme ID using the Beaver parser. * @apilevel internal * @ast method * */ 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(); } /** * Retrieves the value for the lexeme ID. * @return The value for the lexeme ID. * @apilevel high-level * @ast method * */ public String getID() { return tokenString_ID != null ? tokenString_ID : ""; } /** * Replaces the Parameter list. * @param list The new list node to be used as the Parameter list. * @apilevel high-level * @ast method * */ public void setParameterList(List<ParameterDeclaration> list) { setChild(list, 1); } /** * Retrieves the number of children in the Parameter list. * @return Number of children in the Parameter list. * @apilevel high-level * @ast method * */ public int getNumParameter() { return getParameterList().getNumChild(); } /** * Retrieves the number of children in the Parameter list. * Calling this method will not trigger rewrites.. * @return Number of children in the Parameter list. * @apilevel low-level * @ast method * */ public int getNumParameterNoTransform() { return getParameterListNoTransform().getNumChildNoTransform(); } /** * Retrieves the element at index {@code i} in the Parameter list.. * @param i Index of the element to return. * @return The element at position {@code i} in the Parameter list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public ParameterDeclaration getParameter(int i) { return (ParameterDeclaration)getParameterList().getChild(i); } /** * Append an element to the Parameter list. * @param node The element to append to the Parameter list. * @apilevel high-level * @ast method * */ public void addParameter(ParameterDeclaration node) { List<ParameterDeclaration> list = (parent == null || state == null) ? getParameterListNoTransform() : getParameterList(); list.addChild(node); } /** * @apilevel low-level * @ast method * */ public void addParameterNoTransform(ParameterDeclaration node) { List<ParameterDeclaration> list = getParameterListNoTransform(); list.addChild(node); } /** * Replaces the Parameter list element at index {@code i} with the new node {@code node}. * @param node The new node to replace the old list element. * @param i The list index of the node to be replaced. * @apilevel high-level * @ast method * */ public void setParameter(ParameterDeclaration node, int i) { List<ParameterDeclaration> list = getParameterList(); list.setChild(node, i); } /** * Retrieves the Parameter list. * @return The node representing the Parameter list. * @apilevel high-level * @ast method * */ public List<ParameterDeclaration> getParameters() { return getParameterList(); } /** * Retrieves the Parameter list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the Parameter list. * @apilevel low-level * @ast method * */ public List<ParameterDeclaration> getParametersNoTransform() { return getParameterListNoTransform(); } /** * Retrieves the Parameter list. * @return The node representing the Parameter list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<ParameterDeclaration> getParameterList() { List<ParameterDeclaration> list = (List<ParameterDeclaration>)getChild(1); list.getNumChild(); return list; } /** * Retrieves the Parameter list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the Parameter list. * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<ParameterDeclaration> getParameterListNoTransform() { return (List<ParameterDeclaration>)getChildNoTransform(1); } /** * Replaces the Exception list. * @param list The new list node to be used as the Exception list. * @apilevel high-level * @ast method * */ public void setExceptionList(List<Access> list) { setChild(list, 2); } /** * Retrieves the number of children in the Exception list. * @return Number of children in the Exception list. * @apilevel high-level * @ast method * */ public int getNumException() { return getExceptionList().getNumChild(); } /** * Retrieves the number of children in the Exception list. * Calling this method will not trigger rewrites.. * @return Number of children in the Exception list. * @apilevel low-level * @ast method * */ public int getNumExceptionNoTransform() { return getExceptionListNoTransform().getNumChildNoTransform(); } /** * Retrieves the element at index {@code i} in the Exception list.. * @param i Index of the element to return. * @return The element at position {@code i} in the Exception list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public Access getException(int i) { return (Access)getExceptionList().getChild(i); } /** * Append an element to the Exception list. * @param node The element to append to the Exception list. * @apilevel high-level * @ast method * */ public void addException(Access node) { List<Access> list = (parent == null || state == null) ? getExceptionListNoTransform() : getExceptionList(); list.addChild(node); } /** * @apilevel low-level * @ast method * */ public void addExceptionNoTransform(Access node) { List<Access> list = getExceptionListNoTransform(); list.addChild(node); } /** * Replaces the Exception list element at index {@code i} with the new node {@code node}. * @param node The new node to replace the old list element. * @param i The list index of the node to be replaced. * @apilevel high-level * @ast method * */ public void setException(Access node, int i) { List<Access> list = getExceptionList(); list.setChild(node, i); } /** * Retrieves the Exception list. * @return The node representing the Exception list. * @apilevel high-level * @ast method * */ public List<Access> getExceptions() { return getExceptionList(); } /** * Retrieves the Exception list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the Exception list. * @apilevel low-level * @ast method * */ public List<Access> getExceptionsNoTransform() { return getExceptionListNoTransform(); } /** * Retrieves the Exception list. * @return The node representing the Exception list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<Access> getExceptionList() { List<Access> list = (List<Access>)getChild(2); list.getNumChild(); return list; } /** * Retrieves the Exception list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the Exception list. * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<Access> getExceptionListNoTransform() { return (List<Access>)getChildNoTransform(2); } /** * Replaces the optional node for the ConstructorInvocation child. This is the {@code Opt} node containing the child ConstructorInvocation, not the actual child! * @param opt The new node to be used as the optional node for the ConstructorInvocation child. * @apilevel low-level * @ast method * */ public void setConstructorInvocationOpt(Opt<Stmt> opt) { setChild(opt, 3); } /** * Check whether the optional ConstructorInvocation child exists. * @return {@code true} if the optional ConstructorInvocation child exists, {@code false} if it does not. * @apilevel high-level * @ast method * */ public boolean hasConstructorInvocation() { return getConstructorInvocationOpt().getNumChild() != 0; } /** * Retrieves the (optional) ConstructorInvocation child. * @return The ConstructorInvocation child, if it exists. Returns {@code null} otherwise. * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public Stmt getConstructorInvocation() { return (Stmt)getConstructorInvocationOpt().getChild(0); } /** * Replaces the (optional) ConstructorInvocation child. * @param node The new node to be used as the ConstructorInvocation child. * @apilevel high-level * @ast method * */ public void setConstructorInvocation(Stmt node) { getConstructorInvocationOpt().setChild(node, 0); } /** * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public Opt<Stmt> getConstructorInvocationOpt() { return (Opt<Stmt>)getChild(3); } /** * Retrieves the optional node for child ConstructorInvocation. This is the {@code Opt} node containing the child ConstructorInvocation, not the actual child! * <p><em>This method does not invoke AST transformations.</em></p> * @return The optional node for child ConstructorInvocation. * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public Opt<Stmt> getConstructorInvocationOptNoTransform() { return (Opt<Stmt>)getChildNoTransform(3); } /** * Replaces the Block child. * @param node The new node to replace the Block child. * @apilevel high-level * @ast method * */ public void setBlock(Block node) { setChild(node, 4); } /** * Retrieves the Block child. * @return The current node used as the Block child. * @apilevel high-level * @ast method * */ public Block getBlock() { return (Block)getChild(4); } /** * Retrieves the Block child. * <p><em>This method does not invoke AST transformations.</em></p> * @return The current node used as the Block child. * @apilevel low-level * @ast method * */ public Block getBlockNoTransform() { return (Block)getChildNoTransform(4); } /** * Replaces the TypeArgument list. * @param list The new list node to be used as the TypeArgument list. * @apilevel high-level * @ast method * */ public void setTypeArgumentList(List<Access> list) { setChild(list, 5); } /** * Retrieves the number of children in the TypeArgument list. * @return Number of children in the TypeArgument list. * @apilevel high-level * @ast method * */ public int getNumTypeArgument() { return getTypeArgumentList().getNumChild(); } /** * Retrieves the number of children in the TypeArgument list. * Calling this method will not trigger rewrites.. * @return Number of children in the TypeArgument list. * @apilevel low-level * @ast method * */ public int getNumTypeArgumentNoTransform() { return getTypeArgumentListNoTransform().getNumChildNoTransform(); } /** * Retrieves the element at index {@code i} in the TypeArgument list.. * @param i Index of the element to return. * @return The element at position {@code i} in the TypeArgument list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public Access getTypeArgument(int i) { return (Access)getTypeArgumentList().getChild(i); } /** * Append an element to the TypeArgument list. * @param node The element to append to the TypeArgument list. * @apilevel high-level * @ast method * */ public void addTypeArgument(Access node) { List<Access> list = (parent == null || state == null) ? getTypeArgumentListNoTransform() : getTypeArgumentList(); list.addChild(node); } /** * @apilevel low-level * @ast method * */ public void addTypeArgumentNoTransform(Access node) { List<Access> list = getTypeArgumentListNoTransform(); list.addChild(node); } /** * Replaces the TypeArgument list element at index {@code i} with the new node {@code node}. * @param node The new node to replace the old list element. * @param i The list index of the node to be replaced. * @apilevel high-level * @ast method * */ public void setTypeArgument(Access node, int i) { List<Access> list = getTypeArgumentList(); list.setChild(node, i); } /** * Retrieves the TypeArgument list. * @return The node representing the TypeArgument list. * @apilevel high-level * @ast method * */ public List<Access> getTypeArguments() { return getTypeArgumentList(); } /** * Retrieves the TypeArgument list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the TypeArgument list. * @apilevel low-level * @ast method * */ public List<Access> getTypeArgumentsNoTransform() { return getTypeArgumentListNoTransform(); } /** * Retrieves the TypeArgument list. * @return The node representing the TypeArgument list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<Access> getTypeArgumentList() { List<Access> list = (List<Access>)getChild(5); list.getNumChild(); return list; } /** * Retrieves the TypeArgument list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the TypeArgument list. * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<Access> getTypeArgumentListNoTransform() { return (List<Access>)getChildNoTransform(5); } /** * @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); } }
18,997
27.020649
163
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/RawInterfaceDecl.java
/* This file was generated with JastAdd2 (http://jastadd.org) version R20130212 (r1031) */ package soot.JastAddJ; import java.util.HashSet; 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; /** * @production RawInterfaceDecl : {@link ParInterfaceDecl} ::= <span class="component">Argument:{@link Access}*</span>; * @ast node * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.ast:10 */ public class RawInterfaceDecl extends ParInterfaceDecl implements Cloneable { /** * @apilevel low-level */ public void flushCache() { super.flushCache(); getArgumentList_computed = false; getArgumentList_value = null; subtype_TypeDecl_values = null; instanceOf_TypeDecl_values = null; } /** * @apilevel internal */ public void flushCollectionCache() { super.flushCollectionCache(); } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public RawInterfaceDecl clone() throws CloneNotSupportedException { RawInterfaceDecl node = (RawInterfaceDecl)super.clone(); node.getArgumentList_computed = false; node.getArgumentList_value = null; node.subtype_TypeDecl_values = null; node.instanceOf_TypeDecl_values = null; node.in$Circle(false); node.is$Final(false); return node; } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public RawInterfaceDecl copy() { try { RawInterfaceDecl node = (RawInterfaceDecl) clone(); node.parent = null; if(children != null) node.children = (ASTNode[]) children.clone(); return node; } catch (CloneNotSupportedException e) { throw new Error("Error: clone not supported for " + getClass().getName()); } } /** * Create a deep copy of the AST subtree at this node. * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level */ @SuppressWarnings({"unchecked", "cast"}) public RawInterfaceDecl fullCopy() { RawInterfaceDecl tree = (RawInterfaceDecl) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { switch (i) { case 2: case 3: case 4: tree.children[i] = new List(); continue; } ASTNode child = (ASTNode) children[i]; if(child != null) { child = child.fullCopy(); tree.setChild(child, i); } } } return tree; } /** * @ast method * @aspect LookupParTypeDecl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:900 */ public Access substitute(Parameterization parTypeDecl) { return createBoundAccess(); } /** * @ast method * @aspect LookupParTypeDecl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:955 */ public Access substituteReturnType(Parameterization parTypeDecl) { return createBoundAccess(); } /** * @ast method * @aspect LookupParTypeDecl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:975 */ public Access substituteParameterType(Parameterization parTypeDecl) { return createBoundAccess(); } /** * @ast method * */ public RawInterfaceDecl() { super(); } /** * Initializes the child array to the correct size. * Initializes List and Opt nta children. * @apilevel internal * @ast method * @ast method * */ public void init$Children() { children = new ASTNode[4]; setChild(new List(), 1); setChild(new List(), 2); setChild(new List(), 3); } /** * @ast method * */ public RawInterfaceDecl(Modifiers p0, String p1) { setChild(p0, 0); setID(p1); } /** * @ast method * */ public RawInterfaceDecl(Modifiers p0, beaver.Symbol p1) { setChild(p0, 0); setID(p1); } /** * @apilevel low-level * @ast method * */ protected int numChildren() { return 1; } /** * @apilevel internal * @ast method * */ public boolean mayHaveRewrite() { return false; } /** * Replaces the Modifiers child. * @param node The new node to replace the Modifiers child. * @apilevel high-level * @ast method * */ public void setModifiers(Modifiers node) { setChild(node, 0); } /** * Retrieves the Modifiers child. * @return The current node used as the Modifiers child. * @apilevel high-level * @ast method * */ public Modifiers getModifiers() { return (Modifiers)getChild(0); } /** * Retrieves the Modifiers child. * <p><em>This method does not invoke AST transformations.</em></p> * @return The current node used as the Modifiers child. * @apilevel low-level * @ast method * */ public Modifiers getModifiersNoTransform() { return (Modifiers)getChildNoTransform(0); } /** * Replaces the lexeme ID. * @param value The new value for the lexeme ID. * @apilevel high-level * @ast method * */ public void setID(String value) { tokenString_ID = value; } /** * JastAdd-internal setter for lexeme ID using the Beaver parser. * @apilevel internal * @ast method * */ 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(); } /** * Retrieves the value for the lexeme ID. * @return The value for the lexeme ID. * @apilevel high-level * @ast method * */ public String getID() { return tokenString_ID != null ? tokenString_ID : ""; } /** * Replaces the SuperInterfaceId list. * @param list The new list node to be used as the SuperInterfaceId list. * @apilevel high-level * @ast method * */ public void setSuperInterfaceIdList(List<Access> list) { setChild(list, 1); } /** * Retrieves the number of children in the SuperInterfaceId list. * @return Number of children in the SuperInterfaceId list. * @apilevel high-level * @ast method * */ public int getNumSuperInterfaceId() { return getSuperInterfaceIdList().getNumChild(); } /** * Retrieves the number of children in the SuperInterfaceId list. * Calling this method will not trigger rewrites.. * @return Number of children in the SuperInterfaceId list. * @apilevel low-level * @ast method * */ public int getNumSuperInterfaceIdNoTransform() { return getSuperInterfaceIdListNoTransform().getNumChildNoTransform(); } /** * Retrieves the element at index {@code i} in the SuperInterfaceId list.. * @param i Index of the element to return. * @return The element at position {@code i} in the SuperInterfaceId list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public Access getSuperInterfaceId(int i) { return (Access)getSuperInterfaceIdList().getChild(i); } /** * Append an element to the SuperInterfaceId list. * @param node The element to append to the SuperInterfaceId list. * @apilevel high-level * @ast method * */ public void addSuperInterfaceId(Access node) { List<Access> list = (parent == null || state == null) ? getSuperInterfaceIdListNoTransform() : getSuperInterfaceIdList(); list.addChild(node); } /** * @apilevel low-level * @ast method * */ public void addSuperInterfaceIdNoTransform(Access node) { List<Access> list = getSuperInterfaceIdListNoTransform(); list.addChild(node); } /** * Replaces the SuperInterfaceId list element at index {@code i} with the new node {@code node}. * @param node The new node to replace the old list element. * @param i The list index of the node to be replaced. * @apilevel high-level * @ast method * */ public void setSuperInterfaceId(Access node, int i) { List<Access> list = getSuperInterfaceIdList(); list.setChild(node, i); } /** * Retrieves the SuperInterfaceId list. * @return The node representing the SuperInterfaceId list. * @apilevel high-level * @ast method * */ public List<Access> getSuperInterfaceIds() { return getSuperInterfaceIdList(); } /** * Retrieves the SuperInterfaceId list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the SuperInterfaceId list. * @apilevel low-level * @ast method * */ public List<Access> getSuperInterfaceIdsNoTransform() { return getSuperInterfaceIdListNoTransform(); } /** * Retrieves the SuperInterfaceId list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the SuperInterfaceId list. * @apilevel low-level * @ast method * */ public List<Access> getSuperInterfaceIdListNoTransform() { return (List<Access>)getChildNoTransform(1); } /** * Retrieves the child position of the SuperInterfaceId list. * @return The the child position of the SuperInterfaceId list. * @apilevel low-level * @ast method * */ protected int getSuperInterfaceIdListChildPosition() { return 1; } /** * Replaces the BodyDecl list. * @param list The new list node to be used as the BodyDecl list. * @apilevel high-level * @ast method * */ public void setBodyDeclList(List<BodyDecl> list) { setChild(list, 2); } /** * Retrieves the number of children in the BodyDecl list. * @return Number of children in the BodyDecl list. * @apilevel high-level * @ast method * */ public int getNumBodyDecl() { return getBodyDeclList().getNumChild(); } /** * Retrieves the number of children in the BodyDecl list. * Calling this method will not trigger rewrites.. * @return Number of children in the BodyDecl list. * @apilevel low-level * @ast method * */ public int getNumBodyDeclNoTransform() { return getBodyDeclListNoTransform().getNumChildNoTransform(); } /** * Retrieves the element at index {@code i} in the BodyDecl list.. * @param i Index of the element to return. * @return The element at position {@code i} in the BodyDecl list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public BodyDecl getBodyDecl(int i) { return (BodyDecl)getBodyDeclList().getChild(i); } /** * Append an element to the BodyDecl list. * @param node The element to append to the BodyDecl list. * @apilevel high-level * @ast method * */ public void addBodyDecl(BodyDecl node) { List<BodyDecl> list = (parent == null || state == null) ? getBodyDeclListNoTransform() : getBodyDeclList(); list.addChild(node); } /** * @apilevel low-level * @ast method * */ public void addBodyDeclNoTransform(BodyDecl node) { List<BodyDecl> list = getBodyDeclListNoTransform(); list.addChild(node); } /** * Replaces the BodyDecl list element at index {@code i} with the new node {@code node}. * @param node The new node to replace the old list element. * @param i The list index of the node to be replaced. * @apilevel high-level * @ast method * */ public void setBodyDecl(BodyDecl node, int i) { List<BodyDecl> list = getBodyDeclList(); list.setChild(node, i); } /** * Retrieves the BodyDecl list. * @return The node representing the BodyDecl list. * @apilevel high-level * @ast method * */ public List<BodyDecl> getBodyDecls() { return getBodyDeclList(); } /** * Retrieves the BodyDecl list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the BodyDecl list. * @apilevel low-level * @ast method * */ public List<BodyDecl> getBodyDeclsNoTransform() { return getBodyDeclListNoTransform(); } /** * Retrieves the BodyDecl list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the BodyDecl list. * @apilevel low-level * @ast method * */ public List<BodyDecl> getBodyDeclListNoTransform() { return (List<BodyDecl>)getChildNoTransform(2); } /** * Retrieves the child position of the BodyDecl list. * @return The the child position of the BodyDecl list. * @apilevel low-level * @ast method * */ protected int getBodyDeclListChildPosition() { return 2; } /** * Replaces the Argument list. * @param list The new list node to be used as the Argument list. * @apilevel high-level * @ast method * */ public void setArgumentList(List<Access> list) { setChild(list, 3); } /** * Retrieves the number of children in the Argument list. * @return Number of children in the Argument list. * @apilevel high-level * @ast method * */ public int getNumArgument() { return getArgumentList().getNumChild(); } /** * Retrieves the number of children in the Argument list. * Calling this method will not trigger rewrites.. * @return Number of children in the Argument list. * @apilevel low-level * @ast method * */ public int getNumArgumentNoTransform() { return getArgumentListNoTransform().getNumChildNoTransform(); } /** * Retrieves the element at index {@code i} in the Argument list.. * @param i Index of the element to return. * @return The element at position {@code i} in the Argument list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public Access getArgument(int i) { return (Access)getArgumentList().getChild(i); } /** * Append an element to the Argument list. * @param node The element to append to the Argument list. * @apilevel high-level * @ast method * */ public void addArgument(Access node) { List<Access> list = (parent == null || state == null) ? getArgumentListNoTransform() : getArgumentList(); list.addChild(node); } /** * @apilevel low-level * @ast method * */ public void addArgumentNoTransform(Access node) { List<Access> list = getArgumentListNoTransform(); list.addChild(node); } /** * Replaces the Argument list element at index {@code i} with the new node {@code node}. * @param node The new node to replace the old list element. * @param i The list index of the node to be replaced. * @apilevel high-level * @ast method * */ public void setArgument(Access node, int i) { List<Access> list = getArgumentList(); list.setChild(node, i); } /** * Retrieves the Argument list. * @return The node representing the Argument list. * @apilevel high-level * @ast method * */ public List<Access> getArguments() { return getArgumentList(); } /** * Retrieves the Argument list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the Argument list. * @apilevel low-level * @ast method * */ public List<Access> getArgumentsNoTransform() { return getArgumentListNoTransform(); } /** * Retrieves the Argument list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the Argument list. * @apilevel low-level * @ast method * */ public List<Access> getArgumentListNoTransform() { return (List<Access>)getChildNoTransform(3); } /** * Retrieves the child position of the Argument list. * @return The the child position of the Argument list. * @apilevel low-level * @ast method * */ protected int getArgumentListChildPosition() { return 3; } /** * @attribute syn * @aspect NestedTypes * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeAnalysis.jrag:569 */ public TypeDecl hostType() { ASTNode$State state = state(); try { return original(); } finally { } } /** * @attribute syn * @aspect Generics * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:245 */ public boolean isRawType() { ASTNode$State state = state(); try { return true; } finally { } } /** * @attribute syn * @aspect LookupParTypeDecl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:577 */ public boolean sameSignature(Access a) { ASTNode$State state = state(); try { return a instanceof TypeAccess && a.type() == this; } finally { } } /** * @apilevel internal */ protected boolean getArgumentList_computed = false; /** * @apilevel internal */ protected List getArgumentList_value; /** * @attribute syn nta * @aspect LookupParTypeDecl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:756 */ @SuppressWarnings({"unchecked", "cast"}) public List getArgumentList() { if(getArgumentList_computed) { return (List) getChild(getArgumentListChildPosition()); } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); getArgumentList_value = getArgumentList_compute(); setArgumentList(getArgumentList_value); if(true) getArgumentList_computed = true; return (List) getChild(getArgumentListChildPosition()); } /** * @apilevel internal */ private List getArgumentList_compute() { return ((GenericInterfaceDecl)genericDecl()).createArgumentList(new ArrayList()); } /** * @attribute syn * @aspect GenericsParTypeDecl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericsParTypeDecl.jrag:30 */ public String nameWithArgs() { ASTNode$State state = state(); try { return name(); } finally { } } /** * @attribute syn * @aspect GenericsSubtype * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericsSubtype.jrag:20 */ public boolean supertypeGenericInterfaceDecl(GenericInterfaceDecl type) { ASTNode$State state = state(); try { return type.subtype(genericDecl().original()); } finally { } } protected java.util.Map subtype_TypeDecl_values; /** * @attribute syn * @aspect GenericsSubtype * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericsSubtype.jrag:29 */ @SuppressWarnings({"unchecked", "cast"}) public boolean subtype(TypeDecl type) { Object _parameters = type; if(subtype_TypeDecl_values == null) subtype_TypeDecl_values = new java.util.HashMap(4); ASTNode$State.CircularValue _value; if(subtype_TypeDecl_values.containsKey(_parameters)) { Object _o = subtype_TypeDecl_values.get(_parameters); if(!(_o instanceof ASTNode$State.CircularValue)) { return ((Boolean)_o).booleanValue(); } else _value = (ASTNode$State.CircularValue)_o; } else { _value = new ASTNode$State.CircularValue(); subtype_TypeDecl_values.put(_parameters, _value); _value.value = Boolean.valueOf(true); } ASTNode$State state = state(); if (!state.IN_CIRCLE) { state.IN_CIRCLE = true; int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); boolean new_subtype_TypeDecl_value; do { _value.visited = new Integer(state.CIRCLE_INDEX); state.CHANGE = false; new_subtype_TypeDecl_value = subtype_compute(type); if (new_subtype_TypeDecl_value!=((Boolean)_value.value).booleanValue()) { state.CHANGE = true; _value.value = Boolean.valueOf(new_subtype_TypeDecl_value); } state.CIRCLE_INDEX++; } while (state.CHANGE); if(isFinal && num == state().boundariesCrossed) { subtype_TypeDecl_values.put(_parameters, new_subtype_TypeDecl_value); } else { subtype_TypeDecl_values.remove(_parameters); state.RESET_CYCLE = true; subtype_compute(type); state.RESET_CYCLE = false; } state.IN_CIRCLE = false; return new_subtype_TypeDecl_value; } if(!new Integer(state.CIRCLE_INDEX).equals(_value.visited)) { _value.visited = new Integer(state.CIRCLE_INDEX); boolean new_subtype_TypeDecl_value = subtype_compute(type); if (state.RESET_CYCLE) { subtype_TypeDecl_values.remove(_parameters); } else if (new_subtype_TypeDecl_value!=((Boolean)_value.value).booleanValue()) { state.CHANGE = true; _value.value = new_subtype_TypeDecl_value; } return new_subtype_TypeDecl_value; } return ((Boolean)_value.value).booleanValue(); } /** * @apilevel internal */ private boolean subtype_compute(TypeDecl type) { return type.supertypeRawInterfaceDecl(this); } /** * @attribute syn * @aspect GenericsSubtype * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericsSubtype.jrag:421 */ public boolean supertypeClassDecl(ClassDecl type) { ASTNode$State state = state(); try { return type.subtype(genericDecl().original()); } finally { } } /** * @attribute syn * @aspect GenericsSubtype * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericsSubtype.jrag:437 */ public boolean supertypeInterfaceDecl(InterfaceDecl type) { ASTNode$State state = state(); try { return type.subtype(genericDecl().original()); } finally { } } /** * @attribute syn * @aspect GenericsSubtype * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericsSubtype.jrag:129 */ public boolean supertypeParInterfaceDecl(ParInterfaceDecl type) { ASTNode$State state = state(); try { return type.genericDecl().original().subtype(genericDecl().original()); } finally { } } protected java.util.Map instanceOf_TypeDecl_values; /** * @attribute syn * @aspect GenericsSubtype * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericsSubtype.jrag:399 */ @SuppressWarnings({"unchecked", "cast"}) public boolean instanceOf(TypeDecl type) { Object _parameters = type; if(instanceOf_TypeDecl_values == null) instanceOf_TypeDecl_values = new java.util.HashMap(4); if(instanceOf_TypeDecl_values.containsKey(_parameters)) { return ((Boolean)instanceOf_TypeDecl_values.get(_parameters)).booleanValue(); } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); boolean instanceOf_TypeDecl_value = instanceOf_compute(type); if(isFinal && num == state().boundariesCrossed) instanceOf_TypeDecl_values.put(_parameters, Boolean.valueOf(instanceOf_TypeDecl_value)); return instanceOf_TypeDecl_value; } /** * @apilevel internal */ private boolean instanceOf_compute(TypeDecl type) { return subtype(type); } /** * @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); } }
23,848
28.552664
142
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/RawMethodDecl.java
/* This file was generated with JastAdd2 (http://jastadd.org) version R20130212 (r1031) */ package soot.JastAddJ; import java.util.HashSet; 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; /** * @production RawMethodDecl : {@link ParMethodDecl}; * @ast node * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericMethods.ast:8 */ public class RawMethodDecl extends ParMethodDecl implements Cloneable { /** * @apilevel low-level */ public void flushCache() { super.flushCache(); } /** * @apilevel internal */ public void flushCollectionCache() { super.flushCollectionCache(); } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public RawMethodDecl clone() throws CloneNotSupportedException { RawMethodDecl node = (RawMethodDecl)super.clone(); node.in$Circle(false); node.is$Final(false); return node; } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public RawMethodDecl copy() { try { RawMethodDecl node = (RawMethodDecl) clone(); node.parent = null; if(children != null) node.children = (ASTNode[]) children.clone(); return node; } catch (CloneNotSupportedException e) { throw new Error("Error: clone not supported for " + getClass().getName()); } } /** * Create a deep copy of the AST subtree at this node. * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level */ @SuppressWarnings({"unchecked", "cast"}) public RawMethodDecl fullCopy() { RawMethodDecl tree = (RawMethodDecl) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) children[i]; if(child != null) { child = child.fullCopy(); tree.setChild(child, i); } } } return tree; } /** * @ast method * @aspect LookupParTypeDecl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:863 */ public boolean isRawType() { return true; } /** * @ast method * */ public RawMethodDecl() { super(); } /** * Initializes the child array to the correct size. * Initializes List and Opt nta children. * @apilevel internal * @ast method * @ast method * */ public void init$Children() { children = new ASTNode[6]; setChild(new List(), 2); setChild(new List(), 3); setChild(new Opt(), 4); setChild(new List(), 5); } /** * @ast method * */ public RawMethodDecl(Modifiers p0, Access p1, String p2, List<ParameterDeclaration> p3, List<Access> p4, Opt<Block> p5, List<Access> p6, GenericMethodDecl p7) { setChild(p0, 0); setChild(p1, 1); setID(p2); setChild(p3, 2); setChild(p4, 3); setChild(p5, 4); setChild(p6, 5); setGenericMethodDecl(p7); } /** * @ast method * */ public RawMethodDecl(Modifiers p0, Access p1, beaver.Symbol p2, List<ParameterDeclaration> p3, List<Access> p4, Opt<Block> p5, List<Access> p6, GenericMethodDecl p7) { setChild(p0, 0); setChild(p1, 1); setID(p2); setChild(p3, 2); setChild(p4, 3); setChild(p5, 4); setChild(p6, 5); setGenericMethodDecl(p7); } /** * @apilevel low-level * @ast method * */ protected int numChildren() { return 6; } /** * @apilevel internal * @ast method * */ public boolean mayHaveRewrite() { return false; } /** * Replaces the Modifiers child. * @param node The new node to replace the Modifiers child. * @apilevel high-level * @ast method * */ public void setModifiers(Modifiers node) { setChild(node, 0); } /** * Retrieves the Modifiers child. * @return The current node used as the Modifiers child. * @apilevel high-level * @ast method * */ public Modifiers getModifiers() { return (Modifiers)getChild(0); } /** * Retrieves the Modifiers child. * <p><em>This method does not invoke AST transformations.</em></p> * @return The current node used as the Modifiers child. * @apilevel low-level * @ast method * */ public Modifiers getModifiersNoTransform() { return (Modifiers)getChildNoTransform(0); } /** * Replaces the TypeAccess child. * @param node The new node to replace the TypeAccess child. * @apilevel high-level * @ast method * */ public void setTypeAccess(Access node) { setChild(node, 1); } /** * Retrieves the TypeAccess child. * @return The current node used as the TypeAccess child. * @apilevel high-level * @ast method * */ public Access getTypeAccess() { return (Access)getChild(1); } /** * Retrieves the TypeAccess child. * <p><em>This method does not invoke AST transformations.</em></p> * @return The current node used as the TypeAccess child. * @apilevel low-level * @ast method * */ public Access getTypeAccessNoTransform() { return (Access)getChildNoTransform(1); } /** * Replaces the lexeme ID. * @param value The new value for the lexeme ID. * @apilevel high-level * @ast method * */ public void setID(String value) { tokenString_ID = value; } /** * JastAdd-internal setter for lexeme ID using the Beaver parser. * @apilevel internal * @ast method * */ 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(); } /** * Retrieves the value for the lexeme ID. * @return The value for the lexeme ID. * @apilevel high-level * @ast method * */ public String getID() { return tokenString_ID != null ? tokenString_ID : ""; } /** * Replaces the Parameter list. * @param list The new list node to be used as the Parameter list. * @apilevel high-level * @ast method * */ public void setParameterList(List<ParameterDeclaration> list) { setChild(list, 2); } /** * Retrieves the number of children in the Parameter list. * @return Number of children in the Parameter list. * @apilevel high-level * @ast method * */ public int getNumParameter() { return getParameterList().getNumChild(); } /** * Retrieves the number of children in the Parameter list. * Calling this method will not trigger rewrites.. * @return Number of children in the Parameter list. * @apilevel low-level * @ast method * */ public int getNumParameterNoTransform() { return getParameterListNoTransform().getNumChildNoTransform(); } /** * Retrieves the element at index {@code i} in the Parameter list.. * @param i Index of the element to return. * @return The element at position {@code i} in the Parameter list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public ParameterDeclaration getParameter(int i) { return (ParameterDeclaration)getParameterList().getChild(i); } /** * Append an element to the Parameter list. * @param node The element to append to the Parameter list. * @apilevel high-level * @ast method * */ public void addParameter(ParameterDeclaration node) { List<ParameterDeclaration> list = (parent == null || state == null) ? getParameterListNoTransform() : getParameterList(); list.addChild(node); } /** * @apilevel low-level * @ast method * */ public void addParameterNoTransform(ParameterDeclaration node) { List<ParameterDeclaration> list = getParameterListNoTransform(); list.addChild(node); } /** * Replaces the Parameter list element at index {@code i} with the new node {@code node}. * @param node The new node to replace the old list element. * @param i The list index of the node to be replaced. * @apilevel high-level * @ast method * */ public void setParameter(ParameterDeclaration node, int i) { List<ParameterDeclaration> list = getParameterList(); list.setChild(node, i); } /** * Retrieves the Parameter list. * @return The node representing the Parameter list. * @apilevel high-level * @ast method * */ public List<ParameterDeclaration> getParameters() { return getParameterList(); } /** * Retrieves the Parameter list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the Parameter list. * @apilevel low-level * @ast method * */ public List<ParameterDeclaration> getParametersNoTransform() { return getParameterListNoTransform(); } /** * Retrieves the Parameter list. * @return The node representing the Parameter list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<ParameterDeclaration> getParameterList() { List<ParameterDeclaration> list = (List<ParameterDeclaration>)getChild(2); list.getNumChild(); return list; } /** * Retrieves the Parameter list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the Parameter list. * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<ParameterDeclaration> getParameterListNoTransform() { return (List<ParameterDeclaration>)getChildNoTransform(2); } /** * Replaces the Exception list. * @param list The new list node to be used as the Exception list. * @apilevel high-level * @ast method * */ public void setExceptionList(List<Access> list) { setChild(list, 3); } /** * Retrieves the number of children in the Exception list. * @return Number of children in the Exception list. * @apilevel high-level * @ast method * */ public int getNumException() { return getExceptionList().getNumChild(); } /** * Retrieves the number of children in the Exception list. * Calling this method will not trigger rewrites.. * @return Number of children in the Exception list. * @apilevel low-level * @ast method * */ public int getNumExceptionNoTransform() { return getExceptionListNoTransform().getNumChildNoTransform(); } /** * Retrieves the element at index {@code i} in the Exception list.. * @param i Index of the element to return. * @return The element at position {@code i} in the Exception list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public Access getException(int i) { return (Access)getExceptionList().getChild(i); } /** * Append an element to the Exception list. * @param node The element to append to the Exception list. * @apilevel high-level * @ast method * */ public void addException(Access node) { List<Access> list = (parent == null || state == null) ? getExceptionListNoTransform() : getExceptionList(); list.addChild(node); } /** * @apilevel low-level * @ast method * */ public void addExceptionNoTransform(Access node) { List<Access> list = getExceptionListNoTransform(); list.addChild(node); } /** * Replaces the Exception list element at index {@code i} with the new node {@code node}. * @param node The new node to replace the old list element. * @param i The list index of the node to be replaced. * @apilevel high-level * @ast method * */ public void setException(Access node, int i) { List<Access> list = getExceptionList(); list.setChild(node, i); } /** * Retrieves the Exception list. * @return The node representing the Exception list. * @apilevel high-level * @ast method * */ public List<Access> getExceptions() { return getExceptionList(); } /** * Retrieves the Exception list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the Exception list. * @apilevel low-level * @ast method * */ public List<Access> getExceptionsNoTransform() { return getExceptionListNoTransform(); } /** * Retrieves the Exception list. * @return The node representing the Exception list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<Access> getExceptionList() { List<Access> list = (List<Access>)getChild(3); list.getNumChild(); return list; } /** * Retrieves the Exception list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the Exception list. * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<Access> getExceptionListNoTransform() { return (List<Access>)getChildNoTransform(3); } /** * Replaces the optional node for the Block child. This is the {@code Opt} node containing the child Block, not the actual child! * @param opt The new node to be used as the optional node for the Block child. * @apilevel low-level * @ast method * */ public void setBlockOpt(Opt<Block> opt) { setChild(opt, 4); } /** * Check whether the optional Block child exists. * @return {@code true} if the optional Block child exists, {@code false} if it does not. * @apilevel high-level * @ast method * */ public boolean hasBlock() { return getBlockOpt().getNumChild() != 0; } /** * Retrieves the (optional) Block child. * @return The Block child, if it exists. Returns {@code null} otherwise. * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public Block getBlock() { return (Block)getBlockOpt().getChild(0); } /** * Replaces the (optional) Block child. * @param node The new node to be used as the Block child. * @apilevel high-level * @ast method * */ public void setBlock(Block node) { getBlockOpt().setChild(node, 0); } /** * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public Opt<Block> getBlockOpt() { return (Opt<Block>)getChild(4); } /** * Retrieves the optional node for child Block. This is the {@code Opt} node containing the child Block, not the actual child! * <p><em>This method does not invoke AST transformations.</em></p> * @return The optional node for child Block. * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public Opt<Block> getBlockOptNoTransform() { return (Opt<Block>)getChildNoTransform(4); } /** * Replaces the TypeArgument list. * @param list The new list node to be used as the TypeArgument list. * @apilevel high-level * @ast method * */ public void setTypeArgumentList(List<Access> list) { setChild(list, 5); } /** * Retrieves the number of children in the TypeArgument list. * @return Number of children in the TypeArgument list. * @apilevel high-level * @ast method * */ public int getNumTypeArgument() { return getTypeArgumentList().getNumChild(); } /** * Retrieves the number of children in the TypeArgument list. * Calling this method will not trigger rewrites.. * @return Number of children in the TypeArgument list. * @apilevel low-level * @ast method * */ public int getNumTypeArgumentNoTransform() { return getTypeArgumentListNoTransform().getNumChildNoTransform(); } /** * Retrieves the element at index {@code i} in the TypeArgument list.. * @param i Index of the element to return. * @return The element at position {@code i} in the TypeArgument list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public Access getTypeArgument(int i) { return (Access)getTypeArgumentList().getChild(i); } /** * Append an element to the TypeArgument list. * @param node The element to append to the TypeArgument list. * @apilevel high-level * @ast method * */ public void addTypeArgument(Access node) { List<Access> list = (parent == null || state == null) ? getTypeArgumentListNoTransform() : getTypeArgumentList(); list.addChild(node); } /** * @apilevel low-level * @ast method * */ public void addTypeArgumentNoTransform(Access node) { List<Access> list = getTypeArgumentListNoTransform(); list.addChild(node); } /** * Replaces the TypeArgument list element at index {@code i} with the new node {@code node}. * @param node The new node to replace the old list element. * @param i The list index of the node to be replaced. * @apilevel high-level * @ast method * */ public void setTypeArgument(Access node, int i) { List<Access> list = getTypeArgumentList(); list.setChild(node, i); } /** * Retrieves the TypeArgument list. * @return The node representing the TypeArgument list. * @apilevel high-level * @ast method * */ public List<Access> getTypeArguments() { return getTypeArgumentList(); } /** * Retrieves the TypeArgument list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the TypeArgument list. * @apilevel low-level * @ast method * */ public List<Access> getTypeArgumentsNoTransform() { return getTypeArgumentListNoTransform(); } /** * Retrieves the TypeArgument list. * @return The node representing the TypeArgument list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<Access> getTypeArgumentList() { List<Access> list = (List<Access>)getChild(5); list.getNumChild(); return list; } /** * Retrieves the TypeArgument list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the TypeArgument list. * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<Access> getTypeArgumentListNoTransform() { return (List<Access>)getChildNoTransform(5); } /** * Replaces the lexeme GenericMethodDecl. * @param value The new value for the lexeme GenericMethodDecl. * @apilevel high-level * @ast method * */ public void setGenericMethodDecl(GenericMethodDecl value) { tokenGenericMethodDecl_GenericMethodDecl = value; } /** * Retrieves the value for the lexeme GenericMethodDecl. * @return The value for the lexeme GenericMethodDecl. * @apilevel high-level * @ast method * */ public GenericMethodDecl getGenericMethodDecl() { return tokenGenericMethodDecl_GenericMethodDecl; } /** * @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); } }
19,544
26.605932
169
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/ReferenceType.java
/* This file was generated with JastAdd2 (http://jastadd.org) version R20130212 (r1031) */ package soot.JastAddJ; import java.util.HashSet; 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; /** * @production ReferenceType : {@link TypeDecl}; * @ast node * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/java.ast:44 */ public abstract class ReferenceType extends TypeDecl implements Cloneable { /** * @apilevel low-level */ public void flushCache() { super.flushCache(); narrowingConversionTo_TypeDecl_values = null; unboxed_computed = false; unboxed_value = null; jvmName_computed = false; jvmName_value = null; } /** * @apilevel internal */ public void flushCollectionCache() { super.flushCollectionCache(); } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public ReferenceType clone() throws CloneNotSupportedException { ReferenceType node = (ReferenceType)super.clone(); node.narrowingConversionTo_TypeDecl_values = null; node.unboxed_computed = false; node.unboxed_value = null; node.jvmName_computed = false; node.jvmName_value = null; node.in$Circle(false); node.is$Final(false); return node; } /** * @ast method * @aspect AutoBoxingCodegen * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/Jimple1.5Backend/AutoBoxingCodegen.jrag:74 */ public soot.Value emitCastTo(Body b, soot.Value v, TypeDecl type, ASTNode location) { if(this == type) return v; else if(type instanceof PrimitiveType) return type.boxed().emitUnboxingOperation(b, emitCastTo(b, v, type.boxed(), location), location); else return super.emitCastTo(b, v, type, location); } /** * @ast method * */ public ReferenceType() { super(); } /** * Initializes the child array to the correct size. * Initializes List and Opt nta children. * @apilevel internal * @ast method * @ast method * */ public void init$Children() { children = new ASTNode[2]; setChild(new List(), 1); } /** * @ast method * */ public ReferenceType(Modifiers p0, String p1, List<BodyDecl> p2) { setChild(p0, 0); setID(p1); setChild(p2, 1); } /** * @ast method * */ public ReferenceType(Modifiers p0, beaver.Symbol p1, List<BodyDecl> p2) { setChild(p0, 0); setID(p1); setChild(p2, 1); } /** * @apilevel low-level * @ast method * */ protected int numChildren() { return 2; } /** * @apilevel internal * @ast method * */ public boolean mayHaveRewrite() { return false; } /** * Replaces the Modifiers child. * @param node The new node to replace the Modifiers child. * @apilevel high-level * @ast method * */ public void setModifiers(Modifiers node) { setChild(node, 0); } /** * Retrieves the Modifiers child. * @return The current node used as the Modifiers child. * @apilevel high-level * @ast method * */ public Modifiers getModifiers() { return (Modifiers)getChild(0); } /** * Retrieves the Modifiers child. * <p><em>This method does not invoke AST transformations.</em></p> * @return The current node used as the Modifiers child. * @apilevel low-level * @ast method * */ public Modifiers getModifiersNoTransform() { return (Modifiers)getChildNoTransform(0); } /** * Replaces the lexeme ID. * @param value The new value for the lexeme ID. * @apilevel high-level * @ast method * */ public void setID(String value) { tokenString_ID = value; } /** * JastAdd-internal setter for lexeme ID using the Beaver parser. * @apilevel internal * @ast method * */ 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(); } /** * Retrieves the value for the lexeme ID. * @return The value for the lexeme ID. * @apilevel high-level * @ast method * */ public String getID() { return tokenString_ID != null ? tokenString_ID : ""; } /** * Replaces the BodyDecl list. * @param list The new list node to be used as the BodyDecl list. * @apilevel high-level * @ast method * */ public void setBodyDeclList(List<BodyDecl> list) { setChild(list, 1); } /** * Retrieves the number of children in the BodyDecl list. * @return Number of children in the BodyDecl list. * @apilevel high-level * @ast method * */ public int getNumBodyDecl() { return getBodyDeclList().getNumChild(); } /** * Retrieves the number of children in the BodyDecl list. * Calling this method will not trigger rewrites.. * @return Number of children in the BodyDecl list. * @apilevel low-level * @ast method * */ public int getNumBodyDeclNoTransform() { return getBodyDeclListNoTransform().getNumChildNoTransform(); } /** * Retrieves the element at index {@code i} in the BodyDecl list.. * @param i Index of the element to return. * @return The element at position {@code i} in the BodyDecl list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public BodyDecl getBodyDecl(int i) { return (BodyDecl)getBodyDeclList().getChild(i); } /** * Append an element to the BodyDecl list. * @param node The element to append to the BodyDecl list. * @apilevel high-level * @ast method * */ public void addBodyDecl(BodyDecl node) { List<BodyDecl> list = (parent == null || state == null) ? getBodyDeclListNoTransform() : getBodyDeclList(); list.addChild(node); } /** * @apilevel low-level * @ast method * */ public void addBodyDeclNoTransform(BodyDecl node) { List<BodyDecl> list = getBodyDeclListNoTransform(); list.addChild(node); } /** * Replaces the BodyDecl list element at index {@code i} with the new node {@code node}. * @param node The new node to replace the old list element. * @param i The list index of the node to be replaced. * @apilevel high-level * @ast method * */ public void setBodyDecl(BodyDecl node, int i) { List<BodyDecl> list = getBodyDeclList(); list.setChild(node, i); } /** * Retrieves the BodyDecl list. * @return The node representing the BodyDecl list. * @apilevel high-level * @ast method * */ public List<BodyDecl> getBodyDecls() { return getBodyDeclList(); } /** * Retrieves the BodyDecl list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the BodyDecl list. * @apilevel low-level * @ast method * */ public List<BodyDecl> getBodyDeclsNoTransform() { return getBodyDeclListNoTransform(); } /** * Retrieves the BodyDecl list. * @return The node representing the BodyDecl list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<BodyDecl> getBodyDeclList() { List<BodyDecl> list = (List<BodyDecl>)getChild(1); list.getNumChild(); return list; } /** * Retrieves the BodyDecl list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the BodyDecl list. * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<BodyDecl> getBodyDeclListNoTransform() { return (List<BodyDecl>)getChildNoTransform(1); } /** * @attribute syn * @aspect TypeConversion * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeAnalysis.jrag:17 */ public boolean wideningConversionTo(TypeDecl type) { ASTNode$State state = state(); try { return instanceOf(type); } finally { } } protected java.util.Map narrowingConversionTo_TypeDecl_values; /** * @attribute syn * @aspect TypeConversion * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeAnalysis.jrag:36 */ @SuppressWarnings({"unchecked", "cast"}) public boolean narrowingConversionTo(TypeDecl type) { Object _parameters = type; if(narrowingConversionTo_TypeDecl_values == null) narrowingConversionTo_TypeDecl_values = new java.util.HashMap(4); if(narrowingConversionTo_TypeDecl_values.containsKey(_parameters)) { return ((Boolean)narrowingConversionTo_TypeDecl_values.get(_parameters)).booleanValue(); } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); boolean narrowingConversionTo_TypeDecl_value = narrowingConversionTo_compute(type); if(isFinal && num == state().boundariesCrossed) narrowingConversionTo_TypeDecl_values.put(_parameters, Boolean.valueOf(narrowingConversionTo_TypeDecl_value)); return narrowingConversionTo_TypeDecl_value; } /** * @apilevel internal */ private boolean narrowingConversionTo_compute(TypeDecl type) { if(type.instanceOf(this)) return true; if(isClassDecl() && !getModifiers().isFinal() && type.isInterfaceDecl()) return true; if(isInterfaceDecl() && type.isClassDecl() && !type.getModifiers().isFinal()) return true; if(isInterfaceDecl() && type.instanceOf(this)) return true; if(fullName().equals("java.lang.Object") && type.isInterfaceDecl()) return true; // Dragons // TODO: Check if both are interfaces with compatible methods if(isArrayDecl() && type.isArrayDecl() && elementType().instanceOf(type.elementType())) return true; return false; } /** * @attribute syn * @aspect TypeAnalysis * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeAnalysis.jrag:165 */ public boolean isReferenceType() { ASTNode$State state = state(); try { return true; } finally { } } /** * @attribute syn * @aspect TypeWideningAndIdentity * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeAnalysis.jrag:482 */ public boolean isSupertypeOfNullType(NullType type) { ASTNode$State state = state(); try { return true; } finally { } } /* It is a compile-time error if the return type of a method declared in an annotation type is any type other than one of the following: one of the primitive types, String, Class and any invocation of Class, an enum type (\ufffd8.9), an annotation type, or an array (\ufffd10) of one of the preceding types.* @attribute syn * @aspect Annotations * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Annotations.jrag:121 */ public boolean isValidAnnotationMethodReturnType() { ASTNode$State state = state(); try { if(isString()) return true; if(fullName().equals("java.lang.Class")) return true; // include generic versions of Class if(erasure().fullName().equals("java.lang.Class")) return true; return false; } finally { } } /** * @attribute syn * @aspect AutoBoxing * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/AutoBoxing.jrag:47 */ public boolean unboxingConversionTo(TypeDecl typeDecl) { ASTNode$State state = state(); try { return unboxed() == typeDecl; } finally { } } /** * @apilevel internal */ protected boolean unboxed_computed = false; /** * @apilevel internal */ protected TypeDecl unboxed_value; /** * @attribute syn * @aspect AutoBoxing * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/AutoBoxing.jrag:52 */ @SuppressWarnings({"unchecked", "cast"}) public TypeDecl unboxed() { if(unboxed_computed) { return unboxed_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); unboxed_value = unboxed_compute(); if(isFinal && num == state().boundariesCrossed) unboxed_computed = true; return unboxed_value; } /** * @apilevel internal */ private TypeDecl unboxed_compute() { if(packageName().equals("java.lang") && isTopLevelType()) { String n = name(); if(n.equals("Boolean")) return typeBoolean(); if(n.equals("Byte")) return typeByte(); if(n.equals("Character")) return typeChar(); if(n.equals("Short")) return typeShort(); if(n.equals("Integer")) return typeInt(); if(n.equals("Long")) return typeLong(); if(n.equals("Float")) return typeFloat(); if(n.equals("Double")) return typeDouble(); } return unknownType(); } /** * @attribute syn * @aspect NumericPromotion * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeAnalysis.jrag:146 */ public TypeDecl unaryNumericPromotion() { ASTNode$State state = state(); try { return isNumericType() && !isUnknown() ? unboxed().unaryNumericPromotion() : this; } finally { } } /** * @attribute syn * @aspect NumericPromotion * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeAnalysis.jrag:154 */ public TypeDecl binaryNumericPromotion(TypeDecl type) { ASTNode$State state = state(); try { return unboxed().binaryNumericPromotion(type); } finally { } } /** * @attribute syn * @aspect TypeAnalysis * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeAnalysis.jrag:173 */ public boolean isNumericType() { ASTNode$State state = state(); try { return !unboxed().isUnknown() && unboxed().isNumericType(); } finally { } } /** * @attribute syn * @aspect TypeAnalysis * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeAnalysis.jrag:177 */ public boolean isIntegralType() { ASTNode$State state = state(); try { return !unboxed().isUnknown() && unboxed().isIntegralType(); } finally { } } /** * @attribute syn * @aspect TypeAnalysis * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeAnalysis.jrag:221 */ public boolean isPrimitive() { ASTNode$State state = state(); try { return !unboxed().isUnknown() && unboxed().isPrimitive(); } finally { } } /** * @attribute syn * @aspect TypeAnalysis * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeAnalysis.jrag:181 */ public boolean isBoolean() { ASTNode$State state = state(); try { return fullName().equals("java.lang.Boolean") && unboxed().isBoolean(); } finally { } } /** * @attribute syn * @aspect GenericsSubtype * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericsSubtype.jrag:479 */ public boolean supertypeNullType(NullType type) { ASTNode$State state = state(); try { return true; } finally { } } /** * @attribute syn * @aspect InnerClasses * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Backend/InnerClasses.jrag:82 */ public TypeDecl stringPromotion() { ASTNode$State state = state(); try { return typeObject(); } finally { } } /** * @apilevel internal */ protected boolean jvmName_computed = false; /** * @apilevel internal */ protected String jvmName_value; /** * @attribute syn * @aspect Java2Rewrites * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Backend/Java2Rewrites.jrag:18 */ @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; } /** * @apilevel internal */ private String jvmName_compute() { if(!isNestedType()) return fullName(); else if(isAnonymous() || isLocalClass()) return enclosingType().jvmName() + "$" + uniqueIndex() + name(); else return enclosingType().jvmName() + "$" + name(); } /** * @attribute syn * @aspect Java2Rewrites * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Backend/Java2Rewrites.jrag:57 */ public String referenceClassFieldName() { ASTNode$State state = state(); try { return "class$" + jvmName().replace('[', '$').replace('.', '$').replace(';', ' ').trim(); } finally { } } /** * @attribute inh * @aspect AutoBoxing * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/AutoBoxing.jrag:66 */ @SuppressWarnings({"unchecked", "cast"}) public TypeDecl typeBoolean() { ASTNode$State state = state(); TypeDecl typeBoolean_value = getParent().Define_TypeDecl_typeBoolean(this, null); return typeBoolean_value; } /** * @attribute inh * @aspect AutoBoxing * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/AutoBoxing.jrag:67 */ @SuppressWarnings({"unchecked", "cast"}) public TypeDecl typeByte() { ASTNode$State state = state(); TypeDecl typeByte_value = getParent().Define_TypeDecl_typeByte(this, null); return typeByte_value; } /** * @attribute inh * @aspect AutoBoxing * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/AutoBoxing.jrag:68 */ @SuppressWarnings({"unchecked", "cast"}) public TypeDecl typeChar() { ASTNode$State state = state(); TypeDecl typeChar_value = getParent().Define_TypeDecl_typeChar(this, null); return typeChar_value; } /** * @attribute inh * @aspect AutoBoxing * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/AutoBoxing.jrag:69 */ @SuppressWarnings({"unchecked", "cast"}) public TypeDecl typeShort() { ASTNode$State state = state(); TypeDecl typeShort_value = getParent().Define_TypeDecl_typeShort(this, null); return typeShort_value; } /** * @attribute inh * @aspect AutoBoxing * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/AutoBoxing.jrag:70 */ @SuppressWarnings({"unchecked", "cast"}) public TypeDecl typeInt() { ASTNode$State state = state(); TypeDecl typeInt_value = getParent().Define_TypeDecl_typeInt(this, null); return typeInt_value; } /** * @attribute inh * @aspect AutoBoxing * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/AutoBoxing.jrag:71 */ @SuppressWarnings({"unchecked", "cast"}) public TypeDecl typeLong() { ASTNode$State state = state(); TypeDecl typeLong_value = getParent().Define_TypeDecl_typeLong(this, null); return typeLong_value; } /** * @attribute inh * @aspect AutoBoxing * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/AutoBoxing.jrag:72 */ @SuppressWarnings({"unchecked", "cast"}) public TypeDecl typeFloat() { ASTNode$State state = state(); TypeDecl typeFloat_value = getParent().Define_TypeDecl_typeFloat(this, null); return typeFloat_value; } /** * @attribute inh * @aspect AutoBoxing * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/AutoBoxing.jrag:73 */ @SuppressWarnings({"unchecked", "cast"}) public TypeDecl typeDouble() { ASTNode$State state = state(); TypeDecl typeDouble_value = getParent().Define_TypeDecl_typeDouble(this, null); return typeDouble_value; } /** * @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); } }
20,565
28.805797
164
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/RelationalExpr.java
/* This file was generated with JastAdd2 (http://jastadd.org) version R20130212 (r1031) */ package soot.JastAddJ; import java.util.HashSet; 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; /** * @production RelationalExpr : {@link Binary}; * @ast node * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/java.ast:175 */ public abstract class RelationalExpr extends Binary implements Cloneable { /** * @apilevel low-level */ public void flushCache() { super.flushCache(); type_computed = false; type_value = null; } /** * @apilevel internal */ public void flushCollectionCache() { super.flushCollectionCache(); } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public RelationalExpr clone() throws CloneNotSupportedException { RelationalExpr node = (RelationalExpr)super.clone(); node.type_computed = false; node.type_value = null; node.in$Circle(false); node.is$Final(false); return node; } /** * @ast method * @aspect TypeCheck * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeCheck.jrag:204 */ public void typeCheck() { if(!getLeftOperand().type().isNumericType()) error(getLeftOperand().type().typeName() + " is not numeric"); if(!getRightOperand().type().isNumericType()) error(getRightOperand().type().typeName() + " is not numeric"); } /** * @ast method * @aspect BooleanExpressions * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/BooleanExpressions.jrag:102 */ public soot.Value eval(Body b) { return emitBooleanCondition(b); } /** * @ast method * @aspect BooleanExpressions * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/BooleanExpressions.jrag:225 */ public void emitEvalBranch(Body b) { b.setLine(this); if(isTrue()) b.add(b.newGotoStmt(true_label(), this)); else if(isFalse()) b.add(b.newGotoStmt(false_label(), this)); else { soot.Value left; soot.Value right; TypeDecl type = getLeftOperand().type(); if(type.isNumericType()) { type = binaryNumericPromotedType(); left = getLeftOperand().type().emitCastTo(b, // Binary numeric promotion getLeftOperand(), type ); right = getRightOperand().type().emitCastTo(b, // Binary numeric promotion getRightOperand(), type ); if(type.isDouble() || type.isFloat() || type.isLong()) { Local l; if(type.isDouble() || type.isFloat()) { if(this instanceof GEExpr || this instanceof GTExpr) { l = asLocal(b, b.newCmplExpr(asImmediate(b, left), asImmediate(b, right), this)); } else { l = asLocal(b, b.newCmpgExpr(asImmediate(b, left), asImmediate(b, right), this)); } } else { l = asLocal(b, b.newCmpExpr(asImmediate(b, left), asImmediate(b, right), this)); } b.add(b.newIfStmt(comparisonInv(b, l, BooleanType.emitConstant(false)), false_label(), this)); b.add(b.newGotoStmt(true_label(), this)); } else { b.add(b.newIfStmt(comparison(b, left, right), true_label(), this)); b.add(b.newGotoStmt(false_label(), this)); //b.add(b.newIfStmt(comparisonInv(b, left, right), false_label(), this)); //b.add(b.newGotoStmt(true_label(), this)); } } else { left = getLeftOperand().eval(b); right = getRightOperand().eval(b); b.add(b.newIfStmt(comparison(b, left, right), true_label(), this)); b.add(b.newGotoStmt(false_label(), this)); //b.add(b.newIfStmt(comparisonInv(b, left, right), false_label(), this)); //b.add(b.newGotoStmt(true_label(), this)); } } } /** * @ast method * @aspect BooleanExpressions * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/BooleanExpressions.jrag:279 */ public soot.Value comparison(Body b, soot.Value left, soot.Value right) { throw new Error("comparison not supported for " + getClass().getName()); } /** * @ast method * @aspect BooleanExpressions * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/BooleanExpressions.jrag:301 */ public soot.Value comparisonInv(Body b, soot.Value left, soot.Value right) { throw new Error("comparisonInv not supported for " + getClass().getName()); } /** * @ast method * */ public RelationalExpr() { super(); } /** * Initializes the child array to the correct size. * Initializes List and Opt nta children. * @apilevel internal * @ast method * @ast method * */ public void init$Children() { children = new ASTNode[2]; } /** * @ast method * */ public RelationalExpr(Expr p0, Expr p1) { setChild(p0, 0); setChild(p1, 1); } /** * @apilevel low-level * @ast method * */ protected int numChildren() { return 2; } /** * @apilevel internal * @ast method * */ public boolean mayHaveRewrite() { return false; } /** * Replaces the LeftOperand child. * @param node The new node to replace the LeftOperand child. * @apilevel high-level * @ast method * */ public void setLeftOperand(Expr node) { setChild(node, 0); } /** * Retrieves the LeftOperand child. * @return The current node used as the LeftOperand child. * @apilevel high-level * @ast method * */ public Expr getLeftOperand() { return (Expr)getChild(0); } /** * Retrieves the LeftOperand child. * <p><em>This method does not invoke AST transformations.</em></p> * @return The current node used as the LeftOperand child. * @apilevel low-level * @ast method * */ public Expr getLeftOperandNoTransform() { return (Expr)getChildNoTransform(0); } /** * Replaces the RightOperand child. * @param node The new node to replace the RightOperand child. * @apilevel high-level * @ast method * */ public void setRightOperand(Expr node) { setChild(node, 1); } /** * Retrieves the RightOperand child. * @return The current node used as the RightOperand child. * @apilevel high-level * @ast method * */ public Expr getRightOperand() { return (Expr)getChild(1); } /** * Retrieves the RightOperand child. * <p><em>This method does not invoke AST transformations.</em></p> * @return The current node used as the RightOperand child. * @apilevel low-level * @ast method * */ public Expr getRightOperandNoTransform() { return (Expr)getChildNoTransform(1); } /** * @apilevel internal */ protected boolean type_computed = false; /** * @apilevel internal */ protected TypeDecl type_value; /** * @attribute syn * @aspect TypeAnalysis * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeAnalysis.jrag:344 */ @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; } /** * @apilevel internal */ private TypeDecl type_compute() { return typeBoolean(); } /** * @attribute syn * @aspect BooleanExpressions * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/BooleanExpressions.jrag:21 */ public boolean definesLabel() { ASTNode$State state = state(); try { return false; } finally { } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/BooleanExpressions.jrag:69 * @apilevel internal */ public soot.jimple.Stmt Define_soot_jimple_Stmt_condition_false_label(ASTNode caller, ASTNode child) { if(caller == getRightOperandNoTransform()) { return false_label(); } else if(caller == getLeftOperandNoTransform()) { return false_label(); } else { return getParent().Define_soot_jimple_Stmt_condition_false_label(this, caller); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/BooleanExpressions.jrag:70 * @apilevel internal */ public soot.jimple.Stmt Define_soot_jimple_Stmt_condition_true_label(ASTNode caller, ASTNode child) { if(caller == getRightOperandNoTransform()) { return true_label(); } else if(caller == getLeftOperandNoTransform()) { return true_label(); } else { return getParent().Define_soot_jimple_Stmt_condition_true_label(this, caller); } } /** * @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); } }
9,525
28.310769
120
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/ResourceDeclaration.java
/* This file was generated with JastAdd2 (http://jastadd.org) version R20130212 (r1031) */ package soot.JastAddJ; import java.util.HashSet; 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; /** * A resource declaration in a try with resources statement. * @production ResourceDeclaration : {@link VariableDeclaration}; * @ast node * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/TryWithResources.ast:9 */ public class ResourceDeclaration extends VariableDeclaration implements Cloneable { /** * @apilevel low-level */ public void flushCache() { super.flushCache(); } /** * @apilevel internal */ public void flushCollectionCache() { super.flushCollectionCache(); } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public ResourceDeclaration clone() throws CloneNotSupportedException { ResourceDeclaration node = (ResourceDeclaration)super.clone(); node.in$Circle(false); node.is$Final(false); return node; } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public ResourceDeclaration copy() { try { ResourceDeclaration node = (ResourceDeclaration) clone(); node.parent = null; if(children != null) node.children = (ASTNode[]) children.clone(); return node; } catch (CloneNotSupportedException e) { throw new Error("Error: clone not supported for " + getClass().getName()); } } /** * Create a deep copy of the AST subtree at this node. * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level */ @SuppressWarnings({"unchecked", "cast"}) public ResourceDeclaration fullCopy() { ResourceDeclaration tree = (ResourceDeclaration) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) children[i]; if(child != null) { child = child.fullCopy(); tree.setChild(child, i); } } } return tree; } /** * Type checking for TWR. * @ast method * @aspect TryWithResources * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/TryWithResources.jrag:23 */ public void typeCheck() { TypeDecl typeAutoCloseable = lookupType("java.lang", "AutoCloseable"); if (typeAutoCloseable == null) error("java.lang.AutoCloseable not found"); else if (!getTypeAccess().type().instanceOf(typeAutoCloseable)) error("Resource specification must declare an AutoCloseable resource"); } /** * @ast method * @aspect TryWithResources * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/TryWithResources.jrag:156 */ public void nameCheck() { // Special name check for resource specification if (resourcePreviouslyDeclared(name())) error("A resource with the name "+name()+ " has already been declared in this try statement."); // Do regular name check for variable declaration super.nameCheck(); } /** * @ast method * */ public ResourceDeclaration() { super(); } /** * Initializes the child array to the correct size. * Initializes List and Opt nta children. * @apilevel internal * @ast method * @ast method * */ public void init$Children() { children = new ASTNode[3]; setChild(new Opt(), 2); } /** * @ast method * */ public ResourceDeclaration(Modifiers p0, Access p1, String p2, Opt<Expr> p3) { setChild(p0, 0); setChild(p1, 1); setID(p2); setChild(p3, 2); } /** * @ast method * */ public ResourceDeclaration(Modifiers p0, Access p1, beaver.Symbol p2, Opt<Expr> p3) { setChild(p0, 0); setChild(p1, 1); setID(p2); setChild(p3, 2); } /** * @apilevel low-level * @ast method * */ protected int numChildren() { return 3; } /** * @apilevel internal * @ast method * */ public boolean mayHaveRewrite() { return false; } /** * Replaces the Modifiers child. * @param node The new node to replace the Modifiers child. * @apilevel high-level * @ast method * */ public void setModifiers(Modifiers node) { setChild(node, 0); } /** * Retrieves the Modifiers child. * @return The current node used as the Modifiers child. * @apilevel high-level * @ast method * */ public Modifiers getModifiers() { return (Modifiers)getChild(0); } /** * Retrieves the Modifiers child. * <p><em>This method does not invoke AST transformations.</em></p> * @return The current node used as the Modifiers child. * @apilevel low-level * @ast method * */ public Modifiers getModifiersNoTransform() { return (Modifiers)getChildNoTransform(0); } /** * Replaces the TypeAccess child. * @param node The new node to replace the TypeAccess child. * @apilevel high-level * @ast method * */ public void setTypeAccess(Access node) { setChild(node, 1); } /** * Retrieves the TypeAccess child. * @return The current node used as the TypeAccess child. * @apilevel high-level * @ast method * */ public Access getTypeAccess() { return (Access)getChild(1); } /** * Retrieves the TypeAccess child. * <p><em>This method does not invoke AST transformations.</em></p> * @return The current node used as the TypeAccess child. * @apilevel low-level * @ast method * */ public Access getTypeAccessNoTransform() { return (Access)getChildNoTransform(1); } /** * Replaces the lexeme ID. * @param value The new value for the lexeme ID. * @apilevel high-level * @ast method * */ public void setID(String value) { tokenString_ID = value; } /** * JastAdd-internal setter for lexeme ID using the Beaver parser. * @apilevel internal * @ast method * */ 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(); } /** * Retrieves the value for the lexeme ID. * @return The value for the lexeme ID. * @apilevel high-level * @ast method * */ public String getID() { return tokenString_ID != null ? tokenString_ID : ""; } /** * Replaces the optional node for the Init child. This is the {@code Opt} node containing the child Init, not the actual child! * @param opt The new node to be used as the optional node for the Init child. * @apilevel low-level * @ast method * */ public void setInitOpt(Opt<Expr> opt) { setChild(opt, 2); } /** * Check whether the optional Init child exists. * @return {@code true} if the optional Init child exists, {@code false} if it does not. * @apilevel high-level * @ast method * */ public boolean hasInit() { return getInitOpt().getNumChild() != 0; } /** * Retrieves the (optional) Init child. * @return The Init child, if it exists. Returns {@code null} otherwise. * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public Expr getInit() { return (Expr)getInitOpt().getChild(0); } /** * Replaces the (optional) Init child. * @param node The new node to be used as the Init child. * @apilevel high-level * @ast method * */ public void setInit(Expr node) { getInitOpt().setChild(node, 0); } /** * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public Opt<Expr> getInitOpt() { return (Opt<Expr>)getChild(2); } /** * Retrieves the optional node for child Init. This is the {@code Opt} node containing the child Init, not the actual child! * <p><em>This method does not invoke AST transformations.</em></p> * @return The optional node for child Init. * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public Opt<Expr> getInitOptNoTransform() { return (Opt<Expr>)getChildNoTransform(2); } /** * Inherit the lookupType attribute in ResourceDeclaration. * @attribute inh * @aspect TryWithResources * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/TryWithResources.jrag:18 */ @SuppressWarnings({"unchecked", "cast"}) public TypeDecl lookupType(String packageName, String typeName) { ASTNode$State state = state(); TypeDecl lookupType_String_String_value = getParent().Define_TypeDecl_lookupType(this, null, packageName, typeName); return lookupType_String_String_value; } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/TryWithResources.jrag:13 * @apilevel internal */ public NameType Define_NameType_nameType(ASTNode caller, ASTNode child) { if(caller == getTypeAccessNoTransform()) { return NameType.TYPE_NAME; } else { return super.Define_NameType_nameType(caller, child); } } /** * @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); } }
9,710
26.201681
129
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/ResourceModifiers.java
/* This file was generated with JastAdd2 (http://jastadd.org) version R20130212 (r1031) */ package soot.JastAddJ; import java.util.HashSet; 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; /** * Subclass of Modifiers for resource declarations. * This subclass is added as a convenient method of making resource * declarations implicitly final. * @production ResourceModifiers : {@link Modifiers}; * @ast node * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/TryWithResources.ast:16 */ public class ResourceModifiers extends Modifiers implements Cloneable { /** * @apilevel low-level */ public void flushCache() { super.flushCache(); isFinal_computed = false; } /** * @apilevel internal */ public void flushCollectionCache() { super.flushCollectionCache(); } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public ResourceModifiers clone() throws CloneNotSupportedException { ResourceModifiers node = (ResourceModifiers)super.clone(); node.isFinal_computed = false; node.in$Circle(false); node.is$Final(false); return node; } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public ResourceModifiers copy() { try { ResourceModifiers node = (ResourceModifiers) clone(); node.parent = null; if(children != null) node.children = (ASTNode[]) children.clone(); return node; } catch (CloneNotSupportedException e) { throw new Error("Error: clone not supported for " + getClass().getName()); } } /** * Create a deep copy of the AST subtree at this node. * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level */ @SuppressWarnings({"unchecked", "cast"}) public ResourceModifiers fullCopy() { ResourceModifiers tree = (ResourceModifiers) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) children[i]; if(child != null) { child = child.fullCopy(); tree.setChild(child, i); } } } return tree; } /** * @ast method * */ public ResourceModifiers() { super(); } /** * Initializes the child array to the correct size. * Initializes List and Opt nta children. * @apilevel internal * @ast method * @ast method * */ public void init$Children() { children = new ASTNode[1]; setChild(new List(), 0); } /** * @ast method * */ public ResourceModifiers(List<Modifier> p0) { setChild(p0, 0); } /** * @apilevel low-level * @ast method * */ protected int numChildren() { return 1; } /** * @apilevel internal * @ast method * */ public boolean mayHaveRewrite() { return false; } /** * Replaces the Modifier list. * @param list The new list node to be used as the Modifier list. * @apilevel high-level * @ast method * */ public void setModifierList(List<Modifier> list) { setChild(list, 0); } /** * Retrieves the number of children in the Modifier list. * @return Number of children in the Modifier list. * @apilevel high-level * @ast method * */ public int getNumModifier() { return getModifierList().getNumChild(); } /** * Retrieves the number of children in the Modifier list. * Calling this method will not trigger rewrites.. * @return Number of children in the Modifier list. * @apilevel low-level * @ast method * */ public int getNumModifierNoTransform() { return getModifierListNoTransform().getNumChildNoTransform(); } /** * Retrieves the element at index {@code i} in the Modifier list.. * @param i Index of the element to return. * @return The element at position {@code i} in the Modifier list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public Modifier getModifier(int i) { return (Modifier)getModifierList().getChild(i); } /** * Append an element to the Modifier list. * @param node The element to append to the Modifier list. * @apilevel high-level * @ast method * */ public void addModifier(Modifier node) { List<Modifier> list = (parent == null || state == null) ? getModifierListNoTransform() : getModifierList(); list.addChild(node); } /** * @apilevel low-level * @ast method * */ public void addModifierNoTransform(Modifier node) { List<Modifier> list = getModifierListNoTransform(); list.addChild(node); } /** * Replaces the Modifier list element at index {@code i} with the new node {@code node}. * @param node The new node to replace the old list element. * @param i The list index of the node to be replaced. * @apilevel high-level * @ast method * */ public void setModifier(Modifier node, int i) { List<Modifier> list = getModifierList(); list.setChild(node, i); } /** * Retrieves the Modifier list. * @return The node representing the Modifier list. * @apilevel high-level * @ast method * */ public List<Modifier> getModifiers() { return getModifierList(); } /** * Retrieves the Modifier list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the Modifier list. * @apilevel low-level * @ast method * */ public List<Modifier> getModifiersNoTransform() { return getModifierListNoTransform(); } /** * Retrieves the Modifier list. * @return The node representing the Modifier list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<Modifier> getModifierList() { List<Modifier> list = (List<Modifier>)getChild(0); list.getNumChild(); return list; } /** * Retrieves the Modifier list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the Modifier list. * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<Modifier> getModifierListNoTransform() { return (List<Modifier>)getChildNoTransform(0); } /** * @apilevel internal */ protected boolean isFinal_computed = false; /** * @apilevel internal */ protected boolean isFinal_value; /** * @attribute syn * @aspect TryWithResources * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/TryWithResources.jrag:237 */ @SuppressWarnings({"unchecked", "cast"}) public boolean isFinal() { if(isFinal_computed) { return isFinal_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); isFinal_value = isFinal_compute(); if(isFinal && num == state().boundariesCrossed) isFinal_computed = true; return isFinal_value; } /** * @apilevel internal */ private boolean isFinal_compute() { return true; } /** * @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); } }
7,618
25.182131
111
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/ReturnStmt.java
/* This file was generated with JastAdd2 (http://jastadd.org) version R20130212 (r1031) */ package soot.JastAddJ; import java.util.HashSet; 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; /** * @production ReturnStmt : {@link Stmt} ::= <span class="component">[Result:{@link Expr}]</span>; * @ast node * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/java.ast:214 */ public class ReturnStmt extends Stmt implements Cloneable { /** * @apilevel low-level */ public void flushCache() { super.flushCache(); finallyList_computed = false; finallyList_value = null; isDAafter_Variable_values = null; isDUafterReachedFinallyBlocks_Variable_values = null; isDAafterReachedFinallyBlocks_Variable_values = null; isDUafter_Variable_values = null; canCompleteNormally_computed = false; inSynchronizedBlock_computed = false; } /** * @apilevel internal */ public void flushCollectionCache() { super.flushCollectionCache(); } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public ReturnStmt clone() throws CloneNotSupportedException { ReturnStmt node = (ReturnStmt)super.clone(); node.finallyList_computed = false; node.finallyList_value = null; node.isDAafter_Variable_values = null; node.isDUafterReachedFinallyBlocks_Variable_values = null; node.isDAafterReachedFinallyBlocks_Variable_values = null; node.isDUafter_Variable_values = null; node.canCompleteNormally_computed = false; node.inSynchronizedBlock_computed = false; node.in$Circle(false); node.is$Final(false); return node; } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public ReturnStmt copy() { try { ReturnStmt node = (ReturnStmt) clone(); node.parent = null; if(children != null) node.children = (ASTNode[]) children.clone(); return node; } catch (CloneNotSupportedException e) { throw new Error("Error: clone not supported for " + getClass().getName()); } } /** * Create a deep copy of the AST subtree at this node. * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level */ @SuppressWarnings({"unchecked", "cast"}) public ReturnStmt fullCopy() { ReturnStmt tree = (ReturnStmt) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) children[i]; if(child != null) { child = child.fullCopy(); tree.setChild(child, i); } } } return tree; } /** * @ast method * @aspect BranchTarget * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/BranchTarget.jrag:54 */ public void collectBranches(Collection c) { c.add(this); } /** * @ast method * @aspect NodeConstructors * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/NodeConstructors.jrag:62 */ public ReturnStmt(Expr expr) { this(new Opt(expr)); } /** * @ast method * @aspect PrettyPrint * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/PrettyPrint.jadd:683 */ public void toString(StringBuffer s) { s.append(indent()); s.append("return "); if(hasResult()) { getResult().toString(s); } s.append(";"); } /** * @ast method * @aspect TypeCheck * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeCheck.jrag:408 */ public void typeCheck() { if(hasResult() && !returnType().isVoid()) { if(!getResult().type().assignConversionTo(returnType(), getResult())) error("return value must be an instance of " + returnType().typeName() + " which " + getResult().type().typeName() + " is not"); } // 8.4.5 8.8.5 if(returnType().isVoid() && hasResult()) error("return stmt may not have an expression in void methods"); // 8.4.5 if(!returnType().isVoid() && !hasResult()) error("return stmt must have an expression in non void methods"); if(enclosingBodyDecl() instanceof InstanceInitializer || enclosingBodyDecl() instanceof StaticInitializer) error("Initializers may not return"); } /** * @ast method * @aspect Statements * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/Statements.jrag:269 */ public void jimplify2(Body b) { if(hasResult()) { TypeDecl type = returnType(); if(type.isVoid()) { throw new Error("Can not return a value from a void body"); } Local local = asLocal(b, getResult().type().emitCastTo(b, getResult().eval(b), type, getResult() ), type.getSootType() ); ArrayList list = exceptionRanges(); if(!inSynchronizedBlock()) endExceptionRange(b, list); for(Iterator iter = finallyList().iterator(); iter.hasNext(); ) { FinallyHost stmt = (FinallyHost)iter.next(); stmt.emitFinallyCode(b); } b.setLine(this); if(inSynchronizedBlock()) endExceptionRange(b, list); b.add(b.newReturnStmt(local, this)); beginExceptionRange(b, list); } else { ArrayList list = exceptionRanges(); if(!inSynchronizedBlock()) endExceptionRange(b, list); for(Iterator iter = finallyList().iterator(); iter.hasNext(); ) { FinallyHost stmt = (FinallyHost)iter.next(); stmt.emitFinallyCode(b); } b.setLine(this); if(inSynchronizedBlock()) endExceptionRange(b, list); b.add(b.newReturnVoidStmt(this)); beginExceptionRange(b, list); } } /** * @ast method * */ public ReturnStmt() { super(); } /** * Initializes the child array to the correct size. * Initializes List and Opt nta children. * @apilevel internal * @ast method * @ast method * */ public void init$Children() { children = new ASTNode[1]; setChild(new Opt(), 0); } /** * @ast method * */ public ReturnStmt(Opt<Expr> p0) { setChild(p0, 0); } /** * @apilevel low-level * @ast method * */ protected int numChildren() { return 1; } /** * @apilevel internal * @ast method * */ public boolean mayHaveRewrite() { return false; } /** * Replaces the optional node for the Result child. This is the {@code Opt} node containing the child Result, not the actual child! * @param opt The new node to be used as the optional node for the Result child. * @apilevel low-level * @ast method * */ public void setResultOpt(Opt<Expr> opt) { setChild(opt, 0); } /** * Check whether the optional Result child exists. * @return {@code true} if the optional Result child exists, {@code false} if it does not. * @apilevel high-level * @ast method * */ public boolean hasResult() { return getResultOpt().getNumChild() != 0; } /** * Retrieves the (optional) Result child. * @return The Result child, if it exists. Returns {@code null} otherwise. * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public Expr getResult() { return (Expr)getResultOpt().getChild(0); } /** * Replaces the (optional) Result child. * @param node The new node to be used as the Result child. * @apilevel high-level * @ast method * */ public void setResult(Expr node) { getResultOpt().setChild(node, 0); } /** * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public Opt<Expr> getResultOpt() { return (Opt<Expr>)getChild(0); } /** * Retrieves the optional node for child Result. This is the {@code Opt} node containing the child Result, not the actual child! * <p><em>This method does not invoke AST transformations.</em></p> * @return The optional node for child Result. * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public Opt<Expr> getResultOptNoTransform() { return (Opt<Expr>)getChildNoTransform(0); } /** * @apilevel internal */ protected boolean finallyList_computed = false; /** * @apilevel internal */ protected ArrayList finallyList_value; /** * @attribute syn * @aspect BranchTarget * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/BranchTarget.jrag:185 */ @SuppressWarnings({"unchecked", "cast"}) public ArrayList finallyList() { if(finallyList_computed) { return finallyList_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); finallyList_value = finallyList_compute(); if(isFinal && num == state().boundariesCrossed) finallyList_computed = true; return finallyList_value; } /** * @apilevel internal */ private ArrayList finallyList_compute() { ArrayList list = new ArrayList(); collectFinally(this, list); return list; } protected java.util.Map isDAafter_Variable_values; /** * @attribute syn * @aspect DA * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DefiniteAssignment.jrag:649 */ @SuppressWarnings({"unchecked", "cast"}) public boolean isDAafter(Variable v) { Object _parameters = v; if(isDAafter_Variable_values == null) isDAafter_Variable_values = new java.util.HashMap(4); if(isDAafter_Variable_values.containsKey(_parameters)) { return ((Boolean)isDAafter_Variable_values.get(_parameters)).booleanValue(); } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); boolean isDAafter_Variable_value = isDAafter_compute(v); if(isFinal && num == state().boundariesCrossed) isDAafter_Variable_values.put(_parameters, Boolean.valueOf(isDAafter_Variable_value)); return isDAafter_Variable_value; } /** * @apilevel internal */ private boolean isDAafter_compute(Variable v) { return true; } protected java.util.Map isDUafterReachedFinallyBlocks_Variable_values; /** * @attribute syn * @aspect DU * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DefiniteAssignment.jrag:942 */ @SuppressWarnings({"unchecked", "cast"}) public boolean isDUafterReachedFinallyBlocks(Variable v) { Object _parameters = v; if(isDUafterReachedFinallyBlocks_Variable_values == null) isDUafterReachedFinallyBlocks_Variable_values = new java.util.HashMap(4); if(isDUafterReachedFinallyBlocks_Variable_values.containsKey(_parameters)) { return ((Boolean)isDUafterReachedFinallyBlocks_Variable_values.get(_parameters)).booleanValue(); } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); boolean isDUafterReachedFinallyBlocks_Variable_value = isDUafterReachedFinallyBlocks_compute(v); if(isFinal && num == state().boundariesCrossed) isDUafterReachedFinallyBlocks_Variable_values.put(_parameters, Boolean.valueOf(isDUafterReachedFinallyBlocks_Variable_value)); return isDUafterReachedFinallyBlocks_Variable_value; } /** * @apilevel internal */ private boolean isDUafterReachedFinallyBlocks_compute(Variable v) { if(!isDUbefore(v) && finallyList().isEmpty()) return false; for(Iterator iter = finallyList().iterator(); iter.hasNext(); ) { FinallyHost f = (FinallyHost)iter.next(); if(!f.isDUafterFinally(v)) return false; } return true; } protected java.util.Map isDAafterReachedFinallyBlocks_Variable_values; /** * @attribute syn * @aspect DU * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DefiniteAssignment.jrag:978 */ @SuppressWarnings({"unchecked", "cast"}) public boolean isDAafterReachedFinallyBlocks(Variable v) { Object _parameters = v; if(isDAafterReachedFinallyBlocks_Variable_values == null) isDAafterReachedFinallyBlocks_Variable_values = new java.util.HashMap(4); if(isDAafterReachedFinallyBlocks_Variable_values.containsKey(_parameters)) { return ((Boolean)isDAafterReachedFinallyBlocks_Variable_values.get(_parameters)).booleanValue(); } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); boolean isDAafterReachedFinallyBlocks_Variable_value = isDAafterReachedFinallyBlocks_compute(v); if(isFinal && num == state().boundariesCrossed) isDAafterReachedFinallyBlocks_Variable_values.put(_parameters, Boolean.valueOf(isDAafterReachedFinallyBlocks_Variable_value)); return isDAafterReachedFinallyBlocks_Variable_value; } /** * @apilevel internal */ private boolean isDAafterReachedFinallyBlocks_compute(Variable v) { if(hasResult() ? getResult().isDAafter(v) : isDAbefore(v)) return true; if(finallyList().isEmpty()) return false; for(Iterator iter = finallyList().iterator(); iter.hasNext(); ) { FinallyHost f = (FinallyHost)iter.next(); if(!f.isDAafterFinally(v)) return false; } return true; } protected java.util.Map isDUafter_Variable_values; /** * @attribute syn * @aspect DU * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DefiniteAssignment.jrag:1172 */ @SuppressWarnings({"unchecked", "cast"}) public boolean isDUafter(Variable v) { Object _parameters = v; if(isDUafter_Variable_values == null) isDUafter_Variable_values = new java.util.HashMap(4); if(isDUafter_Variable_values.containsKey(_parameters)) { return ((Boolean)isDUafter_Variable_values.get(_parameters)).booleanValue(); } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); boolean isDUafter_Variable_value = isDUafter_compute(v); if(isFinal && num == state().boundariesCrossed) isDUafter_Variable_values.put(_parameters, Boolean.valueOf(isDUafter_Variable_value)); return isDUafter_Variable_value; } /** * @apilevel internal */ private boolean isDUafter_compute(Variable v) { return true; } /** * @apilevel internal */ protected boolean canCompleteNormally_computed = false; /** * @apilevel internal */ protected boolean canCompleteNormally_value; /** * @attribute syn * @aspect UnreachableStatements * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/UnreachableStatements.jrag:107 */ @SuppressWarnings({"unchecked", "cast"}) public boolean canCompleteNormally() { if(canCompleteNormally_computed) { return canCompleteNormally_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); canCompleteNormally_value = canCompleteNormally_compute(); if(isFinal && num == state().boundariesCrossed) canCompleteNormally_computed = true; return canCompleteNormally_value; } /** * @apilevel internal */ private boolean canCompleteNormally_compute() { return false; } /** * @apilevel internal */ protected boolean inSynchronizedBlock_computed = false; /** * @apilevel internal */ protected boolean inSynchronizedBlock_value; /** * @attribute syn * @aspect Statements * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/Statements.jrag:249 */ @SuppressWarnings({"unchecked", "cast"}) public boolean inSynchronizedBlock() { if(inSynchronizedBlock_computed) { return inSynchronizedBlock_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); inSynchronizedBlock_value = inSynchronizedBlock_compute(); if(isFinal && num == state().boundariesCrossed) inSynchronizedBlock_computed = true; return inSynchronizedBlock_value; } /** * @apilevel internal */ private boolean inSynchronizedBlock_compute() { return !finallyList().isEmpty() && finallyList().iterator().next() instanceof SynchronizedStmt; } /** * @attribute syn * @aspect PreciseRethrow * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/PreciseRethrow.jrag:55 */ public boolean modifiedInScope(Variable var) { ASTNode$State state = state(); try { return false; } finally { } } /** * @attribute inh * @aspect TypeCheck * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeCheck.jrag:403 */ @SuppressWarnings({"unchecked", "cast"}) public TypeDecl returnType() { ASTNode$State state = state(); TypeDecl returnType_value = getParent().Define_TypeDecl_returnType(this, null); return returnType_value; } /** * @attribute inh * @aspect Statements * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/Statements.jrag:458 */ @SuppressWarnings({"unchecked", "cast"}) public ArrayList exceptionRanges() { ASTNode$State state = state(); ArrayList exceptionRanges_value = getParent().Define_ArrayList_exceptionRanges(this, null); return exceptionRanges_value; } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DefiniteAssignment.jrag:652 * @apilevel internal */ public boolean Define_boolean_isDAbefore(ASTNode caller, ASTNode child, Variable v) { if(caller == getResultOptNoTransform()) { return isDAbefore(v); } else { return getParent().Define_boolean_isDAbefore(this, caller, v); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DefiniteAssignment.jrag:1175 * @apilevel internal */ public boolean Define_boolean_isDUbefore(ASTNode caller, ASTNode child, Variable v) { if(caller == getResultOptNoTransform()) { return isDUbefore(v); } else { return getParent().Define_boolean_isDUbefore(this, caller, v); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericMethodsInference.jrag:38 * @apilevel internal */ public TypeDecl Define_TypeDecl_assignConvertedType(ASTNode caller, ASTNode child) { if(caller == getResultOptNoTransform()) { return returnType(); } else { return getParent().Define_TypeDecl_assignConvertedType(this, caller); } } /** * @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); } }
19,157
31.861063
180
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/ShiftExpr.java
/* This file was generated with JastAdd2 (http://jastadd.org) version R20130212 (r1031) */ package soot.JastAddJ; import java.util.HashSet; 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; /** * @production ShiftExpr : {@link Binary}; * @ast node * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/java.ast:161 */ public abstract class ShiftExpr extends Binary implements Cloneable { /** * @apilevel low-level */ public void flushCache() { super.flushCache(); type_computed = false; type_value = null; } /** * @apilevel internal */ public void flushCollectionCache() { super.flushCollectionCache(); } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public ShiftExpr clone() throws CloneNotSupportedException { ShiftExpr node = (ShiftExpr)super.clone(); node.type_computed = false; node.type_value = null; node.in$Circle(false); node.is$Final(false); return node; } /** * @ast method * @aspect TypeCheck * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeCheck.jrag:184 */ public void typeCheck() { if(!getLeftOperand().type().isIntegralType()) error(getLeftOperand().type().typeName() + " is not integral"); if(!getRightOperand().type().isIntegralType()) error(getRightOperand().type().typeName() + " is not integral"); } /** * @ast method * */ public ShiftExpr() { super(); } /** * Initializes the child array to the correct size. * Initializes List and Opt nta children. * @apilevel internal * @ast method * @ast method * */ public void init$Children() { children = new ASTNode[2]; } /** * @ast method * */ public ShiftExpr(Expr p0, Expr p1) { setChild(p0, 0); setChild(p1, 1); } /** * @apilevel low-level * @ast method * */ protected int numChildren() { return 2; } /** * @apilevel internal * @ast method * */ public boolean mayHaveRewrite() { return false; } /** * Replaces the LeftOperand child. * @param node The new node to replace the LeftOperand child. * @apilevel high-level * @ast method * */ public void setLeftOperand(Expr node) { setChild(node, 0); } /** * Retrieves the LeftOperand child. * @return The current node used as the LeftOperand child. * @apilevel high-level * @ast method * */ public Expr getLeftOperand() { return (Expr)getChild(0); } /** * Retrieves the LeftOperand child. * <p><em>This method does not invoke AST transformations.</em></p> * @return The current node used as the LeftOperand child. * @apilevel low-level * @ast method * */ public Expr getLeftOperandNoTransform() { return (Expr)getChildNoTransform(0); } /** * Replaces the RightOperand child. * @param node The new node to replace the RightOperand child. * @apilevel high-level * @ast method * */ public void setRightOperand(Expr node) { setChild(node, 1); } /** * Retrieves the RightOperand child. * @return The current node used as the RightOperand child. * @apilevel high-level * @ast method * */ public Expr getRightOperand() { return (Expr)getChild(1); } /** * Retrieves the RightOperand child. * <p><em>This method does not invoke AST transformations.</em></p> * @return The current node used as the RightOperand child. * @apilevel low-level * @ast method * */ public Expr getRightOperandNoTransform() { return (Expr)getChildNoTransform(1); } /** * @apilevel internal */ protected boolean type_computed = false; /** * @apilevel internal */ protected TypeDecl type_value; /** * @attribute syn * @aspect TypeAnalysis * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeAnalysis.jrag:341 */ @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; } /** * @apilevel internal */ private TypeDecl type_compute() { return getLeftOperand().type().unaryNumericPromotion(); } /** * @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); } }
4,961
23.087379
107
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/ShortType.java
/* This file was generated with JastAdd2 (http://jastadd.org) version R20130212 (r1031) */ package soot.JastAddJ; import java.util.HashSet; 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; /** * @production ShortType : {@link IntegralType}; * @ast node * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/java.ast:57 */ public class ShortType extends IntegralType implements Cloneable { /** * @apilevel low-level */ public void flushCache() { super.flushCache(); narrowingConversionTo_TypeDecl_values = null; unaryNumericPromotion_computed = false; unaryNumericPromotion_value = null; boxed_computed = false; boxed_value = null; jvmName_computed = false; jvmName_value = null; getSootType_computed = false; getSootType_value = null; } /** * @apilevel internal */ public void flushCollectionCache() { super.flushCollectionCache(); } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public ShortType clone() throws CloneNotSupportedException { ShortType node = (ShortType)super.clone(); node.narrowingConversionTo_TypeDecl_values = null; node.unaryNumericPromotion_computed = false; node.unaryNumericPromotion_value = null; 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; } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public ShortType copy() { try { ShortType node = (ShortType) clone(); node.parent = null; if(children != null) node.children = (ASTNode[]) children.clone(); return node; } catch (CloneNotSupportedException e) { throw new Error("Error: clone not supported for " + getClass().getName()); } } /** * Create a deep copy of the AST subtree at this node. * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level */ @SuppressWarnings({"unchecked", "cast"}) public ShortType fullCopy() { ShortType tree = (ShortType) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) children[i]; if(child != null) { child = child.fullCopy(); tree.setChild(child, i); } } } return tree; } /** * @ast method * @aspect PrettyPrint * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/PrettyPrint.jadd:838 */ public void toString(StringBuffer s) { s.append("short"); } /** * @ast method * */ public ShortType() { super(); } /** * Initializes the child array to the correct size. * Initializes List and Opt nta children. * @apilevel internal * @ast method * @ast method * */ public void init$Children() { children = new ASTNode[3]; setChild(new Opt(), 1); setChild(new List(), 2); } /** * @ast method * */ public ShortType(Modifiers p0, String p1, Opt<Access> p2, List<BodyDecl> p3) { setChild(p0, 0); setID(p1); setChild(p2, 1); setChild(p3, 2); } /** * @ast method * */ public ShortType(Modifiers p0, beaver.Symbol p1, Opt<Access> p2, List<BodyDecl> p3) { setChild(p0, 0); setID(p1); setChild(p2, 1); setChild(p3, 2); } /** * @apilevel low-level * @ast method * */ protected int numChildren() { return 3; } /** * @apilevel internal * @ast method * */ public boolean mayHaveRewrite() { return false; } /** * Replaces the Modifiers child. * @param node The new node to replace the Modifiers child. * @apilevel high-level * @ast method * */ public void setModifiers(Modifiers node) { setChild(node, 0); } /** * Retrieves the Modifiers child. * @return The current node used as the Modifiers child. * @apilevel high-level * @ast method * */ public Modifiers getModifiers() { return (Modifiers)getChild(0); } /** * Retrieves the Modifiers child. * <p><em>This method does not invoke AST transformations.</em></p> * @return The current node used as the Modifiers child. * @apilevel low-level * @ast method * */ public Modifiers getModifiersNoTransform() { return (Modifiers)getChildNoTransform(0); } /** * Replaces the lexeme ID. * @param value The new value for the lexeme ID. * @apilevel high-level * @ast method * */ public void setID(String value) { tokenString_ID = value; } /** * JastAdd-internal setter for lexeme ID using the Beaver parser. * @apilevel internal * @ast method * */ 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(); } /** * Retrieves the value for the lexeme ID. * @return The value for the lexeme ID. * @apilevel high-level * @ast method * */ public String getID() { return tokenString_ID != null ? tokenString_ID : ""; } /** * Replaces the optional node for the SuperClassAccess child. This is the {@code Opt} node containing the child SuperClassAccess, not the actual child! * @param opt The new node to be used as the optional node for the SuperClassAccess child. * @apilevel low-level * @ast method * */ public void setSuperClassAccessOpt(Opt<Access> opt) { setChild(opt, 1); } /** * Check whether the optional SuperClassAccess child exists. * @return {@code true} if the optional SuperClassAccess child exists, {@code false} if it does not. * @apilevel high-level * @ast method * */ public boolean hasSuperClassAccess() { return getSuperClassAccessOpt().getNumChild() != 0; } /** * Retrieves the (optional) SuperClassAccess child. * @return The SuperClassAccess child, if it exists. Returns {@code null} otherwise. * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public Access getSuperClassAccess() { return (Access)getSuperClassAccessOpt().getChild(0); } /** * Replaces the (optional) SuperClassAccess child. * @param node The new node to be used as the SuperClassAccess child. * @apilevel high-level * @ast method * */ public void setSuperClassAccess(Access node) { getSuperClassAccessOpt().setChild(node, 0); } /** * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public Opt<Access> getSuperClassAccessOpt() { return (Opt<Access>)getChild(1); } /** * Retrieves the optional node for child SuperClassAccess. This is the {@code Opt} node containing the child SuperClassAccess, not the actual child! * <p><em>This method does not invoke AST transformations.</em></p> * @return The optional node for child SuperClassAccess. * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public Opt<Access> getSuperClassAccessOptNoTransform() { return (Opt<Access>)getChildNoTransform(1); } /** * Replaces the BodyDecl list. * @param list The new list node to be used as the BodyDecl list. * @apilevel high-level * @ast method * */ public void setBodyDeclList(List<BodyDecl> list) { setChild(list, 2); } /** * Retrieves the number of children in the BodyDecl list. * @return Number of children in the BodyDecl list. * @apilevel high-level * @ast method * */ public int getNumBodyDecl() { return getBodyDeclList().getNumChild(); } /** * Retrieves the number of children in the BodyDecl list. * Calling this method will not trigger rewrites.. * @return Number of children in the BodyDecl list. * @apilevel low-level * @ast method * */ public int getNumBodyDeclNoTransform() { return getBodyDeclListNoTransform().getNumChildNoTransform(); } /** * Retrieves the element at index {@code i} in the BodyDecl list.. * @param i Index of the element to return. * @return The element at position {@code i} in the BodyDecl list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public BodyDecl getBodyDecl(int i) { return (BodyDecl)getBodyDeclList().getChild(i); } /** * Append an element to the BodyDecl list. * @param node The element to append to the BodyDecl list. * @apilevel high-level * @ast method * */ public void addBodyDecl(BodyDecl node) { List<BodyDecl> list = (parent == null || state == null) ? getBodyDeclListNoTransform() : getBodyDeclList(); list.addChild(node); } /** * @apilevel low-level * @ast method * */ public void addBodyDeclNoTransform(BodyDecl node) { List<BodyDecl> list = getBodyDeclListNoTransform(); list.addChild(node); } /** * Replaces the BodyDecl list element at index {@code i} with the new node {@code node}. * @param node The new node to replace the old list element. * @param i The list index of the node to be replaced. * @apilevel high-level * @ast method * */ public void setBodyDecl(BodyDecl node, int i) { List<BodyDecl> list = getBodyDeclList(); list.setChild(node, i); } /** * Retrieves the BodyDecl list. * @return The node representing the BodyDecl list. * @apilevel high-level * @ast method * */ public List<BodyDecl> getBodyDecls() { return getBodyDeclList(); } /** * Retrieves the BodyDecl list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the BodyDecl list. * @apilevel low-level * @ast method * */ public List<BodyDecl> getBodyDeclsNoTransform() { return getBodyDeclListNoTransform(); } /** * Retrieves the BodyDecl list. * @return The node representing the BodyDecl list. * @apilevel high-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<BodyDecl> getBodyDeclList() { List<BodyDecl> list = (List<BodyDecl>)getChild(2); list.getNumChild(); return list; } /** * Retrieves the BodyDecl list. * <p><em>This method does not invoke AST transformations.</em></p> * @return The node representing the BodyDecl list. * @apilevel low-level * @ast method * */ @SuppressWarnings({"unchecked", "cast"}) public List<BodyDecl> getBodyDeclListNoTransform() { return (List<BodyDecl>)getChildNoTransform(2); } /** * @attribute syn * @aspect ConstantExpression * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/ConstantExpression.jrag:160 */ public Constant cast(Constant c) { ASTNode$State state = state(); try { return Constant.create((short)c.intValue()); } finally { } } protected java.util.Map narrowingConversionTo_TypeDecl_values; /** * @attribute syn * @aspect TypeConversion * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeAnalysis.jrag:28 */ @SuppressWarnings({"unchecked", "cast"}) public boolean narrowingConversionTo(TypeDecl type) { Object _parameters = type; if(narrowingConversionTo_TypeDecl_values == null) narrowingConversionTo_TypeDecl_values = new java.util.HashMap(4); if(narrowingConversionTo_TypeDecl_values.containsKey(_parameters)) { return ((Boolean)narrowingConversionTo_TypeDecl_values.get(_parameters)).booleanValue(); } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); boolean narrowingConversionTo_TypeDecl_value = narrowingConversionTo_compute(type); if(isFinal && num == state().boundariesCrossed) narrowingConversionTo_TypeDecl_values.put(_parameters, Boolean.valueOf(narrowingConversionTo_TypeDecl_value)); return narrowingConversionTo_TypeDecl_value; } /** * @apilevel internal */ private boolean narrowingConversionTo_compute(TypeDecl type) { return type.isByte() || type.isChar(); } /** * @apilevel internal */ protected boolean unaryNumericPromotion_computed = false; /** * @apilevel internal */ protected TypeDecl unaryNumericPromotion_value; /** * @attribute syn * @aspect NumericPromotion * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeAnalysis.jrag:150 */ @SuppressWarnings({"unchecked", "cast"}) public TypeDecl unaryNumericPromotion() { if(unaryNumericPromotion_computed) { return unaryNumericPromotion_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); unaryNumericPromotion_value = unaryNumericPromotion_compute(); if(isFinal && num == state().boundariesCrossed) unaryNumericPromotion_computed = true; return unaryNumericPromotion_value; } /** * @apilevel internal */ private TypeDecl unaryNumericPromotion_compute() { return typeInt(); } /** * @attribute syn * @aspect TypeAnalysis * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeAnalysis.jrag:189 */ public boolean isShort() { ASTNode$State state = state(); try { return true; } finally { } } /** * @apilevel internal */ protected boolean boxed_computed = false; /** * @apilevel internal */ protected TypeDecl boxed_value; /** * @attribute syn * @aspect AutoBoxing * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/AutoBoxing.jrag:39 */ @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; } /** * @apilevel internal */ private TypeDecl boxed_compute() { return lookupType("java.lang", "Short"); } /** * @attribute syn * @aspect InnerClasses * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Backend/InnerClasses.jrag:82 */ public TypeDecl stringPromotion() { ASTNode$State state = state(); try { return typeInt(); } finally { } } /** * @apilevel internal */ protected boolean jvmName_computed = false; /** * @apilevel internal */ protected String jvmName_value; /** * @attribute syn * @aspect Java2Rewrites * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Backend/Java2Rewrites.jrag:37 */ @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; } /** * @apilevel internal */ private String jvmName_compute() { return "S"; } /** * @attribute syn * @aspect Java2Rewrites * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Backend/Java2Rewrites.jrag:44 */ public String primitiveClassName() { ASTNode$State state = state(); try { return "Short"; } finally { } } /** * @apilevel internal */ protected boolean getSootType_computed = false; /** * @apilevel internal */ protected Type getSootType_value; /** * @attribute syn * @aspect EmitJimple * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/EmitJimple.jrag:49 */ @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; } /** * @apilevel internal */ private Type getSootType_compute() { return soot.ShortType.v(); } /** * @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); } }
17,224
27.377265
164
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/Signatures.java
package soot.JastAddJ; import java.util.HashSet; 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; /** * @ast class * */ public class Signatures extends java.lang.Object { // simple parser framework String data; int pos; public Signatures(String s) { data = s; pos = 0; } public boolean next(String s) { for(int i = 0; i < s.length(); i++) if(data.charAt(pos + i) != s.charAt(i)) return false; return true; } public void eat(String s) { for(int i = 0; i < s.length(); i++) if(data.charAt(pos + i) != s.charAt(i)) error(s); pos += s.length(); } public void error(String s) { throw new Error("Expected " + s + " but found " + data.substring(pos)); } public String identifier() { int i = pos; while(Character.isJavaIdentifierPart(data.charAt(i))) i++; String result = data.substring(pos, i); pos = i; return result; } public boolean eof() { return pos == data.length(); } // 4.4.4 Signatures public static class ClassSignature extends Signatures { public ClassSignature(String s) { super(s); classSignature(); } void classSignature() { if(next("<")) formalTypeParameters(); superclassSignature = parseSuperclassSignature(); while(!eof()) { superinterfaceSignature.add(parseSuperinterfaceSignature()); } } public boolean hasFormalTypeParameters() { return typeParameters != null; } public List typeParameters() { return typeParameters; } public boolean hasSuperclassSignature() { return superclassSignature != null; } public Access superclassSignature() { return superclassSignature; } protected Access superclassSignature; public boolean hasSuperinterfaceSignature() { return superinterfaceSignature.getNumChildNoTransform() != 0; } public List superinterfaceSignature() { return superinterfaceSignature; } protected List superinterfaceSignature = new List(); Access parseSuperclassSignature() { return classTypeSignature(); } Access parseSuperinterfaceSignature() { return classTypeSignature(); } } public static class FieldSignature extends Signatures { public FieldSignature(String s) { super(s); fieldTypeAccess = fieldTypeSignature(); } Access fieldTypeAccess() { return fieldTypeAccess; } private Access fieldTypeAccess; } public static class MethodSignature extends Signatures { public MethodSignature(String s) { super(s); methodTypeSignature(); } void methodTypeSignature() { if(next("<")) formalTypeParameters(); eat("("); while(!next(")")) { parameterTypes.add(typeSignature()); } eat(")"); returnType = parseReturnType(); while(!eof()) { exceptionList.add(throwsSignature()); } } Access parseReturnType() { if(next("V")) { eat("V"); return new PrimitiveTypeAccess("void"); } else { return typeSignature(); } } Access throwsSignature() { eat("^"); if(next("L")) { return classTypeSignature(); } else { return typeVariableSignature(); } } public boolean hasFormalTypeParameters() { return typeParameters != null; } public List typeParameters() { return typeParameters; } public Collection parameterTypes() { return parameterTypes; } protected Collection parameterTypes = new ArrayList(); public List exceptionList() { return exceptionList; } public boolean hasExceptionList() { return exceptionList.getNumChildNoTransform() != 0; } protected List exceptionList = new List(); protected Access returnType = null; public boolean hasReturnType() { return returnType != null; } public Access returnType() { return returnType; } } protected List typeParameters; void formalTypeParameters() { eat("<"); typeParameters = new List(); do { typeParameters.add(formalTypeParameter()); } while(!next(">")); eat(">"); } TypeVariable formalTypeParameter() { String id = identifier(); List bounds = new List(); Access classBound = classBound(); if(classBound != null) bounds.add(classBound); while(next(":")) { bounds.add(interfaceBound()); } if(bounds.getNumChildNoTransform() == 0) bounds.add(new TypeAccess("java.lang", "Object")); return new TypeVariable(new Modifiers(new List()), id, new List(), bounds); } Access classBound() { eat(":"); if(nextIsFieldTypeSignature()) { return fieldTypeSignature(); } else { return null; //return new TypeAccess("java.lang", "Object"); } } Access interfaceBound() { eat(":"); return fieldTypeSignature(); } Access fieldTypeSignature() { if(next("L")) return classTypeSignature(); else if(next("[")) return arrayTypeSignature(); else if(next("T")) return typeVariableSignature(); else error("L or [ or T"); return null; // error never returns } boolean nextIsFieldTypeSignature() { return next("L") || next("[") || next("T"); } Access classTypeSignature() { eat("L"); // Package and Type Name StringBuffer packageName = new StringBuffer(); String typeName = identifier(); while(next("/")) { eat("/"); if(packageName.length() != 0) packageName.append("."); packageName.append(typeName); typeName = identifier(); } Access a = typeName.indexOf('$') == -1 ? new TypeAccess(packageName.toString(), typeName) : new BytecodeTypeAccess(packageName.toString(), typeName); if(next("<")) { // type arguments of top level type a = new ParTypeAccess(a, typeArguments()); } while(next(".")) { // inner classes a = a.qualifiesAccess(classTypeSignatureSuffix()); } eat(";"); return a; } Access classTypeSignatureSuffix() { eat("."); String id = identifier(); Access a = id.indexOf('$') == -1 ? new TypeAccess(id) : new BytecodeTypeAccess("", id); if(next("<")) { a = new ParTypeAccess(a, typeArguments()); } return a; } Access typeVariableSignature() { eat("T"); String id = identifier(); eat(";"); return new TypeAccess(id); } List typeArguments() { eat("<"); List list = new List(); do { list.add(typeArgument()); } while(!next(">")); eat(">"); return list; } Access typeArgument() { if(next("*")) { eat("*"); return new Wildcard(); } else if(next("+")) { eat("+"); return new WildcardExtends(fieldTypeSignature()); } else if(next("-")) { eat("-"); return new WildcardSuper(fieldTypeSignature()); } else { return fieldTypeSignature(); } } Access arrayTypeSignature() { eat("["); return new ArrayTypeAccess(typeSignature()); } Access typeSignature() { if(nextIsFieldTypeSignature()) { return fieldTypeSignature(); } else { return baseType(); } } Access baseType() { if(next("B")) { eat("B"); return new PrimitiveTypeAccess("byte"); } else if(next("C")) { eat("C"); return new PrimitiveTypeAccess("char"); } else if(next("D")) { eat("D"); return new PrimitiveTypeAccess("double"); } else if(next("F")) { eat("F"); return new PrimitiveTypeAccess("float"); } else if(next("I")) { eat("I"); return new PrimitiveTypeAccess("int"); } else if(next("J")) { eat("J"); return new PrimitiveTypeAccess("long"); } else if(next("S")) { eat("S"); return new PrimitiveTypeAccess("short"); } else if(next("Z")) { eat("Z"); return new PrimitiveTypeAccess("boolean"); } error("baseType"); return null; // error never returns } }
8,824
22.723118
115
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/SimpleSet.java
package soot.JastAddJ; import java.util.HashSet; 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; /** * @ast interface * */ public interface SimpleSet { int size(); boolean isEmpty(); SimpleSet add(Object o); Iterator iterator(); boolean contains(Object o); boolean isSingleton(); boolean isSingleton(Object o); SimpleSet emptySet = new SimpleSet() { public int size() { return 0; } public boolean isEmpty() { return true; } public SimpleSet add(Object o) { if(o instanceof SimpleSet) return (SimpleSet)o; return new SimpleSetImpl().add(o); } public boolean contains(Object o) { return false; } public Iterator iterator() { return Collections.EMPTY_LIST.iterator(); } public boolean isSingleton() { return false; } public boolean isSingleton(Object o) { return false; } }; SimpleSet fullSet = new SimpleSet() { public int size() { throw new Error("Operation size not supported on the full set"); } public boolean isEmpty() { return false; } public SimpleSet add(Object o) { return this; } public boolean contains(Object o) { return true; } public Iterator iterator() { throw new Error("Operation iterator not support on the full set"); } public boolean isSingleton() { return false; } public boolean isSingleton(Object o) { return false; } }; class SimpleSetImpl implements SimpleSet { private HashSet internalSet; public SimpleSetImpl() { internalSet = new HashSet(4); } public SimpleSetImpl(java.util.Collection c) { internalSet = new HashSet(c.size()); internalSet.addAll(c); } private SimpleSetImpl(SimpleSetImpl set) { this.internalSet = new HashSet(set.internalSet); } public int size() { return internalSet.size(); } public boolean isEmpty() { return internalSet.isEmpty(); } public SimpleSet add(Object o) { if(internalSet.contains(o)) return this; SimpleSetImpl set = new SimpleSetImpl(this); set.internalSet.add(o); return set; } public Iterator iterator() { return internalSet.iterator(); } public boolean contains(Object o) { return internalSet.contains(o); } public boolean isSingleton() { return internalSet.size() == 1; } public boolean isSingleton(Object o) { return isSingleton() && contains(o); } } }
2,939
25.972477
103
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/SingleStaticImportDecl.java
/* This file was generated with JastAdd2 (http://jastadd.org) version R20130212 (r1031) */ package soot.JastAddJ; import java.util.HashSet; 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.3 A single-static-import declaration imports all accessible (\ufffd\ufffd6.6) static members * with a given simple name from a type. This makes these static members available * under their simple name in the class and interface declarations of the * compilation unit in which the single-static import declaration appears. * @production SingleStaticImportDecl : {@link StaticImportDecl} ::= <span class="component">&lt;ID:String&gt;</span>; * @ast node * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/StaticImports.ast:12 */ public class SingleStaticImportDecl 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 SingleStaticImportDecl clone() throws CloneNotSupportedException { SingleStaticImportDecl node = (SingleStaticImportDecl)super.clone(); node.in$Circle(false); node.is$Final(false); return node; } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public SingleStaticImportDecl copy() { try { SingleStaticImportDecl node = (SingleStaticImportDecl) clone(); node.parent = null; if(children != null) node.children = (ASTNode[]) children.clone(); return node; } catch (CloneNotSupportedException e) { throw new Error("Error: clone not supported for " + getClass().getName()); } } /** * Create a deep copy of the AST subtree at this node. * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level */ @SuppressWarnings({"unchecked", "cast"}) public SingleStaticImportDecl fullCopy() { SingleStaticImportDecl tree = (SingleStaticImportDecl) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) children[i]; if(child != null) { child = child.fullCopy(); tree.setChild(child, i); } } } return tree; } /** * @ast method * @aspect StaticImports * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/StaticImports.jrag:61 */ public void typeCheck() { if(!getAccess().type().typeName().equals(typeName()) && !getAccess().type().isUnknown()) error("Single-type import " + typeName() + " is not the canonical name of type " + getAccess().type().typeName()); } /** * @ast method * @aspect StaticImports * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/StaticImports.jrag:93 */ public void nameCheck() { if(importedFields(name()).isEmpty() && importedMethods(name()).isEmpty() && importedTypes(name()).isEmpty() && !getAccess().type().isUnknown()) { error("Semantic Error: At least one static member named " + name() + " must be available in static imported type " + type().fullName()); } } /** * @ast method * @aspect StaticImports * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/StaticImports.jrag:207 */ public void toString(StringBuffer s) { s.append("import static "); getAccess().toString(s); s.append("." + getID()); s.append(";\n"); } /** * @ast method * */ public SingleStaticImportDecl() { super(); } /** * Initializes the child array to the correct size. * Initializes List and Opt nta children. * @apilevel internal * @ast method * @ast method * */ public void init$Children() { children = new ASTNode[1]; } /** * @ast method * */ public SingleStaticImportDecl(Access p0, String p1) { setChild(p0, 0); setID(p1); } /** * @ast method * */ public SingleStaticImportDecl(Access p0, beaver.Symbol p1) { setChild(p0, 0); setID(p1); } /** * @apilevel low-level * @ast method * */ protected int numChildren() { return 1; } /** * @apilevel internal * @ast method * */ public boolean mayHaveRewrite() { return false; } /** * Replaces the Access child. * @param node The new node to replace the Access child. * @apilevel high-level * @ast method * */ public void setAccess(Access node) { setChild(node, 0); } /** * Retrieves the Access child. * @return The current node used as the Access child. * @apilevel high-level * @ast method * */ public Access getAccess() { return (Access)getChild(0); } /** * Retrieves the Access child. * <p><em>This method does not invoke AST transformations.</em></p> * @return The current node used as the Access child. * @apilevel low-level * @ast method * */ public Access getAccessNoTransform() { return (Access)getChildNoTransform(0); } /** * Replaces the lexeme ID. * @param value The new value for the lexeme ID. * @apilevel high-level * @ast method * */ public void setID(String value) { tokenString_ID = value; } /** * @apilevel internal * @ast method * */ /** * @apilevel internal */ protected String tokenString_ID; /** * @ast method * */ public int IDstart; /** * @ast method * */ public int IDend; /** * JastAdd-internal setter for lexeme ID using the Beaver parser. * @apilevel internal * @ast method * */ 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(); } /** * Retrieves the value for the lexeme ID. * @return The value for the lexeme ID. * @apilevel high-level * @ast method * */ public String getID() { return tokenString_ID != null ? tokenString_ID : ""; } /** * @attribute syn * @aspect StaticImports * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/StaticImports.jrag:53 */ public TypeDecl type() { ASTNode$State state = state(); try { return getAccess().type(); } finally { } } /** * @attribute syn * @aspect StaticImports * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/StaticImports.jrag:99 */ public String name() { ASTNode$State state = state(); try { return getID(); } finally { } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/StaticImports.jrag:203 * @apilevel internal */ public NameType Define_NameType_nameType(ASTNode caller, ASTNode child) { if(caller == getAccessNoTransform()) { return NameType.TYPE_NAME; } else { return getParent().Define_NameType_nameType(this, caller); } } /** * @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); } }
7,837
25.302013
142
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/SingleTypeImportDecl.java
/* This file was generated with JastAdd2 (http://jastadd.org) version R20130212 (r1031) */ package soot.JastAddJ; import java.util.HashSet; 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; /** * @production SingleTypeImportDecl : {@link ImportDecl}; * @ast node * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/java.ast:11 */ public class SingleTypeImportDecl extends ImportDecl implements Cloneable { /** * @apilevel low-level */ public void flushCache() { super.flushCache(); importedTypes_String_values = null; } /** * @apilevel internal */ public void flushCollectionCache() { super.flushCollectionCache(); } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public SingleTypeImportDecl clone() throws CloneNotSupportedException { SingleTypeImportDecl node = (SingleTypeImportDecl)super.clone(); node.importedTypes_String_values = null; node.in$Circle(false); node.is$Final(false); return node; } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public SingleTypeImportDecl copy() { try { SingleTypeImportDecl node = (SingleTypeImportDecl) clone(); node.parent = null; if(children != null) node.children = (ASTNode[]) children.clone(); return node; } catch (CloneNotSupportedException e) { throw new Error("Error: clone not supported for " + getClass().getName()); } } /** * Create a deep copy of the AST subtree at this node. * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level */ @SuppressWarnings({"unchecked", "cast"}) public SingleTypeImportDecl fullCopy() { SingleTypeImportDecl tree = (SingleTypeImportDecl) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) children[i]; if(child != null) { child = child.fullCopy(); tree.setChild(child, i); } } } return tree; } /** * @ast method * @aspect NameCheck * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/NameCheck.jrag:20 */ public void nameCheck() { if(!getAccess().type().typeName().equals(typeName()) && !getAccess().type().isUnknown()) error("Single-type import " + typeName() + " is not the canonical name of type " + getAccess().type().typeName()); else if(allImportedTypes(getAccess().type().name()).size() > 1) error(getAccess().type().name() + " is imported multiple times"); } /** * @ast method * @aspect PrettyPrint * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/PrettyPrint.jadd:50 */ public void toString(StringBuffer s) { s.append("import "); getAccess().toString(s); s.append(";\n"); } /** * @ast method * */ public SingleTypeImportDecl() { super(); } /** * Initializes the child array to the correct size. * Initializes List and Opt nta children. * @apilevel internal * @ast method * @ast method * */ public void init$Children() { children = new ASTNode[1]; } /** * @ast method * */ public SingleTypeImportDecl(Access p0) { setChild(p0, 0); } /** * @apilevel low-level * @ast method * */ protected int numChildren() { return 1; } /** * @apilevel internal * @ast method * */ public boolean mayHaveRewrite() { return false; } /** * Replaces the Access child. * @param node The new node to replace the Access child. * @apilevel high-level * @ast method * */ public void setAccess(Access node) { setChild(node, 0); } /** * Retrieves the Access child. * @return The current node used as the Access child. * @apilevel high-level * @ast method * */ public Access getAccess() { return (Access)getChild(0); } /** * Retrieves the Access child. * <p><em>This method does not invoke AST transformations.</em></p> * @return The current node used as the Access child. * @apilevel low-level * @ast method * */ public Access getAccessNoTransform() { return (Access)getChildNoTransform(0); } protected java.util.Map importedTypes_String_values; /** * @attribute syn * @aspect TypeScopePropagation * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupType.jrag:323 */ @SuppressWarnings({"unchecked", "cast"}) public SimpleSet importedTypes(String name) { Object _parameters = name; if(importedTypes_String_values == null) importedTypes_String_values = new java.util.HashMap(4); if(importedTypes_String_values.containsKey(_parameters)) { return (SimpleSet)importedTypes_String_values.get(_parameters); } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); SimpleSet importedTypes_String_value = importedTypes_compute(name); if(isFinal && num == state().boundariesCrossed) importedTypes_String_values.put(_parameters, importedTypes_String_value); return importedTypes_String_value; } /** * @apilevel internal */ private SimpleSet importedTypes_compute(String name) { SimpleSet set = SimpleSet.emptySet; if(getAccess().type().name().equals(name)) set = set.add(getAccess().type()); return set; } /** * @attribute inh * @aspect NameCheck * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/NameCheck.jrag:26 */ @SuppressWarnings({"unchecked", "cast"}) public SimpleSet allImportedTypes(String name) { ASTNode$State state = state(); SimpleSet allImportedTypes_String_value = getParent().Define_SimpleSet_allImportedTypes(this, null, name); return allImportedTypes_String_value; } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/SyntacticClassification.jrag:72 * @apilevel internal */ public NameType Define_NameType_nameType(ASTNode caller, ASTNode child) { if(caller == getAccessNoTransform()) { return NameType.TYPE_NAME; } else { return getParent().Define_NameType_nameType(this, caller); } } /** * @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); } }
6,837
27.491667
127
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/StaticImportDecl.java
/* This file was generated with JastAdd2 (http://jastadd.org) version R20130212 (r1031) */ package soot.JastAddJ; import java.util.HashSet; 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 Import Declarations * @production StaticImportDecl : {@link ImportDecl}; * @ast node * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/StaticImports.ast:4 */ public abstract class StaticImportDecl extends ImportDecl implements Cloneable { /** * @apilevel low-level */ public void flushCache() { super.flushCache(); importedTypes_String_values = null; importedFields_String_values = null; importedMethods_String_values = null; } /** * @apilevel internal */ public void flushCollectionCache() { super.flushCollectionCache(); } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public StaticImportDecl clone() throws CloneNotSupportedException { StaticImportDecl node = (StaticImportDecl)super.clone(); node.importedTypes_String_values = null; node.importedFields_String_values = null; node.importedMethods_String_values = null; node.in$Circle(false); node.is$Final(false); return node; } /** * @ast method * */ public StaticImportDecl() { super(); } /** * Initializes the child array to the correct size. * Initializes List and Opt nta children. * @apilevel internal * @ast method * @ast method * */ public void init$Children() { children = new ASTNode[1]; } /** * @ast method * */ public StaticImportDecl(Access p0) { setChild(p0, 0); } /** * @apilevel low-level * @ast method * */ protected int numChildren() { return 1; } /** * @apilevel internal * @ast method * */ public boolean mayHaveRewrite() { return false; } /** * Replaces the Access child. * @param node The new node to replace the Access child. * @apilevel high-level * @ast method * */ public void setAccess(Access node) { setChild(node, 0); } /** * Retrieves the Access child. * @return The current node used as the Access child. * @apilevel high-level * @ast method * */ public Access getAccess() { return (Access)getChild(0); } /** * Retrieves the Access child. * <p><em>This method does not invoke AST transformations.</em></p> * @return The current node used as the Access child. * @apilevel low-level * @ast method * */ public Access getAccessNoTransform() { return (Access)getChildNoTransform(0); } /** * @attribute syn * @aspect StaticImports * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/StaticImports.jrag:53 */ @SuppressWarnings({"unchecked", "cast"}) public abstract TypeDecl type(); protected java.util.Map importedTypes_String_values; /* 7.5.3 A single-static-import declaration imports all accessible (\ufffd6.6) static members with a given simple name from a type. This makes these static members available under their simple name in the class and interface declarations of the compilation unit in which the single-static import declaration appears.* @attribute syn * @aspect StaticImports * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/StaticImports.jrag:21 */ @SuppressWarnings({"unchecked", "cast"}) public SimpleSet importedTypes(String name) { Object _parameters = name; if(importedTypes_String_values == null) importedTypes_String_values = new java.util.HashMap(4); if(importedTypes_String_values.containsKey(_parameters)) { return (SimpleSet)importedTypes_String_values.get(_parameters); } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); SimpleSet importedTypes_String_value = importedTypes_compute(name); if(isFinal && num == state().boundariesCrossed) importedTypes_String_values.put(_parameters, importedTypes_String_value); return importedTypes_String_value; } /** * @apilevel internal */ private SimpleSet importedTypes_compute(String name) { SimpleSet set = SimpleSet.emptySet; for(Iterator iter = type().memberTypes(name).iterator(); iter.hasNext(); ) { TypeDecl decl = (TypeDecl)iter.next(); if(decl.isStatic() && decl.accessibleFromPackage(packageName())) set = set.add(decl); } return set; } protected java.util.Map importedFields_String_values; /** * @attribute syn * @aspect StaticImports * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/StaticImports.jrag:31 */ @SuppressWarnings({"unchecked", "cast"}) public SimpleSet importedFields(String name) { Object _parameters = name; if(importedFields_String_values == null) importedFields_String_values = new java.util.HashMap(4); if(importedFields_String_values.containsKey(_parameters)) { return (SimpleSet)importedFields_String_values.get(_parameters); } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); SimpleSet importedFields_String_value = importedFields_compute(name); if(isFinal && num == state().boundariesCrossed) importedFields_String_values.put(_parameters, importedFields_String_value); return importedFields_String_value; } /** * @apilevel internal */ private SimpleSet importedFields_compute(String name) { SimpleSet set = SimpleSet.emptySet; for(Iterator iter = type().memberFields(name).iterator(); iter.hasNext(); ) { FieldDeclaration decl = (FieldDeclaration)iter.next(); if(decl.isStatic() && (decl.isPublic() || (!decl.isPrivate() && decl.hostType().topLevelType().packageName().equals(packageName())))) set = set.add(decl); } return set; } protected java.util.Map importedMethods_String_values; /** * @attribute syn * @aspect StaticImports * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/StaticImports.jrag:42 */ @SuppressWarnings({"unchecked", "cast"}) public Collection importedMethods(String name) { Object _parameters = name; if(importedMethods_String_values == null) importedMethods_String_values = new java.util.HashMap(4); if(importedMethods_String_values.containsKey(_parameters)) { return (Collection)importedMethods_String_values.get(_parameters); } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); Collection importedMethods_String_value = importedMethods_compute(name); if(isFinal && num == state().boundariesCrossed) importedMethods_String_values.put(_parameters, importedMethods_String_value); return importedMethods_String_value; } /** * @apilevel internal */ private Collection importedMethods_compute(String name) { Collection set = new HashSet(); for(Iterator iter = type().memberMethods(name).iterator(); iter.hasNext(); ) { MethodDecl decl = (MethodDecl)iter.next(); if(decl.isStatic() && (decl.isPublic() || (!decl.isPrivate() && decl.hostType().topLevelType().packageName().equals(packageName())))) set.add(decl); } return set; } /** * @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); } }
7,833
31.106557
131
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/StaticImportOnDemandDecl.java
/* This file was generated with JastAdd2 (http://jastadd.org) version R20130212 (r1031) */ package soot.JastAddJ; import java.util.HashSet; 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 (\ufffd\ufffd6.6) static * members declared in the type named by a canonical name to be imported as * needed. * @production StaticImportOnDemandDecl : {@link StaticImportDecl}; * @ast node * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/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(); node.parent = null; if(children != null) node.children = (ASTNode[]) children.clone(); return node; } catch (CloneNotSupportedException e) { throw new Error("Error: clone not supported for " + getClass().getName()); } } /** * Create a deep copy of the AST subtree at this node. * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level */ @SuppressWarnings({"unchecked", "cast"}) public StaticImportOnDemandDecl fullCopy() { StaticImportOnDemandDecl tree = (StaticImportOnDemandDecl) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) children[i]; if(child != null) { child = child.fullCopy(); tree.setChild(child, i); } } } return tree; } /** * @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 * */ public StaticImportOnDemandDecl() { super(); } /** * Initializes the child array to the correct size. * Initializes List and Opt nta children. * @apilevel internal * @ast method * @ast method * */ public void init$Children() { children = new ASTNode[1]; } /** * @ast method * */ public StaticImportOnDemandDecl(Access p0) { setChild(p0, 0); } /** * @apilevel low-level * @ast method * */ protected int numChildren() { return 1; } /** * @apilevel internal * @ast method * */ public boolean mayHaveRewrite() { return false; } /** * Replaces the Access child. * @param node The new node to replace the Access child. * @apilevel high-level * @ast method * */ public void setAccess(Access node) { setChild(node, 0); } /** * Retrieves the Access child. * @return The current node used as the Access child. * @apilevel high-level * @ast method * */ public Access getAccess() { return (Access)getChild(0); } /** * Retrieves the Access child. * <p><em>This method does not invoke AST transformations.</em></p> * @return The current node used as the Access child. * @apilevel low-level * @ast method * */ public Access getAccessNoTransform() { return (Access)getChildNoTransform(0); } /** * @attribute syn * @aspect StaticImports * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/StaticImports.jrag:53 */ public TypeDecl type() { ASTNode$State state = state(); try { return getAccess().type(); } finally { } } /** * @attribute syn * @aspect TypeScopePropagation * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupType.jrag:351 */ public boolean isOnDemand() { ASTNode$State state = state(); try { return true; } finally { } } /** * @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; } else { return getParent().Define_NameType_nameType(this, caller); } } /** * @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); } }
5,426
24.599057
108
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/StaticInitializer.java
/* This file was generated with JastAdd2 (http://jastadd.org) version R20130212 (r1031) */ package soot.JastAddJ; import java.util.HashSet; 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; /** * @production StaticInitializer : {@link BodyDecl} ::= <span class="component">{@link Block}</span>; * @ast node * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/java.ast:74 */ public class StaticInitializer extends BodyDecl implements Cloneable { /** * @apilevel low-level */ public void flushCache() { super.flushCache(); isDAafter_Variable_values = null; isDUafter_Variable_values = null; handlesException_TypeDecl_values = null; } /** * @apilevel internal */ public void flushCollectionCache() { super.flushCollectionCache(); } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public StaticInitializer clone() throws CloneNotSupportedException { StaticInitializer node = (StaticInitializer)super.clone(); node.isDAafter_Variable_values = null; node.isDUafter_Variable_values = null; node.handlesException_TypeDecl_values = null; node.in$Circle(false); node.is$Final(false); return node; } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public StaticInitializer copy() { try { StaticInitializer node = (StaticInitializer) clone(); node.parent = null; if(children != null) node.children = (ASTNode[]) children.clone(); return node; } catch (CloneNotSupportedException e) { throw new Error("Error: clone not supported for " + getClass().getName()); } } /** * Create a deep copy of the AST subtree at this node. * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level */ @SuppressWarnings({"unchecked", "cast"}) public StaticInitializer fullCopy() { StaticInitializer tree = (StaticInitializer) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) children[i]; if(child != null) { child = child.fullCopy(); tree.setChild(child, i); } } } return tree; } /** * @ast method * @aspect Modifiers * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/Modifiers.jrag:179 */ public void checkModifiers() { super.checkModifiers(); if(hostType().isInnerClass()) error("*** Inner classes may not declare static initializers"); } /** * @ast method * @aspect PrettyPrint * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/PrettyPrint.jadd:112 */ public void toString(StringBuffer s) { if(getBlock().getNumStmt() == 0) return; s.append(indent()); s.append("static "); getBlock().toString(s); } /** * @ast method * @aspect UnreachableStatements * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/UnreachableStatements.jrag:18 */ void checkUnreachableStmt() { if(!getBlock().canCompleteNormally()) error("static initializer in " + hostType().fullName() + " can not complete normally"); } /** * @ast method * */ public StaticInitializer() { super(); } /** * Initializes the child array to the correct size. * Initializes List and Opt nta children. * @apilevel internal * @ast method * @ast method * */ public void init$Children() { children = new ASTNode[1]; } /** * @ast method * */ public StaticInitializer(Block p0) { setChild(p0, 0); } /** * @apilevel low-level * @ast method * */ protected int numChildren() { return 1; } /** * @apilevel internal * @ast method * */ public boolean mayHaveRewrite() { return false; } /** * Replaces the Block child. * @param node The new node to replace the Block child. * @apilevel high-level * @ast method * */ public void setBlock(Block node) { setChild(node, 0); } /** * Retrieves the Block child. * @return The current node used as the Block child. * @apilevel high-level * @ast method * */ public Block getBlock() { return (Block)getChild(0); } /** * Retrieves the Block child. * <p><em>This method does not invoke AST transformations.</em></p> * @return The current node used as the Block child. * @apilevel low-level * @ast method * */ public Block getBlockNoTransform() { return (Block)getChildNoTransform(0); } protected java.util.Map isDAafter_Variable_values; /** * @attribute syn * @aspect DA * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DefiniteAssignment.jrag:293 */ @SuppressWarnings({"unchecked", "cast"}) public boolean isDAafter(Variable v) { Object _parameters = v; if(isDAafter_Variable_values == null) isDAafter_Variable_values = new java.util.HashMap(4); if(isDAafter_Variable_values.containsKey(_parameters)) { return ((Boolean)isDAafter_Variable_values.get(_parameters)).booleanValue(); } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); boolean isDAafter_Variable_value = isDAafter_compute(v); if(isFinal && num == state().boundariesCrossed) isDAafter_Variable_values.put(_parameters, Boolean.valueOf(isDAafter_Variable_value)); return isDAafter_Variable_value; } /** * @apilevel internal */ private boolean isDAafter_compute(Variable v) { return getBlock().isDAafter(v); } protected java.util.Map isDUafter_Variable_values; /** * @attribute syn * @aspect DU * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DefiniteAssignment.jrag:750 */ @SuppressWarnings({"unchecked", "cast"}) public boolean isDUafter(Variable v) { Object _parameters = v; if(isDUafter_Variable_values == null) isDUafter_Variable_values = new java.util.HashMap(4); if(isDUafter_Variable_values.containsKey(_parameters)) { return ((Boolean)isDUafter_Variable_values.get(_parameters)).booleanValue(); } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); boolean isDUafter_Variable_value = isDUafter_compute(v); if(isFinal && num == state().boundariesCrossed) isDUafter_Variable_values.put(_parameters, Boolean.valueOf(isDUafter_Variable_value)); return isDUafter_Variable_value; } /** * @apilevel internal */ private boolean isDUafter_compute(Variable v) { return getBlock().isDUafter(v); } /** * @attribute syn * @aspect GenericsParTypeDecl * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/GenericsParTypeDecl.jrag:67 */ public boolean visibleTypeParameters() { ASTNode$State state = state(); try { return false; } finally { } } protected java.util.Map handlesException_TypeDecl_values; /** * @attribute inh * @aspect ExceptionHandling * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/ExceptionHandling.jrag:47 */ @SuppressWarnings({"unchecked", "cast"}) public boolean handlesException(TypeDecl exceptionType) { Object _parameters = exceptionType; if(handlesException_TypeDecl_values == null) handlesException_TypeDecl_values = new java.util.HashMap(4); if(handlesException_TypeDecl_values.containsKey(_parameters)) { return ((Boolean)handlesException_TypeDecl_values.get(_parameters)).booleanValue(); } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); boolean handlesException_TypeDecl_value = getParent().Define_boolean_handlesException(this, null, exceptionType); if(isFinal && num == state().boundariesCrossed) handlesException_TypeDecl_values.put(_parameters, Boolean.valueOf(handlesException_TypeDecl_value)); return handlesException_TypeDecl_value; } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DefiniteAssignment.jrag:439 * @apilevel internal */ public boolean Define_boolean_isDAbefore(ASTNode caller, ASTNode child, Variable v) { if(caller == getBlockNoTransform()) { return isDAbefore(v); } else { return getParent().Define_boolean_isDAbefore(this, caller, v); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/ExceptionHandling.jrag:193 * @apilevel internal */ public boolean Define_boolean_handlesException(ASTNode caller, ASTNode child, TypeDecl exceptionType) { if(caller == getBlockNoTransform()) { return hostType().isAnonymous() ? handlesException(exceptionType) : !exceptionType.isUncheckedException(); } else { return getParent().Define_boolean_handlesException(this, caller, exceptionType); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeCheck.jrag:507 * @apilevel internal */ public TypeDecl Define_TypeDecl_enclosingInstance(ASTNode caller, ASTNode child) { if(caller == getBlockNoTransform()) { return null; } else { return getParent().Define_TypeDecl_enclosingInstance(this, caller); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeHierarchyCheck.jrag:139 * @apilevel internal */ public boolean Define_boolean_inStaticContext(ASTNode caller, ASTNode child) { if(caller == getBlockNoTransform()) { return true; } else { return getParent().Define_boolean_inStaticContext(this, caller); } } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/UnreachableStatements.jrag:34 * @apilevel internal */ public boolean Define_boolean_reachable(ASTNode caller, ASTNode child) { if(caller == getBlockNoTransform()) { return true; } else { return getParent().Define_boolean_reachable(this, caller); } } /** * @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); } }
10,728
30.931548
154
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/Stmt.java
/* This file was generated with JastAdd2 (http://jastadd.org) version R20130212 (r1031) */ package soot.JastAddJ; import java.util.HashSet; 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; /** * @production Stmt : {@link ASTNode}; * @ast node * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/java.ast:195 */ public abstract class Stmt extends ASTNode<ASTNode> implements Cloneable { /** * @apilevel low-level */ public void flushCache() { super.flushCache(); isDAafter_Variable_values = null; isDUafter_Variable_values = null; canCompleteNormally_computed = false; localNum_computed = false; } /** * @apilevel internal */ public void flushCollectionCache() { super.flushCollectionCache(); } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public Stmt clone() throws CloneNotSupportedException { Stmt node = (Stmt)super.clone(); node.isDAafter_Variable_values = null; node.isDUafter_Variable_values = null; node.canCompleteNormally_computed = false; node.localNum_computed = false; node.in$Circle(false); node.is$Final(false); return node; } /** * @ast method * @aspect UnreachableStatements * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/UnreachableStatements.jrag:14 */ void checkUnreachableStmt() { if(!reachable() && reportUnreachable()) error("statement is unreachable"); } /** * @ast method * @aspect Statements * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/Statements.jrag:12 */ public void jimplify2(Body b) { } /** * @ast method * */ public Stmt() { super(); } /** * Initializes the child array to the correct size. * Initializes List and Opt nta children. * @apilevel internal * @ast method * @ast method * */ public void init$Children() { } /** * @apilevel low-level * @ast method * */ protected int numChildren() { return 0; } /** * @apilevel internal * @ast method * */ public boolean mayHaveRewrite() { return false; } /** * @attribute syn * @aspect PreciseRethrow * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/PreciseRethrow.jrag:55 */ @SuppressWarnings({"unchecked", "cast"}) public abstract boolean modifiedInScope(Variable var); protected java.util.Map isDAafter_Variable_values; /** * @attribute syn * @aspect DA * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DefiniteAssignment.jrag:325 */ @SuppressWarnings({"unchecked", "cast"}) public boolean isDAafter(Variable v) { Object _parameters = v; if(isDAafter_Variable_values == null) isDAafter_Variable_values = new java.util.HashMap(4); if(isDAafter_Variable_values.containsKey(_parameters)) { return ((Boolean)isDAafter_Variable_values.get(_parameters)).booleanValue(); } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); boolean isDAafter_Variable_value = isDAafter_compute(v); if(isFinal && num == state().boundariesCrossed) isDAafter_Variable_values.put(_parameters, Boolean.valueOf(isDAafter_Variable_value)); return isDAafter_Variable_value; } /** * @apilevel internal */ private boolean isDAafter_compute(Variable v) { return isDAbefore(v); } protected java.util.Map isDUafter_Variable_values; /** * @attribute syn * @aspect DU * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DefiniteAssignment.jrag:777 */ @SuppressWarnings({"unchecked", "cast"}) public boolean isDUafter(Variable v) { Object _parameters = v; if(isDUafter_Variable_values == null) isDUafter_Variable_values = new java.util.HashMap(4); if(isDUafter_Variable_values.containsKey(_parameters)) { return ((Boolean)isDUafter_Variable_values.get(_parameters)).booleanValue(); } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); boolean isDUafter_Variable_value = isDUafter_compute(v); if(isFinal && num == state().boundariesCrossed) isDUafter_Variable_values.put(_parameters, Boolean.valueOf(isDUafter_Variable_value)); return isDUafter_Variable_value; } /** * @apilevel internal */ private boolean isDUafter_compute(Variable v) { throw new Error("isDUafter in " + getClass().getName()); } /** * @attribute syn * @aspect VariableScope * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupVariable.jrag:129 */ public boolean declaresVariable(String name) { ASTNode$State state = state(); try { return false; } finally { } } /** * @attribute syn * @aspect NameCheck * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/NameCheck.jrag:401 */ public boolean continueLabel() { ASTNode$State state = state(); try { return false; } finally { } } /** * @attribute syn * @aspect PrettyPrint * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/PrettyPrint.jadd:758 */ public boolean addsIndentationLevel() { ASTNode$State state = state(); try { return true; } finally { } } /** * @apilevel internal */ protected boolean canCompleteNormally_computed = false; /** * @apilevel internal */ protected boolean canCompleteNormally_value; /** * @attribute syn * @aspect UnreachableStatements * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/UnreachableStatements.jrag:29 */ @SuppressWarnings({"unchecked", "cast"}) public boolean canCompleteNormally() { if(canCompleteNormally_computed) { return canCompleteNormally_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); canCompleteNormally_value = canCompleteNormally_compute(); if(isFinal && num == state().boundariesCrossed) canCompleteNormally_computed = true; return canCompleteNormally_value; } /** * @apilevel internal */ private boolean canCompleteNormally_compute() { return true; } /** * @attribute syn * @aspect Statements * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/Statements.jrag:200 */ public soot.jimple.Stmt break_label() { ASTNode$State state = state(); try { throw new UnsupportedOperationException("Can not break at this statement of type " + getClass().getName()); } finally { } } /** * @attribute syn * @aspect Statements * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/Statements.jrag:225 */ public soot.jimple.Stmt continue_label() { ASTNode$State state = state(); try { throw new UnsupportedOperationException("Can not continue at this statement"); } finally { } } /** * @attribute inh * @aspect DA * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DefiniteAssignment.jrag:232 */ @SuppressWarnings({"unchecked", "cast"}) public boolean isDAbefore(Variable v) { ASTNode$State state = state(); boolean isDAbefore_Variable_value = getParent().Define_boolean_isDAbefore(this, null, v); return isDAbefore_Variable_value; } /** * @attribute inh * @aspect DU * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/DefiniteAssignment.jrag:691 */ @SuppressWarnings({"unchecked", "cast"}) public boolean isDUbefore(Variable v) { ASTNode$State state = state(); boolean isDUbefore_Variable_value = getParent().Define_boolean_isDUbefore(this, null, v); return isDUbefore_Variable_value; } /** * @attribute inh * @aspect LookupMethod * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupMethod.jrag:24 */ @SuppressWarnings({"unchecked", "cast"}) public Collection lookupMethod(String name) { ASTNode$State state = state(); Collection lookupMethod_String_value = getParent().Define_Collection_lookupMethod(this, null, name); return lookupMethod_String_value; } /** * @attribute inh * @aspect LookupFullyQualifiedTypes * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupType.jrag:96 */ @SuppressWarnings({"unchecked", "cast"}) public TypeDecl lookupType(String packageName, String typeName) { ASTNode$State state = state(); TypeDecl lookupType_String_String_value = getParent().Define_TypeDecl_lookupType(this, null, packageName, typeName); return lookupType_String_String_value; } /** * @attribute inh * @aspect TypeScopePropagation * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupType.jrag:262 */ @SuppressWarnings({"unchecked", "cast"}) public SimpleSet lookupType(String name) { ASTNode$State state = state(); SimpleSet lookupType_String_value = getParent().Define_SimpleSet_lookupType(this, null, name); return lookupType_String_value; } /** * @attribute inh * @aspect VariableScope * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupVariable.jrag:16 */ @SuppressWarnings({"unchecked", "cast"}) public SimpleSet lookupVariable(String name) { ASTNode$State state = state(); SimpleSet lookupVariable_String_value = getParent().Define_SimpleSet_lookupVariable(this, null, name); return lookupVariable_String_value; } /** * @attribute inh * @aspect NestedTypes * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeAnalysis.jrag:511 */ @SuppressWarnings({"unchecked", "cast"}) public BodyDecl enclosingBodyDecl() { ASTNode$State state = state(); BodyDecl enclosingBodyDecl_value = getParent().Define_BodyDecl_enclosingBodyDecl(this, null); return enclosingBodyDecl_value; } /** * @attribute inh * @aspect NestedTypes * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeAnalysis.jrag:587 */ @SuppressWarnings({"unchecked", "cast"}) public TypeDecl hostType() { ASTNode$State state = state(); TypeDecl hostType_value = getParent().Define_TypeDecl_hostType(this, null); return hostType_value; } /** * @attribute inh * @aspect UnreachableStatements * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/UnreachableStatements.jrag:27 */ @SuppressWarnings({"unchecked", "cast"}) public boolean reachable() { ASTNode$State state = state(); boolean reachable_value = getParent().Define_boolean_reachable(this, null); return reachable_value; } /** * @attribute inh * @aspect UnreachableStatements * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/UnreachableStatements.jrag:147 */ @SuppressWarnings({"unchecked", "cast"}) public boolean reportUnreachable() { ASTNode$State state = state(); boolean reportUnreachable_value = getParent().Define_boolean_reportUnreachable(this, null); return reportUnreachable_value; } /** * @apilevel internal */ protected boolean localNum_computed = false; /** * @apilevel internal */ protected int localNum_value; /** * @attribute inh * @aspect LocalNum * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/LocalNum.jrag:12 */ @SuppressWarnings({"unchecked", "cast"}) public int localNum() { if(localNum_computed) { return localNum_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); localNum_value = getParent().Define_int_localNum(this, null); if(isFinal && num == state().boundariesCrossed) localNum_computed = true; return localNum_value; } /** * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/PrettyPrint.jadd:352 * @apilevel internal */ public String Define_String_typeDeclIndent(ASTNode caller, ASTNode child) { { int childIndex = this.getIndexOfChild(caller); return indent(); } } /** * @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); } }
12,990
30.997537
140
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/StringLiteral.java
/* This file was generated with JastAdd2 (http://jastadd.org) version R20130212 (r1031) */ package soot.JastAddJ; import java.util.HashSet; 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; /** * String literal. * May not contain Unicode escape sequences (Unicode escapes * are transcoded by the scanner). * @production StringLiteral : {@link Literal}; * @ast node * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/Literals.ast:37 */ public class StringLiteral extends Literal implements Cloneable { /** * @apilevel low-level */ public void flushCache() { super.flushCache(); constant_computed = false; constant_value = null; type_computed = false; type_value = null; } /** * @apilevel internal */ public void flushCollectionCache() { super.flushCollectionCache(); } /** * @apilevel internal */ @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; } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public StringLiteral copy() { try { StringLiteral node = (StringLiteral) clone(); node.parent = null; if(children != null) node.children = (ASTNode[]) children.clone(); return node; } catch (CloneNotSupportedException e) { throw new Error("Error: clone not supported for " + getClass().getName()); } } /** * Create a deep copy of the AST subtree at this node. * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level */ @SuppressWarnings({"unchecked", "cast"}) public StringLiteral fullCopy() { StringLiteral tree = (StringLiteral) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) children[i]; if(child != null) { child = child.fullCopy(); tree.setChild(child, i); } } } return tree; } /** * @ast method * @aspect PrettyPrint * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/PrettyPrint.jadd:267 */ public void toString(StringBuffer s) { s.append("\"" + escape(getLITERAL()) + "\""); } /** * @ast method * @aspect Expressions * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/Expressions.jrag:32 */ public soot.Value eval(Body b) { return soot.jimple.StringConstant.v(getLITERAL()); } /** * @ast method * */ public StringLiteral() { super(); } /** * Initializes the child array to the correct size. * Initializes List and Opt nta children. * @apilevel internal * @ast method * @ast method * */ public void init$Children() { } /** * @ast method * */ public StringLiteral(String p0) { setLITERAL(p0); } /** * @ast method * */ public StringLiteral(beaver.Symbol p0) { setLITERAL(p0); } /** * @apilevel low-level * @ast method * */ protected int numChildren() { return 0; } /** * @apilevel internal * @ast method * */ public boolean mayHaveRewrite() { return false; } /** * Replaces the lexeme LITERAL. * @param value The new value for the lexeme LITERAL. * @apilevel high-level * @ast method * */ public void setLITERAL(String value) { tokenString_LITERAL = value; } /** * JastAdd-internal setter for lexeme LITERAL using the Beaver parser. * @apilevel internal * @ast method * */ 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(); } /** * Retrieves the value for the lexeme LITERAL. * @return The value for the lexeme LITERAL. * @apilevel high-level * @ast method * */ public String getLITERAL() { return tokenString_LITERAL != null ? tokenString_LITERAL : ""; } /** * @apilevel internal */ protected boolean constant_computed = false; /** * @apilevel internal */ protected Constant constant_value; /** * @attribute syn * @aspect ConstantExpression * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/ConstantExpression.jrag:158 */ @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; } /** * @apilevel internal */ private Constant constant_compute() { return Constant.create(getLITERAL()); } /** * @apilevel internal */ protected boolean type_computed = false; /** * @apilevel internal */ protected TypeDecl type_value; /** * @attribute syn * @aspect TypeAnalysis * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeAnalysis.jrag: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; } /** * @apilevel internal */ private TypeDecl type_compute() { return typeString(); } /** * @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); } }
6,592
24.455598
112
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/SubExpr.java
/* This file was generated with JastAdd2 (http://jastadd.org) version R20130212 (r1031) */ package soot.JastAddJ; import java.util.HashSet; 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; /** * @production SubExpr : {@link AdditiveExpr}; * @ast node * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/java.ast:159 */ public class SubExpr extends AdditiveExpr implements Cloneable { /** * @apilevel low-level */ public void flushCache() { super.flushCache(); } /** * @apilevel internal */ public void flushCollectionCache() { super.flushCollectionCache(); } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public SubExpr clone() throws CloneNotSupportedException { SubExpr node = (SubExpr)super.clone(); node.in$Circle(false); node.is$Final(false); return node; } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public SubExpr copy() { try { SubExpr node = (SubExpr) clone(); node.parent = null; if(children != null) node.children = (ASTNode[]) children.clone(); return node; } catch (CloneNotSupportedException e) { throw new Error("Error: clone not supported for " + getClass().getName()); } } /** * Create a deep copy of the AST subtree at this node. * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level */ @SuppressWarnings({"unchecked", "cast"}) public SubExpr fullCopy() { SubExpr tree = (SubExpr) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) children[i]; if(child != null) { child = child.fullCopy(); tree.setChild(child, i); } } } return tree; } /** * @ast method * @aspect Expressions * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/Expressions.jrag:808 */ public soot.Value emitOperation(Body b, soot.Value left, soot.Value right) { return asLocal(b, b.newSubExpr(asImmediate(b, left), asImmediate(b, right), this)); } /** * @ast method * */ public SubExpr() { super(); } /** * Initializes the child array to the correct size. * Initializes List and Opt nta children. * @apilevel internal * @ast method * @ast method * */ public void init$Children() { children = new ASTNode[2]; } /** * @ast method * */ public SubExpr(Expr p0, Expr p1) { setChild(p0, 0); setChild(p1, 1); } /** * @apilevel low-level * @ast method * */ protected int numChildren() { return 2; } /** * @apilevel internal * @ast method * */ public boolean mayHaveRewrite() { return false; } /** * Replaces the LeftOperand child. * @param node The new node to replace the LeftOperand child. * @apilevel high-level * @ast method * */ public void setLeftOperand(Expr node) { setChild(node, 0); } /** * Retrieves the LeftOperand child. * @return The current node used as the LeftOperand child. * @apilevel high-level * @ast method * */ public Expr getLeftOperand() { return (Expr)getChild(0); } /** * Retrieves the LeftOperand child. * <p><em>This method does not invoke AST transformations.</em></p> * @return The current node used as the LeftOperand child. * @apilevel low-level * @ast method * */ public Expr getLeftOperandNoTransform() { return (Expr)getChildNoTransform(0); } /** * Replaces the RightOperand child. * @param node The new node to replace the RightOperand child. * @apilevel high-level * @ast method * */ public void setRightOperand(Expr node) { setChild(node, 1); } /** * Retrieves the RightOperand child. * @return The current node used as the RightOperand child. * @apilevel high-level * @ast method * */ public Expr getRightOperand() { return (Expr)getChild(1); } /** * Retrieves the RightOperand child. * <p><em>This method does not invoke AST transformations.</em></p> * @return The current node used as the RightOperand child. * @apilevel low-level * @ast method * */ public Expr getRightOperandNoTransform() { return (Expr)getChildNoTransform(1); } /** * @attribute syn * @aspect ConstantExpression * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java7Frontend/ConstantExpression.jrag:91 */ public Constant constant() { ASTNode$State state = state(); try { return type().sub(getLeftOperand().constant(), getRightOperand().constant()); } finally { } } /** * @attribute syn * @aspect PrettyPrint * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/PrettyPrint.jadd:400 */ public String printOp() { ASTNode$State state = state(); try { return " - "; } finally { } } /** * @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); } }
5,568
23.425439
113
java
soot
soot-master/src/main/generated/jastadd/soot/JastAddJ/SuperAccess.java
/* This file was generated with JastAdd2 (http://jastadd.org) version R20130212 (r1031) */ package soot.JastAddJ; import java.util.HashSet; 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; /** * @production SuperAccess : {@link Access} ::= <span class="component">&lt;ID:String&gt;</span>; * @ast node * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/java.ast:28 */ public class SuperAccess extends Access implements Cloneable { /** * @apilevel low-level */ public void flushCache() { super.flushCache(); decl_computed = false; decl_value = null; type_computed = false; type_value = null; } /** * @apilevel internal */ public void flushCollectionCache() { super.flushCollectionCache(); } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public SuperAccess clone() throws CloneNotSupportedException { SuperAccess node = (SuperAccess)super.clone(); node.decl_computed = false; node.decl_value = null; node.type_computed = false; node.type_value = null; node.in$Circle(false); node.is$Final(false); return node; } /** * @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public SuperAccess copy() { try { SuperAccess node = (SuperAccess) clone(); node.parent = null; if(children != null) node.children = (ASTNode[]) children.clone(); return node; } catch (CloneNotSupportedException e) { throw new Error("Error: clone not supported for " + getClass().getName()); } } /** * Create a deep copy of the AST subtree at this node. * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level */ @SuppressWarnings({"unchecked", "cast"}) public SuperAccess fullCopy() { SuperAccess tree = (SuperAccess) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) children[i]; if(child != null) { child = child.fullCopy(); tree.setChild(child, i); } } } return tree; } /** * @ast method * @aspect PrettyPrint * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/PrettyPrint.jadd:506 */ public void toString(StringBuffer s) { s.append("super"); } /** * @ast method * @aspect TypeHierarchyCheck * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeHierarchyCheck.jrag:87 */ public void nameCheck() { if(isQualified()) { if(!hostType().isInnerTypeOf(decl()) && hostType() != decl()) error("qualified super must name an enclosing type"); if(inStaticContext()) { error("*** Qualified super may not occur in static context"); } } // 8.8.5.1 if(inExplicitConstructorInvocation() && hostType().instanceOf(decl().hostType()) ) error("super may not be accessed in an explicit constructor invocation"); // 8.4.3.2 if(inStaticContext()) error("super may not be accessed in a static context"); } /** * @ast method * @aspect Expressions * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddExtensions/JimpleBackend/Expressions.jrag:424 */ public soot.Value eval(Body b) { return emitThis(b, decl()); } /** * @ast method * */ public SuperAccess() { super(); } /** * Initializes the child array to the correct size. * Initializes List and Opt nta children. * @apilevel internal * @ast method * @ast method * */ public void init$Children() { } /** * @ast method * */ public SuperAccess(String p0) { setID(p0); } /** * @ast method * */ public SuperAccess(beaver.Symbol p0) { setID(p0); } /** * @apilevel low-level * @ast method * */ protected int numChildren() { return 0; } /** * @apilevel internal * @ast method * */ public boolean mayHaveRewrite() { return false; } /** * Replaces the lexeme ID. * @param value The new value for the lexeme ID. * @apilevel high-level * @ast method * */ public void setID(String value) { tokenString_ID = value; } /** * @apilevel internal * @ast method * */ /** * @apilevel internal */ protected String tokenString_ID; /** * @ast method * */ public int IDstart; /** * @ast method * */ public int IDend; /** * JastAdd-internal setter for lexeme ID using the Beaver parser. * @apilevel internal * @ast method * */ 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(); } /** * Retrieves the value for the lexeme ID. * @return The value for the lexeme ID. * @apilevel high-level * @ast method * */ public String getID() { return tokenString_ID != null ? tokenString_ID : ""; } /** * @ast method * @aspect TypeScopePropagation * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupType.jrag:251 */ private TypeDecl refined_TypeScopePropagation_SuperAccess_decl() { return isQualified() ? qualifier().type() : hostType(); } /** * @attribute syn * @aspect TypeScopePropagation * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/LookupType.jrag:249 */ public SimpleSet decls() { ASTNode$State state = state(); try { return SimpleSet.emptySet; } finally { } } /** * @apilevel internal */ protected boolean decl_computed = false; /** * @apilevel internal */ protected TypeDecl decl_value; /** * @attribute syn * @aspect GenericsTypeAnalysis * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Generics.jrag:326 */ @SuppressWarnings({"unchecked", "cast"}) public TypeDecl decl() { if(decl_computed) { return decl_value; } ASTNode$State state = state(); int num = state.boundariesCrossed; boolean isFinal = this.is$Final(); decl_value = decl_compute(); if(isFinal && num == state().boundariesCrossed) decl_computed = true; return decl_value; } /** * @apilevel internal */ private TypeDecl decl_compute() { TypeDecl typeDecl = refined_TypeScopePropagation_SuperAccess_decl(); if(typeDecl instanceof ParTypeDecl) typeDecl = ((ParTypeDecl)typeDecl).genericDecl(); return typeDecl; } /** * @attribute syn * @aspect AccessTypes * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/ResolveAmbiguousNames.jrag:25 */ public boolean isSuperAccess() { ASTNode$State state = state(); try { return true; } finally { } } /** * @attribute syn * @aspect SyntacticClassification * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/SyntacticClassification.jrag:56 */ public NameType predNameType() { ASTNode$State state = state(); try { return NameType.TYPE_NAME; } finally { } } /** * @apilevel internal */ protected boolean type_computed = false; /** * @apilevel internal */ protected TypeDecl type_value; /** * @attribute syn * @aspect TypeAnalysis * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeAnalysis.jrag:288 */ @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; } /** * @apilevel internal */ private TypeDecl type_compute() { TypeDecl typeDecl = decl(); if(!typeDecl.isClassDecl()) return unknownType(); ClassDecl classDecl = (ClassDecl)typeDecl; if(!classDecl.hasSuperclass()) return unknownType(); return classDecl.superclass(); } /** * @attribute inh * @aspect TypeHierarchyCheck * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.4Frontend/TypeHierarchyCheck.jrag:124 */ @SuppressWarnings({"unchecked", "cast"}) public boolean inExplicitConstructorInvocation() { ASTNode$State state = state(); boolean inExplicitConstructorInvocation_value = getParent().Define_boolean_inExplicitConstructorInvocation(this, null); return inExplicitConstructorInvocation_value; } /** * @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); } }
9,385
24.928177
123
java