📄 methodaccess.java
字号:
public boolean mayHaveRewrite() { return false; } // Declared in java.ast at line 2 // Declared in java.ast line 17 private String tokenString_ID; // Declared in java.ast at line 3 public void setID(String value) { tokenString_ID = value; } // Declared in java.ast at line 6 public int IDstart; // Declared in java.ast at line 7 public int IDend; // Declared in java.ast at line 8 public void setID(beaver.Symbol symbol) { if(symbol.value != null && !(symbol.value instanceof String)) throw new UnsupportedOperationException("setID is only valid for String lexemes"); tokenString_ID = (String)symbol.value; IDstart = symbol.getStart(); IDend = symbol.getEnd(); } // Declared in java.ast at line 15 public String getID() { return tokenString_ID != null ? tokenString_ID : ""; } // Declared in java.ast at line 2 // Declared in java.ast line 17 public void setArgList(List<Expr> list) { setChild(list, 0); } // Declared in java.ast at line 6 private int getNumArg = 0; // Declared in java.ast at line 7 public int getNumArg() { return getArgList().getNumChild(); } // Declared in java.ast at line 11 @SuppressWarnings({"unchecked", "cast"}) public Expr getArg(int i) { return (Expr)getArgList().getChild(i); } // Declared in java.ast at line 15 public void addArg(Expr node) { List<Expr> list = getArgList(); list.addChild(node); } // Declared in java.ast at line 20 public void setArg(Expr node, int i) { List<Expr> list = getArgList(); list.setChild(node, i); } // Declared in java.ast at line 24 public List<Expr> getArgs() { return getArgList(); } // Declared in java.ast at line 27 public List<Expr> getArgsNoTransform() { return getArgListNoTransform(); } // Declared in java.ast at line 31 @SuppressWarnings({"unchecked", "cast"}) public List<Expr> getArgList() { return (List<Expr>)getChild(0); } // Declared in java.ast at line 35 @SuppressWarnings({"unchecked", "cast"}) public List<Expr> getArgListNoTransform() { return (List<Expr>)getChildNoTransform(0); } protected java.util.Map computeDAbefore_int_Variable_visited; protected java.util.Map computeDAbefore_int_Variable_values; // Declared in DefiniteAssignment.jrag at line 414 @SuppressWarnings({"unchecked", "cast"}) public boolean computeDAbefore(int i, Variable v) { java.util.List _parameters = new java.util.ArrayList(2); _parameters.add(new Integer(i)); _parameters.add(v);if(computeDAbefore_int_Variable_visited == null) computeDAbefore_int_Variable_visited = new java.util.HashMap(4);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(); if(new Integer(boundariesCrossed).equals(computeDAbefore_int_Variable_visited.get(_parameters))) throw new RuntimeException("Circular definition of attr: computeDAbefore in class: "); computeDAbefore_int_Variable_visited.put(_parameters, new Integer(boundariesCrossed)); int num = boundariesCrossed; boolean isFinal = this.is$Final(); boolean computeDAbefore_int_Variable_value = computeDAbefore_compute(i, v); if(isFinal && num == boundariesCrossed) computeDAbefore_int_Variable_values.put(_parameters, Boolean.valueOf(computeDAbefore_int_Variable_value)); computeDAbefore_int_Variable_visited.remove(_parameters); return computeDAbefore_int_Variable_value; } private boolean computeDAbefore_compute(int i, Variable v) { return i == 0 ? isDAbefore(v) : getArg(i-1).isDAafter(v); } protected java.util.Map isDAafter_Variable_visited; // Declared in DefiniteAssignment.jrag at line 416 @SuppressWarnings({"unchecked", "cast"}) public boolean isDAafter(Variable v) { Object _parameters = v;if(isDAafter_Variable_visited == null) isDAafter_Variable_visited = new java.util.HashMap(4); if(new Integer(boundariesCrossed).equals(isDAafter_Variable_visited.get(_parameters))) throw new RuntimeException("Circular definition of attr: isDAafter in class: "); isDAafter_Variable_visited.put(_parameters, new Integer(boundariesCrossed)); boolean isDAafter_Variable_value = isDAafter_compute(v); isDAafter_Variable_visited.remove(_parameters); return isDAafter_Variable_value; } private boolean isDAafter_compute(Variable v) { return getNumArg() == 0 ? isDAbefore(v) : getArg(getNumArg()-1).isDAafter(v); } protected int exceptionCollection_visited = -1; protected boolean exceptionCollection_computed = false; protected Collection exceptionCollection_value; // Declared in ExceptionHandling.jrag at line 51 @SuppressWarnings({"unchecked", "cast"}) public Collection exceptionCollection() { if(exceptionCollection_computed) return exceptionCollection_value; if(exceptionCollection_visited == boundariesCrossed) throw new RuntimeException("Circular definition of attr: exceptionCollection in class: "); exceptionCollection_visited = boundariesCrossed; int num = boundariesCrossed; boolean isFinal = this.is$Final(); exceptionCollection_value = exceptionCollection_compute(); if(isFinal && num == boundariesCrossed) exceptionCollection_computed = true; exceptionCollection_visited = -1; return exceptionCollection_value; } 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; } protected int singleCandidateDecl_visited = -1; // Declared in LookupMethod.jrag at line 66 @SuppressWarnings({"unchecked", "cast"}) public MethodDecl singleCandidateDecl() { if(singleCandidateDecl_visited == boundariesCrossed) throw new RuntimeException("Circular definition of attr: singleCandidateDecl in class: "); singleCandidateDecl_visited = boundariesCrossed; MethodDecl singleCandidateDecl_value = singleCandidateDecl_compute(); singleCandidateDecl_visited = -1; return singleCandidateDecl_value; } private MethodDecl singleCandidateDecl_compute() { 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; } protected int decls_visited = -1; protected boolean decls_computed = false; protected SimpleSet decls_value; // Declared in LookupMethod.jrag at line 78 @SuppressWarnings({"unchecked", "cast"}) public SimpleSet decls() { if(decls_computed) return decls_value; if(decls_visited == boundariesCrossed) throw new RuntimeException("Circular definition of attr: decls in class: "); decls_visited = boundariesCrossed; int num = boundariesCrossed; boolean isFinal = this.is$Final(); decls_value = decls_compute(); if(isFinal && num == boundariesCrossed) decls_computed = true; decls_visited = -1; return decls_value; } private SimpleSet decls_compute() { SimpleSet maxSpecific = SimpleSet.emptySet; for(Iterator iter = lookupMethod(name()).iterator(); iter.hasNext(); ) { MethodDecl decl = (MethodDecl)iter.next(); if(applicable(decl) && accessible(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); } } } if(isQualified() ? qualifier().staticContextQualifier() : inStaticContext()) maxSpecific = removeInstanceMethods(maxSpecific); return maxSpecific;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -