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 a CompareResult.
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 a CompareResult. The compare result is either larger if this hash code is larger than the object passed as a parameter, smaller, or equal.

Example Code

use Libraries.Language.Support.CompareResult
        Object o
        Object t
        CompareResult result = o:Compare(t)

Parameters

Return

Libraries.Language.Support.CompareResult: 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