Package org.oddjob.arooa.convert
Interface ConversionStack
public interface ConversionStack
A ConversionStack contains the diagnostics of applying a ConversionPath to an Object.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceHolds information about a paticular element in the stack. -
Method Summary
Modifier and TypeMethodDescriptionConversionPath<?, ?> Get the original ConversionPath that create this ConversionStack.getElement(int index) Get stack element info.intThe index of the element at which conversion failed.Get the StackTrace as a Sring.voidprintStack(PrintStream out) Print the stack trace to a PrintStream.intsize()The size of the stack.
-
Method Details
-
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
Get stack element info.- Parameters:
index- The 0 based index.- Returns:
- the Elemement at that position in the stack.
-
printStack
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.
-