org.oddjob.arooa.convert
Interface ConversionStack


public interface ConversionStack

A ConversionStack contains the diagnostics of applying a ConversionPath to an Object.


Nested Class Summary
static interface ConversionStack.Element
          Holds information about a paticular element in the stack.
 
Method Summary
 ConversionPath<?,?> getConversionPath()
          Get the original ConversionPath that create this ConversionStack.
 ConversionStack.Element getElement(int index)
          Get stack element info.
 int getFailedElementIndex()
          The index of the element at which conversion failed.
 String getStackTrace()
          Get the StackTrace as a Sring.
 void printStack(PrintStream out)
          Print the stack trace to a PrintStream.
 int size()
          The size of the stack.
 

Method Detail

getConversionPath

ConversionPath<?,?> getConversionPath()
Get the original ConversionPath that create this ConversionStack.

Returns:
A ConversionPath.

size

int size()
The size of the stack. Will always equal the length of the conversion patch that created it.

Returns:
The size.

getElement

ConversionStack.Element getElement(int index)
Get stack element info.

Parameters:
index - The 0 based index.
Returns:
the Elemement at that position in the stack.

printStack

void printStack(PrintStream out)
Print the stack trace to a PrintStream.

Parameters:
out -

getStackTrace

String getStackTrace()
Get the StackTrace as a Sring.

Returns:

getFailedElementIndex

int getFailedElementIndex()
The index of the element at which conversion failed.

Returns:
The index, -1 if it didn't fail.