Class CallTrace

java.lang.Object
com.igormaznitsa.meta.common.utils.CallTrace
All Implemented Interfaces:
Serializable

@Weight(VARIABLE) public class CallTrace extends Object implements Serializable
The Class allows to save stack trace history (it is possible to keep it in packed format) and restore it to text representation for request.
Since:
1.0
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Default end-of-line for linux.
    static final String
    Default end-of-line for windows.
  • Constructor Summary

    Constructors
    Constructor
    Description
    The Constructor allows to create call trace history point for the called method.
    CallTrace(boolean skipConstructors, boolean pack, String eol)
    The Constructor allows to create call trace history with defined end-of-line symbol and since needed stack item position.
  • Method Summary

    Modifier and Type
    Method
    Description
    Get the descriptor of the thread where the object instance was created.
    Restore stack trace as a string from inside data representation.
     

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

  • Constructor Details

    • CallTrace

      public CallTrace()
      The Constructor allows to create call trace history point for the called method.
      Since:
      1.0
      See Also:
    • CallTrace

      @Weight(value=VARIABLE, comment="Depends on the call stack depth") public CallTrace(boolean skipConstructors, boolean pack, String eol)
      The Constructor allows to create call trace history with defined end-of-line symbol and since needed stack item position.
      Parameters:
      skipConstructors - flag to skip first calls from constructors in the stack.
      pack - flag shows that string data must be packed, false if should not be packed
      eol - string shows which end-of-line should be used
      Since:
      1.0.2
      See Also:
  • Method Details

    • getThreadDescriptor

      public String getThreadDescriptor()
      Get the descriptor of the thread where the object instance was created.
      Returns:
      the descriptor as String
      Since:
      1.0.2
      See Also:
    • restoreStackTrace

      public String restoreStackTrace()
      Restore stack trace as a string from inside data representation.
      Returns:
      the stack trace as String
    • toString

      public String toString()
      Overrides:
      toString in class Object