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

📄 classinstanceexpr.java

📁 JDK1.4编译器前端
💻 JAVA
📖 第 1 页 / 共 3 页
字号:
        return decl_value;    }    private ConstructorDecl decl_compute() {    SimpleSet decls = decls();    if(decls.size() == 1)      return (ConstructorDecl)decls.iterator().next();    return unknownConstructor();  }    protected java.util.Map qualifiedLookupType_String_visited;    // Declared in LookupType.jrag at line 345 @SuppressWarnings({"unchecked", "cast"})     public SimpleSet qualifiedLookupType(String name) {        Object _parameters = name;if(qualifiedLookupType_String_visited == null) qualifiedLookupType_String_visited = new java.util.HashMap(4);        if(new Integer(boundariesCrossed).equals(qualifiedLookupType_String_visited.get(_parameters)))            throw new RuntimeException("Circular definition of attr: qualifiedLookupType in class: ");        qualifiedLookupType_String_visited.put(_parameters, new Integer(boundariesCrossed));        SimpleSet qualifiedLookupType_String_value = qualifiedLookupType_compute(name);        qualifiedLookupType_String_visited.remove(_parameters);        return qualifiedLookupType_String_value;    }    private SimpleSet qualifiedLookupType_compute(String name) {    SimpleSet c = keepAccessibleTypes(type().memberTypes(name));    if(!c.isEmpty())      return c;    if(type().name().equals(name))      return SimpleSet.emptySet.add(type());    return SimpleSet.emptySet;  }    protected java.util.Map localLookupType_String_visited;    protected java.util.Map localLookupType_String_values;    // Declared in LookupType.jrag at line 384 @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(localLookupType_String_values == null) localLookupType_String_values = new java.util.HashMap(4);        if(localLookupType_String_values.containsKey(_parameters))            return (SimpleSet)localLookupType_String_values.get(_parameters);        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));        int num = boundariesCrossed;        boolean isFinal = this.is$Final();        SimpleSet localLookupType_String_value = localLookupType_compute(name);        if(isFinal && num == boundariesCrossed)            localLookupType_String_values.put(_parameters, localLookupType_String_value);        localLookupType_String_visited.remove(_parameters);        return localLookupType_String_value;    }    private SimpleSet localLookupType_compute(String name) {    if(hasTypeDecl() && getTypeDecl().name().equals(name))      return SimpleSet.emptySet.add(getTypeDecl());    return SimpleSet.emptySet;  }    protected int validArgs_visited = -1;    // Declared in NameCheck.jrag at line 130 @SuppressWarnings({"unchecked", "cast"})     public boolean validArgs() {        if(validArgs_visited == boundariesCrossed)            throw new RuntimeException("Circular definition of attr: validArgs in class: ");        validArgs_visited = boundariesCrossed;        boolean validArgs_value = validArgs_compute();        validArgs_visited = -1;        return validArgs_value;    }    private boolean validArgs_compute() {    for(int i = 0; i < getNumArg(); i++)      if(getArg(i).type().isUnknown())        return false;    return true;  }    protected int predNameType_visited = -1;    // Declared in SyntacticClassification.jrag at line 97 @SuppressWarnings({"unchecked", "cast"})     public NameType predNameType() {        if(predNameType_visited == boundariesCrossed)            throw new RuntimeException("Circular definition of attr: predNameType in class: ");        predNameType_visited = boundariesCrossed;        NameType predNameType_value = predNameType_compute();        predNameType_visited = -1;        return predNameType_value;    }    private NameType predNameType_compute() {  return NameType.EXPRESSION_NAME;  }    protected int type_visited = -1;    // Declared in TypeAnalysis.jrag at line 312 @SuppressWarnings({"unchecked", "cast"})     public TypeDecl type() {        if(type_computed)            return type_value;        if(type_visited == boundariesCrossed)            throw new RuntimeException("Circular definition of attr: type in class: ");        type_visited = boundariesCrossed;        int num = boundariesCrossed;        boolean isFinal = this.is$Final();        type_value = type_compute();        if(isFinal && num == boundariesCrossed)            type_computed = true;        type_visited = -1;        return type_value;    }    private TypeDecl type_compute() {  return hasTypeDecl() ? getTypeDecl() : getAccess().type();  }    protected int noEnclosingInstance_visited = -1;    // Declared in TypeCheck.jrag at line 519 @SuppressWarnings({"unchecked", "cast"})     public boolean noEnclosingInstance() {        if(noEnclosingInstance_visited == boundariesCrossed)            throw new RuntimeException("Circular definition of attr: noEnclosingInstance in class: ");        noEnclosingInstance_visited = boundariesCrossed;        boolean noEnclosingInstance_value = noEnclosingInstance_compute();        noEnclosingInstance_visited = -1;        return noEnclosingInstance_value;    }    private boolean noEnclosingInstance_compute() {  return isQualified() ? qualifier().staticContextQualifier() : inStaticContext();  }    protected java.util.Map handlesException_TypeDecl_visited;    // Declared in ExceptionHandling.jrag at line 38 @SuppressWarnings({"unchecked", "cast"})     public boolean handlesException(TypeDecl exceptionType) {        Object _parameters = exceptionType;if(handlesException_TypeDecl_visited == null) handlesException_TypeDecl_visited = new java.util.HashMap(4);        if(new Integer(boundariesCrossed).equals(handlesException_TypeDecl_visited.get(_parameters)))            throw new RuntimeException("Circular definition of attr: handlesException in class: ");        handlesException_TypeDecl_visited.put(_parameters, new Integer(boundariesCrossed));        if(getParent() == null) throw new RuntimeException("Trying to evaluate attribute in subtree not attached to main tree");        boolean handlesException_TypeDecl_value = getParent().Define_boolean_handlesException(this, null, exceptionType);        handlesException_TypeDecl_visited.remove(_parameters);        return handlesException_TypeDecl_value;    }    protected int typeObject_visited = -1;    // Declared in LookupConstructor.jrag at line 27 @SuppressWarnings({"unchecked", "cast"})     public TypeDecl typeObject() {        if(typeObject_visited == boundariesCrossed)            throw new RuntimeException("Circular definition of attr: typeObject in class: ");        typeObject_visited = boundariesCrossed;        if(getParent() == null) throw new RuntimeException("Trying to evaluate attribute in subtree not attached to main tree");        TypeDecl typeObject_value = getParent().Define_TypeDecl_typeObject(this, null);        typeObject_visited = -1;        return typeObject_value;    }    protected int unknownConstructor_visited = -1;    // Declared in LookupConstructor.jrag at line 84 @SuppressWarnings({"unchecked", "cast"})     public ConstructorDecl unknownConstructor() {        if(unknownConstructor_visited == boundariesCrossed)            throw new RuntimeException("Circular definition of attr: unknownConstructor in class: ");        unknownConstructor_visited = boundariesCrossed;        if(getParent() == null) throw new RuntimeException("Trying to evaluate attribute in subtree not attached to main tree");        ConstructorDecl unknownConstructor_value = getParent().Define_ConstructorDecl_unknownConstructor(this, null);        unknownConstructor_visited = -1;        return unknownConstructor_value;    }    protected int enclosingInstance_visited = -1;    // Declared in TypeCheck.jrag at line 504 @SuppressWarnings({"unchecked", "cast"})     public TypeDecl enclosingInstance() {        if(enclosingInstance_visited == boundariesCrossed)            throw new RuntimeException("Circular definition of attr: enclosingInstance in class: ");        enclosingInstance_visited = boundariesCrossed;        if(getParent() == null) throw new RuntimeException("Trying to evaluate attribute in subtree not attached to main tree");        TypeDecl enclosingInstance_value = getParent().Define_TypeDecl_enclosingInstance(this, null);        enclosingInstance_visited = -1;        return enclosingInstance_value;    }    protected int inExplicitConstructorInvocation_visited = -1;    // Declared in TypeHierarchyCheck.jrag at line 126 @SuppressWarnings({"unchecked", "cast"})     public boolean inExplicitConstructorInvocation() {        if(inExplicitConstructorInvocation_visited == boundariesCrossed)            throw new RuntimeException("Circular definition of attr: inExplicitConstructorInvocation in class: ");        inExplicitConstructorInvocation_visited = boundariesCrossed;        if(getParent() == null) throw new RuntimeException("Trying to evaluate attribute in subtree not attached to main tree");        boolean inExplicitConstructorInvocation_value = getParent().Define_boolean_inExplicitConstructorInvocation(this, null);        inExplicitConstructorInvocation_visited = -1;        return inExplicitConstructorInvocation_value;    }    // Declared in AnonymousClasses.jrag at line 15    public TypeDecl Define_TypeDecl_superType(ASTNode caller, ASTNode child) {        if(caller == getTypeDeclOptNoTransform()) {            return getAccess().type();        }        if(getParent() == null) throw new RuntimeException("Trying to evaluate attribute in subtree not attached to main tree");        return getParent().Define_TypeDecl_superType(this, caller);    }    // Declared in LookupVariable.jrag at line 135    public SimpleSet Define_SimpleSet_lookupVariable(ASTNode caller, ASTNode child, String name) {        if(caller == getArgListNoTransform()) {      int childIndex = caller.getIndexOfChild(child);            return unqualifiedScope().lookupVariable(name);        }        if(getParent() == null) throw new RuntimeException("Trying to evaluate attribute in subtree not attached to main tree");        return getParent().Define_SimpleSet_lookupVariable(this, caller, name);    }    // Declared in AnonymousClasses.jrag at line 19    public ConstructorDecl Define_ConstructorDecl_constructorDecl(ASTNode caller, ASTNode child) {        if(caller == getTypeDeclOptNoTransform()){    Collection c = getAccess().type().constructors();    SimpleSet maxSpecific = mostSpecificConstructor(c);    if(maxSpecific.size() == 1)      return (ConstructorDecl)maxSpecific.iterator().next();    return unknownConstructor();  }        if(getParent() == null) throw new RuntimeException("Trying to evaluate attribute in subtree not attached to main tree");        return getParent().Define_ConstructorDecl_constructorDecl(this, caller);    }    // Declared in TypeAnalysis.jrag at line 574    public TypeDecl Define_TypeDecl_hostType(ASTNode caller, ASTNode child) {        if(caller == getTypeDeclOptNoTransform()) {            return hostType();        }        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 TypeAnalysis.jrag at line 532    public boolean Define_boolean_isMemberType(ASTNode caller, ASTNode child) {        if(caller == getTypeDeclOptNoTransform()) {            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 LookupType.jrag at line 92    public boolean Define_boolean_hasPackage(ASTNode caller, ASTNode child, String packageName) {        if(caller == getArgListNoTransform()) {      int childIndex = caller.getIndexOfChild(child);            return unqualifiedScope().hasPackage(packageName);        }        if(getParent() == null) throw new RuntimeException("Trying to evaluate attribute in subtree not attached to main tree");        return getParent().Define_boolean_hasPackage(this, caller, packageName);    }    // Declared in TypeAnalysis.jrag at line 218    public boolean Define_boolean_isAnonymous(ASTNode caller, ASTNode child) {        if(caller == getTypeDeclOptNoTransform()) {            return true;        }        if(getParent() == null) throw new RuntimeException("Trying to evaluate attribute in subtree not attached to main tree");        return getParent().Define_boolean_isAnonymous(this, caller);    }    // Declared in SyntacticClassification.jrag at line 127    public NameType Define_NameType_nameType(ASTNode caller, ASTNode child) {        if(caller == getArgListNoTransform()) {      int childIndex = caller.getIndexOfChild(child);            return NameType.EXPRESSION_NAME;        }        if(caller == getTypeDeclOptNoTransform()) {            return NameType.TYPE_NAME;        }        if(caller == getAccessNoTransform()) {            return NameType.TYPE_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 DefiniteAssignment.jrag at line 431    public boolean Define_boolean_isDAbefore(ASTNode caller, ASTNode child, Variable v) {        if(caller == getTypeDeclOptNoTransform()) {            return isDAafterInstance(v);        }        if(caller == getArgListNoTransform()) {      int i = caller.getIndexOfChild(child);            return computeDAbefore(i, v);        }        if(getParent() == null) throw new RuntimeException("Trying to evaluate attribute in subtree not attached to main tree");        return getParent().Define_boolean_isDAbefore(this, caller, v);    }    // Declared in LookupType.jrag at line 316    public SimpleSet Define_SimpleSet_lookupType(ASTNode caller, ASTNode child, String name) {        if(caller == getTypeDeclOptNoTransform()){    SimpleSet c = localLookupType(name);    if(!c.isEmpty())      return c;    c = lookupType(name);    if(!c.isEmpty())      return c;    return unqualifiedScope().lookupType(name);  }        if(caller == getAccessNoTransform()){    SimpleSet c = lookupType(name);    if(c.size() == 1) {      if(isQualified())        c = keepInnerClasses(c);    }    return c;  }        if(caller == getArgListNoTransform()) {      int childIndex = caller.getIndexOfChild(child);            return unqualifiedScope().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 TypeHierarchyCheck.jrag at line 147    public boolean Define_boolean_inStaticContext(ASTNode caller, ASTNode child) {        if(caller == getTypeDeclOptNoTransform()) {            return isQualified() ?    qualifier().staticContextQualifier() : inStaticContext();        }        if(getParent() == null) throw new RuntimeException("Trying to evaluate attribute in subtree not attached to main tree");        return getParent().Define_boolean_inStaticContext(this, caller);    }    // Declared in DefiniteAssignment.jrag at line 860    public boolean Define_boolean_isDUbefore(ASTNode caller, ASTNode child, Variable v) {        if(caller == getArgListNoTransform()) {      int i = caller.getIndexOfChild(child);            return computeDUbefore(i, v);        }        if(getParent() == null) throw new RuntimeException("Trying to evaluate attribute in subtree not attached to main tree");        return getParent().Define_boolean_isDUbefore(this, caller, v);    }public ASTNode rewriteTo() {    return super.rewriteTo();}}

⌨️ 快捷键说明

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