Class OperationTracer


  • public class OperationTracer
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static boolean enabled  
      private static boolean frozen  
      private static java.lang.ThreadLocal<java.util.List<OperationTracer.Element>> state  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private OperationTracer()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void begin​(java.lang.String label)
      Initialize operation tracing on the caller's thread.
      static void clear()  
      static java.lang.String convertToString​(java.lang.Object arg)  
      static void disable()  
      static void enable()  
      private static void end()  
      static void endReadArray()  
      static void endReadValue()
      Pop the record of the current value that was just read.
      static void enter​(java.lang.String name, java.lang.Object... args)  
      static void exit()  
      static void finish()
      Terminate operation tracing on the caller's thread.
      static void freeze()  
      static java.lang.String getAsString()
      Return the current contents of the OperationTracer state for the current thread.
      static void readingField​(java.lang.String fieldName)
      Update the current Value record to indicate the field currently being read.
      static void readingIndex​(int index)  
      static void startReadArray​(java.lang.String name, int size)  
      static void startReadValue​(java.lang.String name)
      Push a record into the trace of the start of reading a value of the given type name.
      • Methods inherited from class java.lang.Object

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

      • enabled

        private static boolean enabled
      • frozen

        private static boolean frozen
    • Constructor Detail

      • OperationTracer

        private OperationTracer()
    • Method Detail

      • convertToString

        public static java.lang.String convertToString​(java.lang.Object arg)
      • freeze

        public static void freeze()
      • enable

        public static void enable()
      • disable

        public static void disable()
      • getAsString

        public static java.lang.String getAsString()
        Return the current contents of the OperationTracer state for the current thread.
        Returns:
        The string.
      • enter

        public static void enter​(java.lang.String name,
                                 java.lang.Object... args)
      • begin

        public static void begin​(java.lang.String label)
        Initialize operation tracing on the caller's thread. The OperationTracer is initially empty.
      • finish

        public static void finish()
        Terminate operation tracing on the caller's thread. After this call, toString will return the empty string.
      • startReadValue

        public static void startReadValue​(java.lang.String name)
        Push a record into the trace of the start of reading a value of the given type name.
      • readingField

        public static void readingField​(java.lang.String fieldName)
        Update the current Value record to indicate the field currently being read.
      • endReadValue

        public static void endReadValue()
        Pop the record of the current value that was just read.
      • startReadArray

        public static void startReadArray​(java.lang.String name,
                                          int size)
      • readingIndex

        public static void readingIndex​(int index)
      • endReadArray

        public static void endReadArray()
      • end

        private static void end()
      • clear

        public static void clear()
      • exit

        public static void exit()