I've got an interface:
public interface Interface {
public static final String FIELD1 = "BAR";
public static final String FIELD2 = "FOO";
.........
}
I'm trying to read the field name via reflection using this code:
Field[] fields = Interface.class.getFields();
for (Field f : fields) {
............
}
The problem is that the array has always length zero. Why?
Edit: I'm using proguard and I think the problem is related with interface obfuscation.