typedecl.java

来自「JDK1.4编译器前端」· Java 代码 · 共 1,493 行 · 第 1/5 页

JAVA
1,493
字号
        node.memberFields_String_values = null;        node.hasAbstract_visited = -1;        node.hasAbstract_computed = false;        node.unimplementedMethods_visited = -1;        node.unimplementedMethods_computed = false;        node.unimplementedMethods_value = null;        node.isPublic_visited = -1;        node.isPublic_computed = false;        node.isPrivate_visited = -1;        node.isProtected_visited = -1;        node.isAbstract_visited = -1;        node.isStatic_visited = -1;        node.isStatic_computed = false;        node.isFinal_visited = -1;        node.isStrictfp_visited = -1;        node.isSynthetic_visited = -1;        node.hasEnclosingTypeDecl_String_visited = new java.util.HashMap(4);        node.assignableToInt_visited = -1;        node.dumpString_visited = -1;        node.name_visited = -1;        node.fullName_visited = -1;        node.fullName_computed = false;        node.fullName_value = null;        node.typeName_visited = -1;        node.typeName_computed = false;        node.typeName_value = null;        node.identityConversionTo_TypeDecl_visited = new java.util.HashMap(4);        node.wideningConversionTo_TypeDecl_visited = new java.util.HashMap(4);        node.narrowingConversionTo_TypeDecl_visited = new java.util.HashMap(4);        node.narrowingConversionTo_TypeDecl_values = null;        node.stringConversion_visited = -1;        node.assignConversionTo_TypeDecl_Expr_visited = new java.util.HashMap(4);        node.methodInvocationConversionTo_TypeDecl_visited = new java.util.HashMap(4);        node.methodInvocationConversionTo_TypeDecl_values = null;        node.castingConversionTo_TypeDecl_visited = new java.util.HashMap(4);        node.castingConversionTo_TypeDecl_values = null;        node.unaryNumericPromotion_visited = -1;        node.binaryNumericPromotion_TypeDecl_visited = new java.util.HashMap(4);        node.isReferenceType_visited = -1;        node.isPrimitiveType_visited = -1;        node.isNumericType_visited = -1;        node.isIntegralType_visited = -1;        node.isBoolean_visited = -1;        node.isByte_visited = -1;        node.isChar_visited = -1;        node.isShort_visited = -1;        node.isInt_visited = -1;        node.isFloat_visited = -1;        node.isLong_visited = -1;        node.isDouble_visited = -1;        node.isVoid_visited = -1;        node.isNull_visited = -1;        node.isClassDecl_visited = -1;        node.isInterfaceDecl_visited = -1;        node.isArrayDecl_visited = -1;        node.isPrimitive_visited = -1;        node.isString_visited = -1;        node.isString_computed = false;        node.isObject_visited = -1;        node.isObject_computed = false;        node.isUnknown_visited = -1;        node.instanceOf_TypeDecl_visited = new java.util.HashMap(4);        node.instanceOf_TypeDecl_values = null;        node.isSupertypeOfClassDecl_ClassDecl_visited = new java.util.HashMap(4);        node.isSupertypeOfInterfaceDecl_InterfaceDecl_visited = new java.util.HashMap(4);        node.isSupertypeOfArrayDecl_ArrayDecl_visited = new java.util.HashMap(4);        node.isSupertypeOfPrimitiveType_PrimitiveType_visited = new java.util.HashMap(4);        node.isSupertypeOfNullType_NullType_visited = new java.util.HashMap(4);        node.isSupertypeOfVoidType_VoidType_visited = new java.util.HashMap(4);        node.topLevelType_visited = -1;        node.isTopLevelType_visited = -1;        node.isInnerClass_visited = -1;        node.isInnerType_visited = -1;        node.isInnerTypeOf_TypeDecl_visited = new java.util.HashMap(4);        node.withinBodyThatSubclasses_TypeDecl_visited = new java.util.HashMap(4);        node.encloses_TypeDecl_visited = new java.util.HashMap(4);        node.enclosedBy_TypeDecl_visited = new java.util.HashMap(4);        node.hostType_visited = -1;        node.isCircular_visited = 0;        node.isCircular_computed = false;        node.isCircular_initialized = false;        node.componentType_visited = -1;        node.componentType_computed = false;        node.componentType_value = null;        node.typeCloneable_visited = -1;        node.typeSerializable_visited = -1;        node.compilationUnit_visited = -1;        node.isDAbefore_Variable_visited = new java.util.HashMap(4);        node.isDAbefore_Variable_values = null;        node.isDUbefore_Variable_visited = new java.util.HashMap(4);        node.isDUbefore_Variable_values = null;        node.typeException_visited = -1;        node.typeException_computed = false;        node.typeException_value = null;        node.typeRuntimeException_visited = -1;        node.typeRuntimeException_computed = false;        node.typeRuntimeException_value = null;        node.typeError_visited = -1;        node.typeError_computed = false;        node.typeError_value = null;        node.lookupMethod_String_visited = new java.util.HashMap(4);        node.lookupMethod_String_values = null;        node.typeInt_visited = -1;        node.typeObject_visited = -1;        node.typeObject_computed = false;        node.typeObject_value = null;        node.lookupType_String_String_visited = new java.util.HashMap(4);        node.lookupType_String_visited = new java.util.HashMap(4);        node.lookupType_String_values = null;        node.lookupVariable_String_visited = new java.util.HashMap(4);        node.lookupVariable_String_values = null;        node.hasPackage_String_visited = new java.util.HashMap(4);        node.enclosingBlock_visited = -1;        node.packageName_visited = -1;        node.packageName_computed = false;        node.packageName_value = null;        node.isAnonymous_visited = -1;        node.isAnonymous_computed = false;        node.enclosingType_visited = -1;        node.enclosingBodyDecl_visited = -1;        node.isNestedType_visited = -1;        node.isMemberType_visited = -1;        node.isLocalClass_visited = -1;        node.hostPackage_visited = -1;        node.unknownType_visited = -1;        node.unknownType_computed = false;        node.unknownType_value = null;        node.typeVoid_visited = -1;        node.enclosingInstance_visited = -1;        node.inExplicitConstructorInvocation_visited = -1;        node.inExplicitConstructorInvocation_computed = false;        node.inStaticContext_visited = -1;        node.inStaticContext_computed = false;        node.in$Circle(false);        node.is$Final(false);    return node;    }    // Declared in AnonymousClasses.jrag at line 28    public int anonymousIndex = 0;    // Declared in AnonymousClasses.jrag at line 45  public int nextAnonymousIndex() {    if(isNestedType())      return enclosingType().nextAnonymousIndex();    return anonymousIndex++;  }    // Declared in BoundNames.jrag at line 24  // The memberMethods(String name) attribute is used to lookup member methods.  // It uses the methodsNameMap() map where a name is mapped to a list of member  // methods. We extend the map with the declaration m by either appending  // it to an existing list of declarations or adding a new list. That list  // will be used to name bind a new qualified name access.  public MethodDecl addMemberMethod(MethodDecl m) {    addBodyDecl(m);    return (MethodDecl)getBodyDecl(getNumBodyDecl()-1);    /*    HashMap map = methodsNameMap();    ArrayList list = (ArrayList)map.get(m.name());    if(list == null) {      list = new ArrayList(4);      map.put(m.name(), list);    }    list.add(m);    if(!memberMethods(m.name()).contains(m))      throw new Error("The method " + m.signature() + " added to " + typeName() + " can not be found using lookupMemberMethod");    */  }    // Declared in BoundNames.jrag at line 40  public ConstructorDecl addConstructor(ConstructorDecl c) {    addBodyDecl(c);    return (ConstructorDecl)getBodyDecl(getNumBodyDecl()-1);  }    // Declared in BoundNames.jrag at line 45  public ClassDecl addMemberClass(ClassDecl c) {    addBodyDecl(new MemberClassDecl(c));    return ((MemberClassDecl)getBodyDecl(getNumBodyDecl()-1)).getClassDecl();  }    // Declared in BoundNames.jrag at line 52  // the new field must be unique otherwise an error occurs  public FieldDeclaration addMemberField(FieldDeclaration f) {    addBodyDecl(f);    return (FieldDeclaration)getBodyDecl(getNumBodyDecl()-1);    //if(!memberFields(f.name()).contains(f))    //  throw new Error("The field " + f.name() + " added to " + typeName() + " can not be found using lookupMemberField");  }    // Declared in BoundNames.jrag at line 90  public TypeAccess createBoundAccess() {    return new BoundTypeAccess("", name(), this);  }    // Declared in DataStructures.jrag at line 118  public SimpleSet add(Object o) {    return new SimpleSetImpl().add(this).add(o);  }    // Declared in DataStructures.jrag at line 124  private TypeDecl iterElem;    // Declared in DataStructures.jrag at line 125  public Iterator iterator() { iterElem = this; return this; }    // Declared in DataStructures.jrag at line 126  public boolean hasNext() { return iterElem != null; }    // Declared in DataStructures.jrag at line 127  public Object next() { Object o = iterElem; iterElem = null; return o; }    // Declared in DataStructures.jrag at line 128  public void remove() { throw new UnsupportedOperationException(); }    // Declared in DeclareBeforeUse.jrag at line 41  public boolean declaredBeforeUse(Variable decl, ASTNode use) {    int indexDecl = ((ASTNode)decl).varChildIndex(this);    int indexUse = use.varChildIndex(this);    return indexDecl < indexUse;  }    // Declared in DeclareBeforeUse.jrag at line 46  public boolean declaredBeforeUse(Variable decl, int indexUse) {    int indexDecl = ((ASTNode)decl).varChildIndex(this);    return indexDecl < indexUse;  }    // Declared in LookupConstructor.jrag at line 88  public ConstructorDecl lookupConstructor(ConstructorDecl signature) {    for(Iterator iter = constructors().iterator(); iter.hasNext(); ) {      ConstructorDecl decl = (ConstructorDecl)iter.next();      if(decl.sameSignature(signature)) {        return decl;      }    }    return null;  }    // Declared in LookupMethod.jrag at line 214  public Iterator localMethodsIterator() {    return new Iterator() {      private Iterator outer = localMethodsSignatureMap().values().iterator();      private Iterator inner = null;      public boolean hasNext() {        if((inner == null || !inner.hasNext()) && outer.hasNext())          inner = ((SimpleSet)outer.next()).iterator();        return inner == null ? false : inner.hasNext();      }      public Object next() {        return inner.next();      }      public void remove() { throw new UnsupportedOperationException(); }    };    //return localMethodsSignatureMap().values().iterator();  }    // Declared in LookupMethod.jrag at line 282  // iterate over all member methods in this type  public Iterator methodsIterator() {    return new Iterator() {      private Iterator outer = methodsSignatureMap().values().iterator();      private Iterator inner = null;      public boolean hasNext() {        if((inner == null || !inner.hasNext()) && outer.hasNext())          inner = ((SimpleSet)outer.next()).iterator();        return inner != null ? inner.hasNext() : false;      }      public Object next() {

⌨️ 快捷键说明

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