Class org.as2lib.env.except.StackTraceElementStringifier

org.as2lib.core.BasicClass
   +--org.as2lib.env.except.StackTraceElementStringifier

Implemented Interfaces

Stringifier

Description

StackTraceElementStringifier stringifies StackTraceElement instances.

Field Index

UNKNOWN

Method Index

new StackTraceElementStringifier()

execute()

Inherited from BasicClass

toString()

Constructor Detail

StackTraceElementStringifier

public function StackTraceElementStringifier(showArgumentsValues:Boolean)

Constructs a new StackTraceElementStringifier instance.

By default the types of the arguments are shown and not their value.

Parameters

showArgumentsValuesdetermines whether to show a string representation of the arguments' values, that is the string that is returned by their toString methods ( true) or only the types of the arguments ( false).

Field Detail

UNKNOWN

static public UNKNOWN:String
Default name if an information is unknown.

Method Detail

execute

public function execute(target):String

Returns the string representation of the passed-in StackTraceElement instance.

The string representation is composed as follows:

   static theFullQualifiedNameOfTheThrower.theMethodName(theFirstArgument, ..)
 

Depending on the settings arguments are either represented by their types of by the result of their toString methods.

A real string representation could look like this:

org.as2lib.data.holder.MyDataHolder.setMaximumLength(Number)

Or this:

org.as2lib.data.holder.MyDataHolder.setMaximumLength(-2)

If an element is null or its string representation could not been obtained the string '[unknown]' is used.

If the method of the stack trace element is the constructor of the thrower the string "new" is used.

Parameters

targetthe StackTraceElement instance to stringify

Return

the string representation of the passed-in target element

Specified By

execute() in org.as2lib.util.Stringifier