2004-11-15 | Paul Boddie | raw annotate files changeset graph | Replaced apply usage with CALL_FUNCTION_VAR. Changed *static instruction translations to use the class name rather than self.__class__ although this is likely to be insufficient. Added static field definition and support for the <clinit> method as a class method in Python classes. Changed superclass loading to hopefully get sibling classes directly from the global namespace. Adopted globals() in the bytecode test program for the global namespace. Fixed classhook to avoid "restricted mode" issues with the global namespace used, added calling of __clinit__ (the Python equivalent of <clinit>), and introduced improved processing of classes by ordering them according to superclass dependencies. |
1 public class FieldTest { 2 private int a; 3 protected int b = 123; 4 protected FieldTestClass c; 5 protected FieldTestClass d = null; 6 public FieldTestClass e = new FieldTestClass(456); 7 public FieldTestClass f = new FieldTestClass(b + e.a); 8 public static FieldTestClass g; 9 public static FieldTestClass h = new FieldTestClass(789); 10 } 11 12 class FieldTestClass { 13 public int a; 14 15 public FieldTestClass(int a) { 16 this.a = a; 17 } 18 }