pnuts.lang
Class PnutsException.TraceInfo

java.lang.Object
  extended by pnuts.lang.PnutsException.TraceInfo
Enclosing class:
PnutsException

public static class PnutsException.TraceInfo
extends java.lang.Object

A node of a call-chain, which represents a position of a certain function call


Constructor Summary
protected PnutsException.TraceInfo()
           
  PnutsException.TraceInfo(java.lang.Object frame, java.lang.Object[] args, java.lang.Object scriptSource, int line, int column)
          Constructor
  PnutsException.TraceInfo(java.lang.Object target, java.lang.Object methodName, java.lang.Object[] args, java.lang.Object scriptSource, int line, int column)
          Constructor
 
Method Summary
 java.lang.Object[] getArguments()
          The actual arguments of the function call
 int getColumn()
          The column number of the place where the function call was taken place.
 java.lang.Object getFrame()
          Gets the callee that throws an exception.
 int getLine()
          The line number of the place where the function call was taken place.
 java.lang.Object getScriptSource()
          Gets the source of the script where the function call was taken place.
 java.lang.Object getTargetObject()
          Gets the target object of the method call that causes an exception
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PnutsException.TraceInfo

protected PnutsException.TraceInfo()

PnutsException.TraceInfo

public PnutsException.TraceInfo(java.lang.Object frame,
                                java.lang.Object[] args,
                                java.lang.Object scriptSource,
                                int line,
                                int column)
Constructor

Parameters:
frame - the function's name or the class of the constructor
args - the arguments
scriptSource - the object from which the script was read
line - the line
column - the column

PnutsException.TraceInfo

public PnutsException.TraceInfo(java.lang.Object target,
                                java.lang.Object methodName,
                                java.lang.Object[] args,
                                java.lang.Object scriptSource,
                                int line,
                                int column)
Constructor

Parameters:
target - the target object
methodName - the method name
args - the arguments
scriptSource - the object from which the script was read
line - the line
column - the column
Method Detail

getScriptSource

public java.lang.Object getScriptSource()
Gets the source of the script where the function call was taken place. It is usually a URL object, though the script source could be any object.


getArguments

public java.lang.Object[] getArguments()
The actual arguments of the function call


getLine

public int getLine()
The line number of the place where the function call was taken place.


getColumn

public int getColumn()
The column number of the place where the function call was taken place.


getFrame

public java.lang.Object getFrame()
Gets the callee that throws an exception.

Returns:
either of a function name, method name, or Class object.

getTargetObject

public java.lang.Object getTargetObject()
Gets the target object of the method call that causes an exception

Returns:
the target object of the method call that causes an exception

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object