|
|
@ -82,6 +82,7 @@ public class ClassInfo extends BinaryInfo { |
|
|
|
private boolean modified = false; |
|
|
|
private boolean modified = false; |
|
|
|
|
|
|
|
|
|
|
|
private int modifiers = -1; |
|
|
|
private int modifiers = -1; |
|
|
|
|
|
|
|
private boolean deprecatedFlag; |
|
|
|
private String name; |
|
|
|
private String name; |
|
|
|
private ClassInfo superclass; |
|
|
|
private ClassInfo superclass; |
|
|
|
private ClassInfo[] interfaces; |
|
|
|
private ClassInfo[] interfaces; |
|
|
@ -272,6 +273,11 @@ public class ClassInfo extends BinaryInfo { |
|
|
|
extraClasses[--extraCount] = ici; |
|
|
|
extraClasses[--extraCount] = ici; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} else if (name.equals("Deprecated")) { |
|
|
|
|
|
|
|
deprecatedFlag = true; |
|
|
|
|
|
|
|
if (length != 0) |
|
|
|
|
|
|
|
throw new ClassFormatException |
|
|
|
|
|
|
|
("Deprecated attribute has wrong length"); |
|
|
|
} else |
|
|
|
} else |
|
|
|
super.readAttribute(name, length, cp, input, howMuch); |
|
|
|
super.readAttribute(name, length, cp, input, howMuch); |
|
|
|
} |
|
|
|
} |
|
|
@ -406,6 +412,8 @@ public class ClassInfo extends BinaryInfo { |
|
|
|
gcp.putUTF8(extraClasses[i].name); |
|
|
|
gcp.putUTF8(extraClasses[i].name); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (deprecatedFlag) |
|
|
|
|
|
|
|
gcp.putUTF8("Deprecated"); |
|
|
|
prepareAttributes(gcp); |
|
|
|
prepareAttributes(gcp); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -461,6 +469,10 @@ public class ClassInfo extends BinaryInfo { |
|
|
|
output.writeShort(extraClasses[i].modifiers); |
|
|
|
output.writeShort(extraClasses[i].modifiers); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (deprecatedFlag) { |
|
|
|
|
|
|
|
output.writeShort(gcp.putUTF8("Deprecated")); |
|
|
|
|
|
|
|
output.writeInt(0); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void write(DataOutputStream out) throws IOException { |
|
|
|
public void write(DataOutputStream out) throws IOException { |
|
|
@ -749,6 +761,10 @@ public class ClassInfo extends BinaryInfo { |
|
|
|
return Modifier.isInterface(getModifiers()); |
|
|
|
return Modifier.isInterface(getModifiers()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public boolean isDeprecated() { |
|
|
|
|
|
|
|
return deprecatedFlag; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public FieldInfo findField(String name, String typeSig) { |
|
|
|
public FieldInfo findField(String name, String typeSig) { |
|
|
|
if ((status & FIELDS) == 0) |
|
|
|
if ((status & FIELDS) == 0) |
|
|
|
loadInfo(FIELDS); |
|
|
|
loadInfo(FIELDS); |
|
|
@ -823,6 +839,10 @@ public class ClassInfo extends BinaryInfo { |
|
|
|
modified = true; |
|
|
|
modified = true; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void setDeprecated(boolean flag) { |
|
|
|
|
|
|
|
deprecatedFlag = flag; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void setMethods(MethodInfo[] mi) { |
|
|
|
public void setMethods(MethodInfo[] mi) { |
|
|
|
methods = mi; |
|
|
|
methods = mi; |
|
|
|
modified = true; |
|
|
|
modified = true; |
|
|
|