Class CallTrace
java.lang.Object
com.igormaznitsa.meta.common.utils.CallTrace
- All Implemented Interfaces:
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 -
Constructor Summary
ConstructorsConstructorDescriptionThe Constructor allows to create call trace history point for the called method.The Constructor allows to create call trace history with defined end-of-line symbol and since needed stack item position. -
Method Summary
Modifier and TypeMethodDescriptionGet the descriptor of the thread where the object instance was created.Restore stack trace as a string from inside data representation.toString()
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
UTF8
-
EOL_LINUX
Default end-of-line for linux.- Since:
- 1.0
- See Also:
-
EOL_WINDOWS
Default end-of-line for windows.- Since:
- 1.0
- See Also:
-
packed
private final boolean packed -
stacktrace
private final byte[] stacktrace -
threadDescriptor
-
eol
-
-
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 packedeol
- string shows which end-of-line should be used- Since:
- 1.0.2
- See Also:
-
-
Method Details
-
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
Restore stack trace as a string from inside data representation.- Returns:
- the stack trace as String
-
toString
-