Don't print abstract modifier for interfaces

git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@688 379699f6-c40d-0410-875b-85095c16579e
stable
jochen 26 years ago
parent 38a70ce98a
commit 2b38935f4e
  1. 14
      jode/jode/decompiler/ClassAnalyzer.java

@ -72,9 +72,6 @@ public class ClassAnalyzer implements Analyzer {
} }
public void analyze() { public void analyze() {
int numFields = 0;
int i = 0;
FieldInfo[] finfos = clazz.getFields(); FieldInfo[] finfos = clazz.getFields();
MethodInfo[] minfos = clazz.getMethods(); MethodInfo[] minfos = clazz.getMethods();
if (finfos == null) { if (finfos == null) {
@ -136,12 +133,15 @@ public class ClassAnalyzer implements Analyzer {
*/ */
return; return;
} }
String modif = Modifier.toString(clazz.getModifiers() int modifiedModifiers = clazz.getModifiers() & ~Modifier.SYNCHRONIZED;
& ~Modifier.SYNCHRONIZED); if (clazz.isInterface())
modifiedModifiers &= ~Modifier.ABSTRACT;
String modif = Modifier.toString(modifiedModifiers);
if (modif.length() > 0) if (modif.length() > 0)
writer.print(modif + " "); writer.print(modif + " ");
writer.print(clazz.isInterface() /*interface is in modif*/
? ""/*interface is in modif*/ : "class "); if (!clazz.isInterface())
writer.print("class ");
writer.println(imports.getClassString(clazz)); writer.println(imports.getClassString(clazz));
writer.tab(); writer.tab();
ClassInfo superClazz = clazz.getSuperclass(); ClassInfo superClazz = clazz.getSuperclass();

Loading…
Cancel
Save