Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

Classes can implement a method "void $transformer()".
This method is called on every object whose class was redefined and can therefore be used to initialize the new instances of a class.
Additionally, it is possible to implement a static method "void $staticTransformer()" that will be called on the class only.
Example code:

Code Block
borderStylesolid
titleInitial versionborderStylesolid
class A {
  int x;
}
Code Block
borderStylesolid
titleNew versionborderStylesolid
class A' {
  int x;
  int doubleX;

  static void $staticTransformer() {
    System.out.println("Class A has a new version");
  }

  void $transformer() {
    doubleX = 2 * x;
  }
}

...