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