Class ThreadProfilingInformation


  • public final class ThreadProfilingInformation
    extends java.lang.Object
    Holds Thread Information during run-time.
    • Method Detail

      • getInstance

        public static ThreadProfilingInformation getInstance()
        Gets the instance for the current thread.
        Returns:
        The instance.
      • getClassInformation

        public ClassProfilingInformation getClassInformation​(java.lang.Class<?> clazz)
        Gets the class information for a class.
        Parameters:
        clazz - The class.
        Returns:
        The class information, never null.
      • getClassInformation

        public ClassProfilingInformation getClassInformation​(java.lang.String clazz)
        Gets the class information for a class.
        Remind that ClassProfilingInformation.SIMPLE_NAMES is true the class name should be the simple name without package-prefix.
        Parameters:
        clazz - The name of the class.
        Returns:
        The class information, never null.
      • getCurrentMethod

        public MethodProfilingInformation getCurrentMethod()
        Returns the current profiled method on stack.
        Returns:
        The method, possibly null.
      • isOnStack

        public boolean isOnStack​(MethodProfilingInformation mi)
        Checks if a method is on stack.
        Parameters:
        mi - The method.
        Returns:
        True if on stack.
      • popMethod

        public void popMethod​(MethodProfilingInformation mi)
        Pops the method from stack.
        For robustness, all other methods until the specified one are also popped.
        Parameters:
        mi - The method.
      • pushMethod

        public boolean pushMethod​(MethodProfilingInformation mi)
        Push a method on stack if not already in.
        As recursion is not really possible to track with the current profiling concept, recursive calls are ignored.
        Parameters:
        mi - The Method.
        Returns:
        true if method was not on stack.