public class StackTraceElementSwap extends PojoSwap<StackTraceElement,String>
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.
Constructor and Description |
---|
StackTraceElementSwap() |
Modifier and Type | Method and Description |
---|---|
String |
swap(BeanSession session,
StackTraceElement o)
Converts the specified
Enumeration to a List . |
StackTraceElement |
unswap(BeanSession session,
String in,
ClassMeta<?> hint)
If this transform is to be used to reconstitute POJOs that aren't true Java beans, it must implement this method.
|
forMediaTypes, forMediaTypes, getNormalClass, getSwapClass, getSwapClassMeta, isNormalObject, isSwappedObject, match, swap, toString, unswap, withTemplate, withTemplate
public StackTraceElementSwap()
public String swap(BeanSession session, StackTraceElement o)
Enumeration
to a List
.swap
in class PojoSwap<StackTraceElement,String>
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.public StackTraceElement unswap(BeanSession session, String in, ClassMeta<?> hint)
PojoSwap
unswap
in class PojoSwap<StackTraceElement,String>
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 type
GregorianCalendar
.
Copyright © 2016–2020 The Apache Software Foundation. All rights reserved.