|
|
@ -46,7 +46,6 @@ public class ClassInfo extends BinaryInfo { |
|
|
|
private ClassInfo[] interfaces; |
|
|
|
private ClassInfo[] interfaces; |
|
|
|
private FieldInfo[] fields; |
|
|
|
private FieldInfo[] fields; |
|
|
|
private MethodInfo[] methods; |
|
|
|
private MethodInfo[] methods; |
|
|
|
private AttributeInfo[] attributes; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public final static ClassInfo javaLangObject = forName("java.lang.Object"); |
|
|
|
public final static ClassInfo javaLangObject = forName("java.lang.Object"); |
|
|
|
|
|
|
|
|
|
|
@ -83,8 +82,9 @@ public class ClassInfo extends BinaryInfo { |
|
|
|
String name = (String) enum.nextElement(); |
|
|
|
String name = (String) enum.nextElement(); |
|
|
|
if (!name.endsWith(".class")) |
|
|
|
if (!name.endsWith(".class")) |
|
|
|
throw new jode.AssertError("Wrong file name"); |
|
|
|
throw new jode.AssertError("Wrong file name"); |
|
|
|
name.substring(0, name.length()-6); |
|
|
|
return ClassInfo.forName(packageName + "." |
|
|
|
return ClassInfo.forName(packageName+"."+ name); |
|
|
|
+ name.substring(0, name.length()-6)); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|
} |
|
|
|
} |
|
|
@ -156,7 +156,6 @@ public class ClassInfo extends BinaryInfo { |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
int count = input.readUnsignedShort(); |
|
|
|
int count = input.readUnsignedShort(); |
|
|
|
fields = new FieldInfo[count]; |
|
|
|
|
|
|
|
for (int i=0; i< count; i++) { |
|
|
|
for (int i=0; i< count; i++) { |
|
|
|
input.readUnsignedShort(); // modifier
|
|
|
|
input.readUnsignedShort(); // modifier
|
|
|
|
input.readUnsignedShort(); // name
|
|
|
|
input.readUnsignedShort(); // name
|
|
|
@ -178,7 +177,6 @@ public class ClassInfo extends BinaryInfo { |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
int count = input.readUnsignedShort(); |
|
|
|
int count = input.readUnsignedShort(); |
|
|
|
fields = new FieldInfo[count]; |
|
|
|
|
|
|
|
for (int i=0; i< count; i++) { |
|
|
|
for (int i=0; i< count; i++) { |
|
|
|
input.readUnsignedShort(); // modifier
|
|
|
|
input.readUnsignedShort(); // modifier
|
|
|
|
input.readUnsignedShort(); // name
|
|
|
|
input.readUnsignedShort(); // name
|
|
|
|