arraydecl.java
来自「JDK1.4编译器后端」· Java 代码 · 共 550 行 · 第 1/2 页
JAVA
550 行
} // Declared in java.ast at line 20 public void setBodyDecl(BodyDecl node, int i) { List<BodyDecl> list = getBodyDeclList(); list.setChild(node, i); } // Declared in java.ast at line 24 public List<BodyDecl> getBodyDecls() { return getBodyDeclList(); } // Declared in java.ast at line 27 public List<BodyDecl> getBodyDeclsNoTransform() { return getBodyDeclListNoTransform(); } // Declared in java.ast at line 31 @SuppressWarnings({"unchecked", "cast"}) public List<BodyDecl> getBodyDeclList() { return (List<BodyDecl>)getChild(3); } // Declared in java.ast at line 35 @SuppressWarnings({"unchecked", "cast"}) public List<BodyDecl> getBodyDeclListNoTransform() { return (List<BodyDecl>)getChildNoTransform(3); } // Declared in AccessControl.jrag at line 13 @SuppressWarnings({"unchecked", "cast"}) public boolean accessibleFrom(TypeDecl type) { Object _parameters = type;if(accessibleFrom_TypeDecl_values == null) accessibleFrom_TypeDecl_values = new java.util.HashMap(4); if(accessibleFrom_TypeDecl_values.containsKey(_parameters)) return ((Boolean)accessibleFrom_TypeDecl_values.get(_parameters)).booleanValue(); int num = boundariesCrossed; boolean isFinal = this.is$Final(); boolean accessibleFrom_TypeDecl_value = accessibleFrom_compute(type); if(isFinal && num == boundariesCrossed) accessibleFrom_TypeDecl_values.put(_parameters, Boolean.valueOf(accessibleFrom_TypeDecl_value)); return accessibleFrom_TypeDecl_value; } private boolean accessibleFrom_compute(TypeDecl type) { return elementType().accessibleFrom(type); } // Declared in Arrays.jrag at line 12 @SuppressWarnings({"unchecked", "cast"}) public int dimension() { if(dimension_computed) return dimension_value; int num = boundariesCrossed; boolean isFinal = this.is$Final(); dimension_value = dimension_compute(); if(isFinal && num == boundariesCrossed) dimension_computed = true; return dimension_value; } private int dimension_compute() { return componentType().dimension() + 1; } // Declared in Arrays.jrag at line 16 @SuppressWarnings({"unchecked", "cast"}) public TypeDecl elementType() { if(elementType_computed) return elementType_value; int num = boundariesCrossed; boolean isFinal = this.is$Final(); elementType_value = elementType_compute(); if(isFinal && num == boundariesCrossed) elementType_computed = true; return elementType_value; } private TypeDecl elementType_compute() { return componentType().elementType(); } // Declared in Arrays.jrag at line 53 @SuppressWarnings({"unchecked", "cast"}) public String name() { String name_value = name_compute(); return name_value; } private String name_compute() { return fullName(); } // Declared in Arrays.jrag at line 54 @SuppressWarnings({"unchecked", "cast"}) public String fullName() { if(fullName_computed) return fullName_value; int num = boundariesCrossed; boolean isFinal = this.is$Final(); fullName_value = fullName_compute(); if(isFinal && num == boundariesCrossed) fullName_computed = true; return fullName_value; } private String fullName_compute() { return getID(); } // Declared in QualifiedNames.jrag at line 87 @SuppressWarnings({"unchecked", "cast"}) public String typeName() { if(typeName_computed) return typeName_value; int num = boundariesCrossed; boolean isFinal = this.is$Final(); typeName_value = typeName_compute(); if(isFinal && num == boundariesCrossed) typeName_computed = true; return typeName_value; } private String typeName_compute() { return componentType().typeName() + "[]"; } // Declared in TypeAnalysis.jrag at line 121 @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()) { TypeDecl SC = componentType(); TypeDecl TC = type.componentType(); if(SC.isPrimitiveType() && TC.isPrimitiveType() && SC == TC) return true; if(SC.isReferenceType() && TC.isReferenceType()) { return SC.castingConversionTo(TC); } return false; } else if(type.isClassDecl()) { return type.isObject(); } else if(type.isInterfaceDecl()) { return type == typeSerializable() || type == typeCloneable(); } else return super.castingConversionTo(type); } // Declared in TypeAnalysis.jrag at line 215 @SuppressWarnings({"unchecked", "cast"}) public boolean isArrayDecl() { boolean isArrayDecl_value = isArrayDecl_compute(); return isArrayDecl_value; } private boolean isArrayDecl_compute() { return true; } // Declared in TypeAnalysis.jrag at line 412 @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.isSupertypeOfArrayDecl(this); } // Declared in TypeAnalysis.jrag at line 470 @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(type.elementType().isPrimitive() && elementType().isPrimitive()) return type.dimension() == dimension() && type.elementType() == elementType(); return type.componentType().instanceOf(componentType()); } // Declared in ConstantPool.jrag at line 36 @SuppressWarnings({"unchecked", "cast"}) public String constantPoolName() { if(constantPoolName_computed) return constantPoolName_value; int num = boundariesCrossed; boolean isFinal = this.is$Final(); constantPoolName_value = constantPoolName_compute(); if(isFinal && num == boundariesCrossed) constantPoolName_computed = true; return constantPoolName_value; } private String constantPoolName_compute() { return typeDescriptor(); } // Declared in ConstantPoolNames.jrag at line 26 @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() { StringBuffer dim = new StringBuffer(); for(int i = 0; i < dimension(); i++) dim.append("["); return dim.toString() + elementType().typeDescriptor(); } // Declared in CreateBCode.jrag at line 801 @SuppressWarnings({"unchecked", "cast"}) public String arrayTypeDescriptor() { String arrayTypeDescriptor_value = arrayTypeDescriptor_compute(); return arrayTypeDescriptor_value; } private String arrayTypeDescriptor_compute() { return typeDescriptor(); } // Declared in Java2Rewrites.jrag at line 26 @SuppressWarnings({"unchecked", "cast"}) public String jvmName() { if(jvmName_computed) return jvmName_value; int num = boundariesCrossed; boolean isFinal = this.is$Final(); jvmName_value = jvmName_compute(); if(isFinal && num == boundariesCrossed) jvmName_computed = true; return jvmName_value; } private String jvmName_compute() { StringBuffer dim = new StringBuffer(); for(int i = 0; i < dimension(); i++) dim.append("["); if(elementType().isReferenceType()) return dim.toString() + "L" + elementType().jvmName() + ";"; else return dim.toString() + elementType().jvmName(); } // Declared in Java2Rewrites.jrag at line 61 @SuppressWarnings({"unchecked", "cast"}) public String referenceClassFieldName() { String referenceClassFieldName_value = referenceClassFieldName_compute(); return referenceClassFieldName_value; } private String referenceClassFieldName_compute() { return "array" + jvmName().replace('[', '$').replace('.', '$').replace(';', ' ').trim(); } // Declared in TypeAnalysis.jrag at line 141 @SuppressWarnings({"unchecked", "cast"}) public TypeDecl typeSerializable() { TypeDecl typeSerializable_value = getParent().Define_TypeDecl_typeSerializable(this, null); return typeSerializable_value; } // Declared in TypeAnalysis.jrag at line 142 @SuppressWarnings({"unchecked", "cast"}) public TypeDecl typeCloneable() { TypeDecl typeCloneable_value = getParent().Define_TypeDecl_typeCloneable(this, null); return typeCloneable_value; }public ASTNode rewriteTo() { return super.rewriteTo();}}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?