⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 compilationunit.java

📁 JDK1.4编译器前端
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
        return getTypeDeclList();    }    // Declared in java.ast at line 27    public List<TypeDecl> getTypeDeclsNoTransform() {        return getTypeDeclListNoTransform();    }    // Declared in java.ast at line 31     @SuppressWarnings({"unchecked", "cast"})  public List<TypeDecl> getTypeDeclList() {        return (List<TypeDecl>)getChild(1);    }    // Declared in java.ast at line 35     @SuppressWarnings({"unchecked", "cast"})  public List<TypeDecl> getTypeDeclListNoTransform() {        return (List<TypeDecl>)getChildNoTransform(1);    }    protected int relativeName_visited = -1;    // Declared in ClassPath.jrag at line 27 @SuppressWarnings({"unchecked", "cast"})     public String relativeName() {        if(relativeName_visited == boundariesCrossed)            throw new RuntimeException("Circular definition of attr: relativeName in class: ");        relativeName_visited = boundariesCrossed;        String relativeName_value = relativeName_compute();        relativeName_visited = -1;        return relativeName_value;    }    private String relativeName_compute() {  return relativeName;  }    protected int pathName_visited = -1;    // Declared in ClassPath.jrag at line 28 @SuppressWarnings({"unchecked", "cast"})     public String pathName() {        if(pathName_visited == boundariesCrossed)            throw new RuntimeException("Circular definition of attr: pathName in class: ");        pathName_visited = boundariesCrossed;        String pathName_value = pathName_compute();        pathName_visited = -1;        return pathName_value;    }    private String pathName_compute() {  return pathName;  }    protected int fromSource_visited = -1;    // Declared in ClassPath.jrag at line 29 @SuppressWarnings({"unchecked", "cast"})     public boolean fromSource() {        if(fromSource_visited == boundariesCrossed)            throw new RuntimeException("Circular definition of attr: fromSource in class: ");        fromSource_visited = boundariesCrossed;        boolean fromSource_value = fromSource_compute();        fromSource_visited = -1;        return fromSource_value;    }    private boolean fromSource_compute() {  return fromSource;  }    protected java.util.Map localLookupType_String_visited;    // Declared in LookupType.jrag at line 211 @SuppressWarnings({"unchecked", "cast"})     public SimpleSet localLookupType(String name) {        Object _parameters = name;if(localLookupType_String_visited == null) localLookupType_String_visited = new java.util.HashMap(4);        if(new Integer(boundariesCrossed).equals(localLookupType_String_visited.get(_parameters)))            throw new RuntimeException("Circular definition of attr: localLookupType in class: ");        localLookupType_String_visited.put(_parameters, new Integer(boundariesCrossed));        SimpleSet localLookupType_String_value = localLookupType_compute(name);        localLookupType_String_visited.remove(_parameters);        return localLookupType_String_value;    }    private SimpleSet localLookupType_compute(String name) {    for(int i = 0; i < getNumTypeDecl(); i++)      if(getTypeDecl(i).name().equals(name))        return SimpleSet.emptySet.add(getTypeDecl(i));    return SimpleSet.emptySet;  }    protected java.util.Map importedTypes_String_visited;    // Declared in LookupType.jrag at line 218 @SuppressWarnings({"unchecked", "cast"})     public SimpleSet importedTypes(String name) {        Object _parameters = name;if(importedTypes_String_visited == null) importedTypes_String_visited = new java.util.HashMap(4);        if(new Integer(boundariesCrossed).equals(importedTypes_String_visited.get(_parameters)))            throw new RuntimeException("Circular definition of attr: importedTypes in class: ");        importedTypes_String_visited.put(_parameters, new Integer(boundariesCrossed));        SimpleSet importedTypes_String_value = importedTypes_compute(name);        importedTypes_String_visited.remove(_parameters);        return importedTypes_String_value;    }    private SimpleSet importedTypes_compute(String name) {    SimpleSet set = SimpleSet.emptySet;    for(int i = 0; i < getNumImportDecl(); i++)      if(!getImportDecl(i).isOnDemand())        for(Iterator iter = getImportDecl(i).importedTypes(name).iterator(); iter.hasNext(); )          set = set.add(iter.next());    return set;  }    protected java.util.Map importedTypesOnDemand_String_visited;    // Declared in LookupType.jrag at line 226 @SuppressWarnings({"unchecked", "cast"})     public SimpleSet importedTypesOnDemand(String name) {        Object _parameters = name;if(importedTypesOnDemand_String_visited == null) importedTypesOnDemand_String_visited = new java.util.HashMap(4);        if(new Integer(boundariesCrossed).equals(importedTypesOnDemand_String_visited.get(_parameters)))            throw new RuntimeException("Circular definition of attr: importedTypesOnDemand in class: ");        importedTypesOnDemand_String_visited.put(_parameters, new Integer(boundariesCrossed));        SimpleSet importedTypesOnDemand_String_value = importedTypesOnDemand_compute(name);        importedTypesOnDemand_String_visited.remove(_parameters);        return importedTypesOnDemand_String_value;    }    private SimpleSet importedTypesOnDemand_compute(String name) {    SimpleSet set = SimpleSet.emptySet;    for(int i = 0; i < getNumImportDecl(); i++)      if(getImportDecl(i).isOnDemand())        for(Iterator iter = getImportDecl(i).importedTypes(name).iterator(); iter.hasNext(); )          set = set.add(iter.next());    return set;  }    protected int dumpString_visited = -1;    // Declared in PrettyPrint.jadd at line 780 @SuppressWarnings({"unchecked", "cast"})     public String dumpString() {        if(dumpString_visited == boundariesCrossed)            throw new RuntimeException("Circular definition of attr: dumpString in class: ");        dumpString_visited = boundariesCrossed;        String dumpString_value = dumpString_compute();        dumpString_visited = -1;        return dumpString_value;    }    private String dumpString_compute() {  return getClass().getName() + " [" + getPackageDecl() + "]";  }    protected int packageName_visited = -1;    protected boolean packageName_computed = false;    protected String packageName_value;    // Declared in QualifiedNames.jrag at line 92 @SuppressWarnings({"unchecked", "cast"})     public String packageName() {        if(packageName_computed)            return packageName_value;        if(packageName_visited == boundariesCrossed)            throw new RuntimeException("Circular definition of attr: packageName in class: ");        packageName_visited = boundariesCrossed;        int num = boundariesCrossed;        boolean isFinal = this.is$Final();        packageName_value = packageName_compute();        if(isFinal && num == boundariesCrossed)            packageName_computed = true;        packageName_visited = -1;        return packageName_value;    }    private String packageName_compute() {  return getPackageDecl();  }    protected java.util.Map lookupType_String_String_visited;    // Declared in LookupType.jrag at line 99 @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_visited == null) lookupType_String_String_visited = new java.util.HashMap(4);        if(new Integer(boundariesCrossed).equals(lookupType_String_String_visited.get(_parameters)))            throw new RuntimeException("Circular definition of attr: lookupType in class: ");        lookupType_String_String_visited.put(_parameters, new Integer(boundariesCrossed));        if(getParent() == null) throw new RuntimeException("Trying to evaluate attribute in subtree not attached to main tree");        TypeDecl lookupType_String_String_value = getParent().Define_TypeDecl_lookupType(this, null, packageName, typeName);        lookupType_String_String_visited.remove(_parameters);        return lookupType_String_String_value;    }    protected java.util.Map lookupType_String_visited;    protected java.util.Map lookupType_String_values;    // Declared in LookupType.jrag at line 171 @SuppressWarnings({"unchecked", "cast"})     public SimpleSet lookupType(String name) {        Object _parameters = name;if(lookupType_String_visited == null) lookupType_String_visited = new java.util.HashMap(4);if(lookupType_String_values == null) lookupType_String_values = new java.util.HashMap(4);        if(lookupType_String_values.containsKey(_parameters))            return (SimpleSet)lookupType_String_values.get(_parameters);        if(new Integer(boundariesCrossed).equals(lookupType_String_visited.get(_parameters)))            throw new RuntimeException("Circular definition of attr: lookupType in class: ");        lookupType_String_visited.put(_parameters, new Integer(boundariesCrossed));        int num = boundariesCrossed;        boolean isFinal = this.is$Final();        if(getParent() == null) throw new RuntimeException("Trying to evaluate attribute in subtree not attached to main tree");        SimpleSet lookupType_String_value = getParent().Define_SimpleSet_lookupType(this, null, name);        if(isFinal && num == boundariesCrossed)            lookupType_String_values.put(_parameters, lookupType_String_value);        lookupType_String_visited.remove(_parameters);        return lookupType_String_value;    }    // Declared in TypeAnalysis.jrag at line 494    public TypeDecl Define_TypeDecl_enclosingType(ASTNode caller, ASTNode child) {        if(true) {      int childIndex = this.getIndexOfChild(caller);            return null;        }        if(getParent() == null) throw new RuntimeException("Trying to evaluate attribute in subtree not attached to main tree");        return getParent().Define_TypeDecl_enclosingType(this, caller);    }    // Declared in ExceptionHandling.jrag at line 117    public boolean Define_boolean_handlesException(ASTNode caller, ASTNode child, TypeDecl exceptionType) {        if(caller == getTypeDeclListNoTransform()) {      int childIndex = caller.getIndexOfChild(child);            return !exceptionType.isUncheckedException();        }        if(getParent() == null) throw new RuntimeException("Trying to evaluate attribute in subtree not attached to main tree");        return getParent().Define_boolean_handlesException(this, caller, exceptionType);    }    // Declared in TypeAnalysis.jrag at line 565    public String Define_String_hostPackage(ASTNode caller, ASTNode child) {        if(true) {      int childIndex = this.getIndexOfChild(caller);            return packageName();        }        if(getParent() == null) throw new RuntimeException("Trying to evaluate attribute in subtree not attached to main tree");        return getParent().Define_String_hostPackage(this, caller);    }    // Declared in TypeAnalysis.jrag at line 581    public TypeDecl Define_TypeDecl_hostType(ASTNode caller, ASTNode child) {        if(caller == getImportDeclListNoTransform()) {      int childIndex = caller.getIndexOfChild(child);            return null;        }        if(getParent() == null) throw new RuntimeException("Trying to evaluate attribute in subtree not attached to main tree");        return getParent().Define_TypeDecl_hostType(this, caller);    }    // Declared in NameCheck.jrag at line 27    public SimpleSet Define_SimpleSet_allImportedTypes(ASTNode caller, ASTNode child, String name) {        if(caller == getImportDeclListNoTransform()) {      int childIndex = caller.getIndexOfChild(child);            return importedTypes(name);        }        if(getParent() == null) throw new RuntimeException("Trying to evaluate attribute in subtree not attached to main tree");        return getParent().Define_SimpleSet_allImportedTypes(this, caller, name);    }    // Declared in QualifiedNames.jrag at line 90    public String Define_String_packageName(ASTNode caller, ASTNode child) {        if(true) {      int childIndex = this.getIndexOfChild(caller);            return packageName();        }        if(getParent() == null) throw new RuntimeException("Trying to evaluate attribute in subtree not attached to main tree");        return getParent().Define_String_packageName(this, caller);    }    // Declared in TypeAnalysis.jrag at line 531    public boolean Define_boolean_isMemberType(ASTNode caller, ASTNode child) {        if(caller == getTypeDeclListNoTransform()) {      int childIndex = caller.getIndexOfChild(child);            return false;        }        if(getParent() == null) throw new RuntimeException("Trying to evaluate attribute in subtree not attached to main tree");        return getParent().Define_boolean_isMemberType(this, caller);    }    // Declared in DefiniteAssignment.jrag at line 51    public boolean Define_boolean_isIncOrDec(ASTNode caller, ASTNode child) {        if(caller == getTypeDeclListNoTransform()) {      int childIndex = caller.getIndexOfChild(child);            return false;        }        if(getParent() == null) throw new RuntimeException("Trying to evaluate attribute in subtree not attached to main tree");        return getParent().Define_boolean_isIncOrDec(this, caller);    }    // Declared in TypeAnalysis.jrag at line 543    public boolean Define_boolean_isLocalClass(ASTNode caller, ASTNode child) {        if(true) {      int childIndex = this.getIndexOfChild(caller);            return false;        }        if(getParent() == null) throw new RuntimeException("Trying to evaluate attribute in subtree not attached to main tree");        return getParent().Define_boolean_isLocalClass(this, caller);    }    // Declared in TypeAnalysis.jrag at line 521    public boolean Define_boolean_isNestedType(ASTNode caller, ASTNode child) {        if(true) {      int childIndex = this.getIndexOfChild(caller);            return false;        }        if(getParent() == null) throw new RuntimeException("Trying to evaluate attribute in subtree not attached to main tree");        return getParent().Define_boolean_isNestedType(this, caller);    }    // Declared in SyntacticClassification.jrag at line 69    public NameType Define_NameType_nameType(ASTNode caller, ASTNode child) {        if(caller == getImportDeclListNoTransform()) {      int childIndex = caller.getIndexOfChild(child);            return NameType.PACKAGE_NAME;        }        if(getParent() == null) throw new RuntimeException("Trying to evaluate attribute in subtree not attached to main tree");        return getParent().Define_NameType_nameType(this, caller);    }    // Declared in LookupType.jrag at line 267    public SimpleSet Define_SimpleSet_lookupType(ASTNode caller, ASTNode child, String name) {        if(caller == getImportDeclListNoTransform()) {      int childIndex = caller.getIndexOfChild(child);            return lookupType(name);        }        if(true) {    int childIndex = this.getIndexOfChild(caller);{    // locally declared types in compilation unit    SimpleSet set = localLookupType(name);    if(!set.isEmpty()) return set;    // imported types    set = importedTypes(name);    if(!set.isEmpty()) return set;    // types in the same package    TypeDecl result = lookupType(packageName(), name);    if(result != null && result.accessibleFromPackage(packageName()))       return SimpleSet.emptySet.add(result);        // types imported on demand    set = importedTypesOnDemand(name);    if(!set.isEmpty()) return set;        // include primitive types    result = lookupType(PRIMITIVE_PACKAGE_NAME, name);    if(result != null) return SimpleSet.emptySet.add(result);        // 7.5.5 Automatic Imports    result = lookupType("java.lang", name);    if(result != null && result.accessibleFromPackage(packageName()))      return SimpleSet.emptySet.add(result);    return lookupType(name);  }}        if(getParent() == null) throw new RuntimeException("Trying to evaluate attribute in subtree not attached to main tree");        return getParent().Define_SimpleSet_lookupType(this, caller, name);    }    // Declared in ClassPath.jrag at line 32    public CompilationUnit Define_CompilationUnit_compilationUnit(ASTNode caller, ASTNode child) {        if(true) {      int childIndex = this.getIndexOfChild(caller);            return this;        }        if(getParent() == null) throw new RuntimeException("Trying to evaluate attribute in subtree not attached to main tree");        return getParent().Define_CompilationUnit_compilationUnit(this, caller);    }public ASTNode rewriteTo() {    return super.rewriteTo();}}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -