Module rgg
Package de.grogra.rgg

Class NodeUtils

java.lang.Object
de.grogra.rgg.NodeUtils

public class NodeUtils extends Object
  • Constructor Details

    • NodeUtils

      public NodeUtils()
  • Method Details

    • replaceOldExtent

      public static void replaceOldExtent(Node root, Registry r, Transaction xa, boolean unstableNaming)
      This method replace the nodes that are kept during project reset (i.e. the nodes under the root, but not the RGGRoot) with newer version of their compiled types. It should only affect custom types (e.g. user defined modules from within the project). By default, the old nodes use their full type name (e.g. Model.A for module A in file Model). The parameter unstableNaming however forces the use of only the module name (e.g. A). It can lead to nodes being mapped to the wrong new type (e.g. if the project includes Model.A and Otherfile.A, the new node of type A will one "randomly"). The parameter unstableNaming is useful in the cases where: - the module definition changed file. - Each module name is unique.
      Parameters:
      root - the node where the replacement starts
      r - the current registry to use (where the compiled classes are stored)
      xa - the current active transaction.
      unstableNaming - if true the new types only check the module name, not its complete name.