📄 interfacedecl.java
字号:
private boolean isAbstract_compute() { return true; } protected int isStatic_visited = -1; // Declared in Modifiers.jrag at line 206 @SuppressWarnings({"unchecked", "cast"}) public boolean isStatic() { if(isStatic_computed) return isStatic_value; if(isStatic_visited == boundariesCrossed) throw new RuntimeException("Circular definition of attr: isStatic in class: "); isStatic_visited = boundariesCrossed; int num = boundariesCrossed; boolean isFinal = this.is$Final(); isStatic_value = isStatic_compute(); if(isFinal && num == boundariesCrossed) isStatic_computed = true; isStatic_visited = -1; return isStatic_value; } private boolean isStatic_compute() { return getModifiers().isStatic() || isMemberType(); } protected java.util.Map castingConversionTo_TypeDecl_visited; // Declared in TypeAnalysis.jrag at line 100 @SuppressWarnings({"unchecked", "cast"}) public boolean castingConversionTo(TypeDecl type) { Object _parameters = type;if(castingConversionTo_TypeDecl_visited == null) castingConversionTo_TypeDecl_visited = new java.util.HashMap(4);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(); if(new Integer(boundariesCrossed).equals(castingConversionTo_TypeDecl_visited.get(_parameters))) throw new RuntimeException("Circular definition of attr: castingConversionTo in class: "); castingConversionTo_TypeDecl_visited.put(_parameters, new Integer(boundariesCrossed)); 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)); castingConversionTo_TypeDecl_visited.remove(_parameters); 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); } protected int isInterfaceDecl_visited = -1; // Declared in TypeAnalysis.jrag at line 213 @SuppressWarnings({"unchecked", "cast"}) public boolean isInterfaceDecl() { if(isInterfaceDecl_visited == boundariesCrossed) throw new RuntimeException("Circular definition of attr: isInterfaceDecl in class: "); isInterfaceDecl_visited = boundariesCrossed; boolean isInterfaceDecl_value = isInterfaceDecl_compute(); isInterfaceDecl_visited = -1; return isInterfaceDecl_value; } private boolean isInterfaceDecl_compute() { return true; } protected java.util.Map instanceOf_TypeDecl_visited; // Declared in TypeAnalysis.jrag at line 411 @SuppressWarnings({"unchecked", "cast"}) public boolean instanceOf(TypeDecl type) { Object _parameters = type;if(instanceOf_TypeDecl_visited == null) instanceOf_TypeDecl_visited = new java.util.HashMap(4);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(); if(new Integer(boundariesCrossed).equals(instanceOf_TypeDecl_visited.get(_parameters))) throw new RuntimeException("Circular definition of attr: instanceOf in class: "); instanceOf_TypeDecl_visited.put(_parameters, new Integer(boundariesCrossed)); 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)); instanceOf_TypeDecl_visited.remove(_parameters); return instanceOf_TypeDecl_value; } private boolean instanceOf_compute(TypeDecl type) { return type.isSupertypeOfInterfaceDecl(this); } protected java.util.Map isSupertypeOfClassDecl_ClassDecl_visited; // Declared in TypeAnalysis.jrag at line 430 @SuppressWarnings({"unchecked", "cast"}) public boolean isSupertypeOfClassDecl(ClassDecl type) { Object _parameters = type;if(isSupertypeOfClassDecl_ClassDecl_visited == null) isSupertypeOfClassDecl_ClassDecl_visited = new java.util.HashMap(4); if(new Integer(boundariesCrossed).equals(isSupertypeOfClassDecl_ClassDecl_visited.get(_parameters))) throw new RuntimeException("Circular definition of attr: isSupertypeOfClassDecl in class: "); isSupertypeOfClassDecl_ClassDecl_visited.put(_parameters, new Integer(boundariesCrossed)); boolean isSupertypeOfClassDecl_ClassDecl_value = isSupertypeOfClassDecl_compute(type); isSupertypeOfClassDecl_ClassDecl_visited.remove(_parameters); 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); } protected java.util.Map isSupertypeOfInterfaceDecl_InterfaceDecl_visited; // Declared in TypeAnalysis.jrag at line 443 @SuppressWarnings({"unchecked", "cast"}) public boolean isSupertypeOfInterfaceDecl(InterfaceDecl type) { Object _parameters = type;if(isSupertypeOfInterfaceDecl_InterfaceDecl_visited == null) isSupertypeOfInterfaceDecl_InterfaceDecl_visited = new java.util.HashMap(4); if(new Integer(boundariesCrossed).equals(isSupertypeOfInterfaceDecl_InterfaceDecl_visited.get(_parameters))) throw new RuntimeException("Circular definition of attr: isSupertypeOfInterfaceDecl in class: "); isSupertypeOfInterfaceDecl_InterfaceDecl_visited.put(_parameters, new Integer(boundariesCrossed)); boolean isSupertypeOfInterfaceDecl_InterfaceDecl_value = isSupertypeOfInterfaceDecl_compute(type); isSupertypeOfInterfaceDecl_InterfaceDecl_visited.remove(_parameters); 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; } protected java.util.Map isSupertypeOfArrayDecl_ArrayDecl_visited; // Declared in TypeAnalysis.jrag at line 460 @SuppressWarnings({"unchecked", "cast"}) public boolean isSupertypeOfArrayDecl(ArrayDecl type) { Object _parameters = type;if(isSupertypeOfArrayDecl_ArrayDecl_visited == null) isSupertypeOfArrayDecl_ArrayDecl_visited = new java.util.HashMap(4); if(new Integer(boundariesCrossed).equals(isSupertypeOfArrayDecl_ArrayDecl_visited.get(_parameters))) throw new RuntimeException("Circular definition of attr: isSupertypeOfArrayDecl in class: "); isSupertypeOfArrayDecl_ArrayDecl_visited.put(_parameters, new Integer(boundariesCrossed)); boolean isSupertypeOfArrayDecl_ArrayDecl_value = isSupertypeOfArrayDecl_compute(type); isSupertypeOfArrayDecl_ArrayDecl_visited.remove(_parameters); 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; if(getParent() == null) throw new RuntimeException("Trying to evaluate attribute in subtree not attached to main tree"); boolean new_isCircular_value = isCircular_compute(); if (new_isCircular_value!=isCircular_value) CHANGE = true; isCircular_value = new_isCircular_value; CIRCLE_INDEX++;if(CIRCLE_INDEX > 100) throw new java.lang.RuntimeException("Iteration limit 100 exceeded"); } while (CHANGE); if(isFinal && num == boundariesCrossed){ isCircular_computed = true; LAST_CYCLE = true; if(getParent() == null) throw new RuntimeException("Trying to evaluate attribute in subtree not attached to main tree"); isCircular_compute(); LAST_CYCLE = false; } else { RESET_CYCLE = true; if(getParent() == null) throw new RuntimeException("Trying to evaluate attribute in subtree not attached to main tree"); 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 (LAST_CYCLE) { isCircular_computed = true; if(getParent() == null) throw new RuntimeException("Trying to evaluate attribute in subtree not attached to main tree"); return isCircular_compute(); } if (RESET_CYCLE) { isCircular_computed = false; isCircular_initialized = false; return isCircular_value; } if(getParent() == null) throw new RuntimeException("Trying to evaluate attribute in subtree not attached to main tree"); 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; } protected int unknownMethod_visited = -1; // Declared in TypeAnalysis.jrag at line 98 @SuppressWarnings({"unchecked", "cast"}) public MethodDecl unknownMethod() { if(unknownMethod_visited == boundariesCrossed) throw new RuntimeException("Circular definition of attr: unknownMethod in class: "); unknownMethod_visited = boundariesCrossed; if(getParent() == null) throw new RuntimeException("Trying to evaluate attribute in subtree not attached to main tree"); MethodDecl unknownMethod_value = getParent().Define_MethodDecl_unknownMethod(this, null); unknownMethod_visited = -1; 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 + -