📄 interfacedecl.java
字号:
SimpleSet set = localTypeDecls(name); if(!set.isEmpty()) return set; for(Iterator outerIter = superinterfacesIterator(); outerIter.hasNext(); ) { TypeDecl typeDecl = (TypeDecl)outerIter.next(); for(Iterator iter = typeDecl.memberTypes(name).iterator(); iter.hasNext(); ) { TypeDecl decl = (TypeDecl)iter.next(); if(!decl.isPrivate()) set = set.add(decl); } } return set; } // Declared in LookupVariable.jrag at line 297 @SuppressWarnings({"unchecked", "cast"}) public SimpleSet memberFields(String name) { Object _parameters = name;if(memberFields_String_values == null) memberFields_String_values = new java.util.HashMap(4); if(memberFields_String_values.containsKey(_parameters)) return (SimpleSet)memberFields_String_values.get(_parameters); int num = boundariesCrossed; boolean isFinal = this.is$Final(); SimpleSet memberFields_String_value = memberFields_compute(name); if(isFinal && num == boundariesCrossed) memberFields_String_values.put(_parameters, memberFields_String_value); return memberFields_String_value; } private SimpleSet memberFields_compute(String name) { SimpleSet fields = localFields(name); if(!fields.isEmpty()) return fields; for(Iterator outerIter = superinterfacesIterator(); outerIter.hasNext(); ) { TypeDecl typeDecl = (TypeDecl)outerIter.next(); for(Iterator iter = typeDecl.memberFields(name).iterator(); iter.hasNext(); ) { FieldDeclaration f = (FieldDeclaration)iter.next(); if(f.accessibleFrom(this) && !f.isPrivate()) { fields = fields.add(f); } } } return fields; } // Declared in Modifiers.jrag at line 203 @SuppressWarnings({"unchecked", "cast"}) public boolean isAbstract() { boolean isAbstract_value = isAbstract_compute(); return isAbstract_value; } private boolean isAbstract_compute() { return true; } // Declared in Modifiers.jrag at line 206 @SuppressWarnings({"unchecked", "cast"}) public boolean isStatic() { if(isStatic_computed) return isStatic_value; int num = boundariesCrossed; boolean isFinal = this.is$Final(); isStatic_value = isStatic_compute(); if(isFinal && num == boundariesCrossed) isStatic_computed = true; return isStatic_value; } private boolean isStatic_compute() { return getModifiers().isStatic() || isMemberType(); } // Declared in TypeAnalysis.jrag at line 100 @SuppressWarnings({"unchecked", "cast"}) public boolean castingConversionTo(TypeDecl type) { Object _parameters = type;if(castingConversionTo_TypeDecl_values == null) castingConversionTo_TypeDecl_values = new java.util.HashMap(4); if(castingConversionTo_TypeDecl_values.containsKey(_parameters)) return ((Boolean)castingConversionTo_TypeDecl_values.get(_parameters)).booleanValue(); int num = boundariesCrossed; boolean isFinal = this.is$Final(); boolean castingConversionTo_TypeDecl_value = castingConversionTo_compute(type); if(isFinal && num == boundariesCrossed) castingConversionTo_TypeDecl_values.put(_parameters, Boolean.valueOf(castingConversionTo_TypeDecl_value)); return castingConversionTo_TypeDecl_value; } private boolean castingConversionTo_compute(TypeDecl type) { if(type.isArrayDecl()) { return type.instanceOf(this); } else if(type.isClassDecl()) { return !type.isFinal() || type.instanceOf(this); } else if(type.isInterfaceDecl()) { for(Iterator i1 = methodsIterator(); i1.hasNext(); ) { MethodDecl m = (MethodDecl)i1.next(); for(Iterator iter = type.methodsSignature(m.signature()).iterator(); iter.hasNext(); ) { MethodDecl n = (MethodDecl)iter.next(); if(n.type() != m.type()) return false; } } return true; } else return super.castingConversionTo(type); } // Declared in TypeAnalysis.jrag at line 213 @SuppressWarnings({"unchecked", "cast"}) public boolean isInterfaceDecl() { boolean isInterfaceDecl_value = isInterfaceDecl_compute(); return isInterfaceDecl_value; } private boolean isInterfaceDecl_compute() { return true; } // Declared in TypeAnalysis.jrag at line 411 @SuppressWarnings({"unchecked", "cast"}) public boolean instanceOf(TypeDecl type) { Object _parameters = type;if(instanceOf_TypeDecl_values == null) instanceOf_TypeDecl_values = new java.util.HashMap(4); if(instanceOf_TypeDecl_values.containsKey(_parameters)) return ((Boolean)instanceOf_TypeDecl_values.get(_parameters)).booleanValue(); int num = boundariesCrossed; boolean isFinal = this.is$Final(); boolean instanceOf_TypeDecl_value = instanceOf_compute(type); if(isFinal && num == boundariesCrossed) instanceOf_TypeDecl_values.put(_parameters, Boolean.valueOf(instanceOf_TypeDecl_value)); return instanceOf_TypeDecl_value; } private boolean instanceOf_compute(TypeDecl type) { return type.isSupertypeOfInterfaceDecl(this); } // Declared in TypeAnalysis.jrag at line 430 @SuppressWarnings({"unchecked", "cast"}) public boolean isSupertypeOfClassDecl(ClassDecl type) { boolean isSupertypeOfClassDecl_ClassDecl_value = isSupertypeOfClassDecl_compute(type); return isSupertypeOfClassDecl_ClassDecl_value; } private boolean isSupertypeOfClassDecl_compute(ClassDecl type) { if(super.isSupertypeOfClassDecl(type)) return true; for(Iterator iter = type.interfacesIterator(); iter.hasNext(); ) { TypeDecl typeDecl = (TypeDecl)iter.next(); if(typeDecl.instanceOf(this)) return true; } return type.hasSuperclass() && type.superclass() != null && type.superclass().instanceOf(this); } // Declared in TypeAnalysis.jrag at line 443 @SuppressWarnings({"unchecked", "cast"}) public boolean isSupertypeOfInterfaceDecl(InterfaceDecl type) { boolean isSupertypeOfInterfaceDecl_InterfaceDecl_value = isSupertypeOfInterfaceDecl_compute(type); return isSupertypeOfInterfaceDecl_InterfaceDecl_value; } private boolean isSupertypeOfInterfaceDecl_compute(InterfaceDecl type) { if(super.isSupertypeOfInterfaceDecl(type)) return true; for(Iterator iter = type.superinterfacesIterator(); iter.hasNext(); ) { TypeDecl superinterface = (TypeDecl)iter.next(); if(superinterface.instanceOf(this)) return true; } return false; } // Declared in TypeAnalysis.jrag at line 460 @SuppressWarnings({"unchecked", "cast"}) public boolean isSupertypeOfArrayDecl(ArrayDecl type) { boolean isSupertypeOfArrayDecl_ArrayDecl_value = isSupertypeOfArrayDecl_compute(type); return isSupertypeOfArrayDecl_ArrayDecl_value; } private boolean isSupertypeOfArrayDecl_compute(ArrayDecl type) { if(super.isSupertypeOfArrayDecl(type)) return true; for(Iterator iter = type.interfacesIterator(); iter.hasNext(); ) { TypeDecl typeDecl = (TypeDecl)iter.next(); if(typeDecl.instanceOf(this)) return true; } return false; } protected int isCircular_visited; protected boolean isCircular_computed = false; protected boolean isCircular_initialized = false; protected boolean isCircular_value; @SuppressWarnings({"unchecked", "cast"}) public boolean isCircular() { if(isCircular_computed) return isCircular_value; if (!isCircular_initialized) { isCircular_initialized = true; isCircular_value = true; } if (!IN_CIRCLE) { IN_CIRCLE = true; int num = boundariesCrossed; boolean isFinal = this.is$Final(); CIRCLE_INDEX = 1; do { isCircular_visited = CIRCLE_INDEX; CHANGE = false; boolean new_isCircular_value = isCircular_compute(); if (new_isCircular_value!=isCircular_value) CHANGE = true; isCircular_value = new_isCircular_value; CIRCLE_INDEX++; } while (CHANGE); if(isFinal && num == boundariesCrossed){ isCircular_computed = true; } else { RESET_CYCLE = true; isCircular_compute(); RESET_CYCLE = false; isCircular_computed = false; isCircular_initialized = false; } IN_CIRCLE = false; return isCircular_value; } if(isCircular_visited != CIRCLE_INDEX) { isCircular_visited = CIRCLE_INDEX; if (RESET_CYCLE) { isCircular_computed = false; isCircular_initialized = false; return isCircular_value; } boolean new_isCircular_value = isCircular_compute(); if (new_isCircular_value!=isCircular_value) CHANGE = true; isCircular_value = new_isCircular_value; return isCircular_value; } return isCircular_value; } private boolean isCircular_compute() { for(int i = 0; i < getNumSuperInterfaceId(); i++) { Access a = getSuperInterfaceId(i).lastAccess(); while(a != null) { if(a.type().isCircular()) return true; a = (a.isQualified() && a.qualifier().isTypeAccess()) ? (Access)a.qualifier() : null; } } return false; } // Declared in ConstantPoolNames.jrag at line 16 @SuppressWarnings({"unchecked", "cast"}) public String typeDescriptor() { if(typeDescriptor_computed) return typeDescriptor_value; int num = boundariesCrossed; boolean isFinal = this.is$Final(); typeDescriptor_value = typeDescriptor_compute(); if(isFinal && num == boundariesCrossed) typeDescriptor_computed = true; return typeDescriptor_value; } private String typeDescriptor_compute() { return "L" + constantPoolName() + ";"; } // Declared in CreateBCode.jrag at line 803 @SuppressWarnings({"unchecked", "cast"}) public String arrayTypeDescriptor() { String arrayTypeDescriptor_value = arrayTypeDescriptor_compute(); return arrayTypeDescriptor_value; } private String arrayTypeDescriptor_compute() { return constantPoolName(); } // Declared in TypeAnalysis.jrag at line 98 @SuppressWarnings({"unchecked", "cast"}) public MethodDecl unknownMethod() { MethodDecl unknownMethod_value = getParent().Define_MethodDecl_unknownMethod(this, null); return unknownMethod_value; } // Declared in TypeAnalysis.jrag at line 578 public TypeDecl Define_TypeDecl_hostType(ASTNode caller, ASTNode child) { if(caller == getSuperInterfaceIdListNoTransform()) { int childIndex = caller.getIndexOfChild(child); return hostType(); } return super.Define_TypeDecl_hostType(caller, child); } // Declared in SyntacticClassification.jrag at line 75 public NameType Define_NameType_nameType(ASTNode caller, ASTNode child) { if(caller == getSuperInterfaceIdListNoTransform()) { int childIndex = caller.getIndexOfChild(child); return NameType.TYPE_NAME; } return super.Define_NameType_nameType(caller, child); }public ASTNode rewriteTo() { return super.rewriteTo();}}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -