Class RedefinitionHelper


  • public class RedefinitionHelper
    extends java.lang.Object
    Helper methods for managed types that use method redefinition for field tracking.
    Since:
    1.0.0
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void accessingField​(java.lang.Object o, int absoluteIndex)
      Notify the state manager for o (if any) that a field is about to be accessed.
      static void assignLazyLoadProxies​(StateManagerImpl sm)
      Create a container instance that will delegate back to the state manager to emulate lazy loading.
      static void dirtyCheck​(StateManager sm)
      static void settingField​(java.lang.Object o, int idx, boolean cur, boolean next)
      Setting state callback.
      static void settingField​(java.lang.Object o, int idx, byte cur, byte next)
      Setting state callback.
      static void settingField​(java.lang.Object o, int idx, char cur, char next)
      Setting state callback.
      static void settingField​(java.lang.Object o, int idx, double cur, double next)
      Setting state callback.
      static void settingField​(java.lang.Object o, int idx, float cur, float next)
      Setting state callback.
      static void settingField​(java.lang.Object o, int idx, int cur, int next)
      Setting state callback.
      static void settingField​(java.lang.Object o, int idx, long cur, long next)
      Setting state callback.
      static void settingField​(java.lang.Object o, int idx, short cur, short next)
      Setting state callback.
      static void settingField​(java.lang.Object o, int idx, java.lang.Object cur, java.lang.Object next)
      Setting state callback.
      static void settingField​(java.lang.Object o, int idx, java.lang.String cur, java.lang.String next)
      Setting state callback.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RedefinitionHelper

        public RedefinitionHelper()
    • Method Detail

      • accessingField

        public static void accessingField​(java.lang.Object o,
                                          int absoluteIndex)
        Notify the state manager for o (if any) that a field is about to be accessed.
      • settingField

        public static void settingField​(java.lang.Object o,
                                        int idx,
                                        boolean cur,
                                        boolean next)
        Setting state callback.
      • settingField

        public static void settingField​(java.lang.Object o,
                                        int idx,
                                        char cur,
                                        char next)
        Setting state callback.
      • settingField

        public static void settingField​(java.lang.Object o,
                                        int idx,
                                        byte cur,
                                        byte next)
        Setting state callback.
      • settingField

        public static void settingField​(java.lang.Object o,
                                        int idx,
                                        short cur,
                                        short next)
        Setting state callback.
      • settingField

        public static void settingField​(java.lang.Object o,
                                        int idx,
                                        int cur,
                                        int next)
        Setting state callback.
      • settingField

        public static void settingField​(java.lang.Object o,
                                        int idx,
                                        long cur,
                                        long next)
        Setting state callback.
      • settingField

        public static void settingField​(java.lang.Object o,
                                        int idx,
                                        float cur,
                                        float next)
        Setting state callback.
      • settingField

        public static void settingField​(java.lang.Object o,
                                        int idx,
                                        double cur,
                                        double next)
        Setting state callback.
      • settingField

        public static void settingField​(java.lang.Object o,
                                        int idx,
                                        java.lang.String cur,
                                        java.lang.String next)
        Setting state callback.
      • settingField

        public static void settingField​(java.lang.Object o,
                                        int idx,
                                        java.lang.Object cur,
                                        java.lang.Object next)
        Setting state callback.
      • assignLazyLoadProxies

        public static void assignLazyLoadProxies​(StateManagerImpl sm)
        Create a container instance that will delegate back to the state manager to emulate lazy loading. This is used by PC subclasses for unenhanced types that could not be redefined, and thus do not have field-interception capabilities. Do this for all collection and map field types, even if they are in the dfg, in case the fetch groups are reset at runtime.
        Since:
        1.1.0