📄 constructoraccess.java
字号:
package AST;
import java.util.HashSet;import java.util.LinkedHashSet;import java.io.FileNotFoundException;import java.io.File;import java.util.*;import beaver.*;import java.util.ArrayList;import java.util.zip.*;import java.io.*;public class ConstructorAccess extends Access implements Cloneable {
public void flushCache() { super.flushCache(); isDAafter_Variable_visited = new java.util.HashMap(4); isDUafter_Variable_visited = new java.util.HashMap(4); applicableAndAccessible_ConstructorDecl_visited = new java.util.HashMap(4); decls_visited = -1; decls_computed = false; decls_value = null; decl_visited = -1; decl_computed = false; decl_value = null; validArgs_visited = -1; name_visited = -1; predNameType_visited = -1; type_visited = -1; type_computed = false; type_value = null; handlesException_TypeDecl_visited = new java.util.HashMap(4); lookupConstructor_visited = -1; unknownConstructor_visited = -1; } @SuppressWarnings({"unchecked", "cast"}) public ConstructorAccess clone() throws CloneNotSupportedException { ConstructorAccess node = (ConstructorAccess)super.clone(); node.isDAafter_Variable_visited = new java.util.HashMap(4); node.isDUafter_Variable_visited = new java.util.HashMap(4); node.applicableAndAccessible_ConstructorDecl_visited = new java.util.HashMap(4); node.decls_visited = -1; node.decls_computed = false; node.decls_value = null; node.decl_visited = -1; node.decl_computed = false; node.decl_value = null; node.validArgs_visited = -1; node.name_visited = -1; node.predNameType_visited = -1; node.type_visited = -1; node.type_computed = false; node.type_value = null; node.handlesException_TypeDecl_visited = new java.util.HashMap(4); node.lookupConstructor_visited = -1; node.unknownConstructor_visited = -1; node.in$Circle(false); node.is$Final(false); return node; } @SuppressWarnings({"unchecked", "cast"}) public ConstructorAccess copy() { try { ConstructorAccess node = (ConstructorAccess)clone(); if(children != null) node.children = (ASTNode[])children.clone(); return node; } catch (CloneNotSupportedException e) { } System.err.println("Error: Could not clone node of type " + getClass().getName() + "!"); return null; } @SuppressWarnings({"unchecked", "cast"}) public ConstructorAccess fullCopy() { ConstructorAccess res = (ConstructorAccess)copy(); for(int i = 0; i < getNumChildNoTransform(); i++) { ASTNode node = getChildNoTransform(i); if(node != null) node = node.fullCopy(); res.setChild(node, i); } return res; } // Declared in ExceptionHandling.jrag at line 97 public void exceptionHandling() { for(int i = 0; i < decl().getNumException(); i++) { TypeDecl exceptionType = decl().getException(i).type(); if(!handlesException(exceptionType)) error("" + this + " may throw uncaught exception " + exceptionType.fullName()); } } // Declared in ExceptionHandling.jrag at line 244 // 8.8.4 (8.4.4) protected boolean reachedException(TypeDecl catchType) { for(int i = 0; i < decl().getNumException(); i++) { TypeDecl exceptionType = decl().getException(i).type(); if(catchType.mayCatch(exceptionType)) return true; } return super.reachedException(catchType); } // Declared in NameCheck.jrag at line 112 public void nameCheck() { super.nameCheck(); if(decls().isEmpty()) error("no constructor named " + this); if(decls().size() > 1 && validArgs()) { error("several most specific constructors for " + this); for(Iterator iter = decls().iterator(); iter.hasNext(); ) { error(" " + ((ConstructorDecl)iter.next()).signature()); } } } // Declared in PrettyPrint.jadd at line 486 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(")"); } // Declared in java.ast at line 3 // Declared in java.ast line 18
public ConstructorAccess() { super();
setChild(new List(), 0);
} // Declared in java.ast at line 11
// Declared in java.ast line 18 public ConstructorAccess(String p0, List<Expr> p1) { setID(p0); setChild(p1, 0); } // Declared in java.ast at line 17 // Declared in java.ast line 18 public ConstructorAccess(beaver.Symbol p0, List<Expr> p1) { setID(p0); setChild(p1, 0); } // Declared in java.ast at line 22 protected int numChildren() {
return 1;
} // Declared in java.ast at line 25
public boolean mayHaveRewrite() { return false; } // Declared in java.ast at line 2 // Declared in java.ast line 18 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 18 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);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -