isSynthetic

git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@261 379699f6-c40d-0410-875b-85095c16579e
stable
jochen 26 years ago
parent 6c3b630017
commit b3dd25231c
  1. 9
      jode/jode/decompiler/FieldAnalyzer.java

@ -33,6 +33,7 @@ public class FieldAnalyzer implements Analyzer {
Type type;
String fieldName;
Expression constant;
boolean isSynthetic;
public FieldAnalyzer(ClassAnalyzer cla, FieldInfo fd,
JodeEnvironment e)
@ -44,6 +45,7 @@ public class FieldAnalyzer implements Analyzer {
type = fd.getType();
fieldName = fd.getName();
constant = null;
this.isSynthetic = (fd.findAttribute("Synthetic") != null);
AttributeInfo attribute = fd.findAttribute("ConstantValue");
@ -74,6 +76,10 @@ public class FieldAnalyzer implements Analyzer {
return type;
}
public boolean isSynthetic() {
return isSynthetic;
}
public boolean setInitializer(Expression expr) {
expr.makeInitializer();
if (constant != null)
@ -89,6 +95,8 @@ public class FieldAnalyzer implements Analyzer {
public void dumpSource(TabbedPrintWriter writer)
throws java.io.IOException
{
if (isSynthetic)
return; /*XXX*/
String modif = Modifier.toString(modifiers);
if (modif.length() > 0)
writer.print(modif+" ");
@ -100,3 +108,4 @@ public class FieldAnalyzer implements Analyzer {
writer.println(";");
}
}

Loading…
Cancel
Save