Libraries.System.StackTraceItem Documentation

The StackTraceItem is a helper class that represents an item on the call stack. It is used by the Error classes to generate stack traces.

Example Code

use Libraries.System.StackTraceItem

class MyCallStack<Type>
    StackTraceItem item
end

Inherits from: Libraries.Language.Object

Summary

Actions Summary Table

ActionsDescription
Compare(Libraries.Language.Object object)This action compares two object hash codes and returns an integer.
Equals(Libraries.Language.Object o)Determines if StackTraceItem's have equivalent values(class, method, file, and line number).
GetClassName()Get the name of the class that the activation record originates from.
GetFileName()Get the name of the file that the activation record originates from.
GetHashCode()This action gets the hash code for an object.
GetLineNumber()Get the line number that the activation record originates from.
GetMethodName()Get the name of the method that the activation record originates from.
Init(text clazz, text method, text file, integer line)Initialize the stack trace items' class, method, file, and line number.

Actions Documentation

Compare(Libraries.Language.Object object)

This action compares two object hash codes and returns an integer. The result is larger if this hash code is larger than the object passed as a parameter, smaller, or equal. In this case, -1 means smaller, 0 means equal, and 1 means larger. This action was changed in Quorum 7 to return an integer, instead of a CompareResult object, because the previous implementation was causing efficiency issues.

Example Code

Object o
        Object t
        integer result = o:Compare(t) //1 (larger), 0 (equal), or -1 (smaller)

Parameters

Return

integer: The Compare result, Smaller, Equal, or Larger.

Equals(Libraries.Language.Object o)

Determines if StackTraceItem's have equivalent values(class, method, file, and line number).

Example Code

use Libraries.System.StackTraceItem
    StackTraceItem item
    StackTraceItem item2
    item:Equals(item2)

Parameters

Return

boolean: True if the StackTraceItem's are equal and false if they are not equal.

GetClassName()

Get the name of the class that the activation record originates from.

Example Code

use Libraries.System.StackTraceItem
    StackTraceItem item
    text clazz = item:GetClassName()

Return

text: The name of the class on the call stack.

GetFileName()

Get the name of the file that the activation record originates from.

Example Code

use Libraries.System.StackTraceItem
    StackTraceItem item
    text file = item:GetFileName()

Return

text: The name of the file on the call stack.

GetHashCode()

This action gets the hash code for an object.

Example Code

Object o
        integer hash = o:GetHashCode()

Return

integer: The integer hash code of the object.

GetLineNumber()

Get the line number that the activation record originates from.

Example Code

use Libraries.System.StackTraceItem
    StackTraceItem item
    integer line = item:GetLineNumber()

Return

integer: The line number of the item on the call stack.

GetMethodName()

Get the name of the method that the activation record originates from.

Example Code

use Libraries.System.StackTraceItem
    StackTraceItem item
    text method = item:GetMethodName()

Return

text: The name of the method on the call stack.

Init(text clazz, text method, text file, integer line)

Initialize the stack trace items' class, method, file, and line number.

Example Code

use Libraries.System.StackTraceItem
    StackTraceItem item
    item:Init("MyCallStack", "Call", "Libraries.System.CallStack", 15)

Parameters