equal
deleted
inserted
replaced
102 print(name); |
102 print(name); |
103 |
103 |
104 Signature_attribute sigAttr = getSignature(cf.attributes); |
104 Signature_attribute sigAttr = getSignature(cf.attributes); |
105 if (sigAttr == null) { |
105 if (sigAttr == null) { |
106 // use info from class file header |
106 // use info from class file header |
107 if (classFile.isClass()) { |
107 if (classFile.isClass() && classFile.super_class != 0 ) { |
108 if (classFile.super_class != 0 ) { |
108 String sn = getJavaSuperclassName(cf); |
109 String sn = getJavaSuperclassName(cf); |
109 print(" extends "); |
110 if (!sn.equals("java.lang.Object") || options.compat) { // BUG XXXXXXXX |
110 print(sn); |
111 print(" extends "); |
|
112 print(sn); |
|
113 } |
|
114 } |
|
115 } |
111 } |
116 for (int i = 0; i < classFile.interfaces.length; i++) { |
112 for (int i = 0; i < classFile.interfaces.length; i++) { |
117 print(i == 0 ? (classFile.isClass() ? " implements " : " extends ") : ","); |
113 print(i == 0 ? (classFile.isClass() ? " implements " : " extends ") : ","); |
118 print(getJavaInterfaceName(classFile, i)); |
114 print(getJavaInterfaceName(classFile, i)); |
119 } |
115 } |
122 Type t = sigAttr.getParsedSignature().getType(constant_pool); |
118 Type t = sigAttr.getParsedSignature().getType(constant_pool); |
123 // The signature parser cannot disambiguate between a |
119 // The signature parser cannot disambiguate between a |
124 // FieldType and a ClassSignatureType that only contains a superclass type. |
120 // FieldType and a ClassSignatureType that only contains a superclass type. |
125 if (t instanceof Type.ClassSigType) |
121 if (t instanceof Type.ClassSigType) |
126 print(t); |
122 print(t); |
127 else if (!t.isObject()) { |
123 else { |
128 print(" extends "); |
124 print(" extends "); |
129 print(t); |
125 print(t); |
130 } |
126 } |
131 } catch (ConstantPoolException e) { |
127 } catch (ConstantPoolException e) { |
132 print(report(e)); |
128 print(report(e)); |