Package org.apache.juneau.swaps
Class StackTraceElementSwap
java.lang.Object
org.apache.juneau.swap.ObjectSwap<StackTraceElement,String>
org.apache.juneau.swaps.StackTraceElementSwap
Transforms
StackTraceElements
to String
objects.
The swap is identical to just calling StackTraceElement.toString()
, but provides the ability to
parse the resulting string back into a bean.
See Also:
-
Field Summary
Fields inherited from class org.apache.juneau.swap.ObjectSwap
NULL
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionswap
(BeanSession session, StackTraceElement o) Converts the specifiedEnumeration
to aList
.unswap
(BeanSession session, String in, ClassMeta<?> hint) If this transform is to be used to reconstitute objects that aren't true Java beans, it must implement this method.Methods inherited from class org.apache.juneau.swap.ObjectSwap
forMediaTypes, forMediaTypes, getNormalClass, getSwapClass, getSwapClassMeta, isNormalObject, isSwappedObject, match, swap, toString, unswap, withTemplate, withTemplate
-
Constructor Details
-
StackTraceElementSwap
public StackTraceElementSwap()
-
-
Method Details
-
swap
Converts the specifiedEnumeration
to aList
.- Overrides:
swap
in classObjectSwap<StackTraceElement,
String> - Parameters:
session
- The bean session to use to get the class meta. This is always going to be the same bean context that created this swap.o
- The object to be transformed.- Returns:
- The transformed object.
-
unswap
Description copied from class:ObjectSwap
If this transform is to be used to reconstitute objects that aren't true Java beans, it must implement this method.- Overrides:
unswap
in classObjectSwap<StackTraceElement,
String> - Parameters:
session
- The bean session to use to get the class meta. This is always going to be the same bean context that created this swap.in
- The transformed object.hint
- If possible, the parser will try to tell you the object type being created. For example, on a serialized date, this may tell you that the object being created must be of typeGregorianCalendar
.
This may benull if the parser cannot make this determination.- Returns:
- The narrowed object.
-