{updated} @Swap Annotation
{@link oaj.annotation.Swap @Swap} can be used to associate a swap class using an
annotation.
This is often cleaner than using the builder pojoSwaps()
method since you can keep
your swap class near your POJO class.
Multiple swaps can be associated with a POJO by using the {@link oaj.annotation.Swaps @Swaps} annotation:
Readers
get serialized directly to the output of a serializer.
Therefore it's possible to implement a swap that provides fully-customized output.
The
When applied to bean properties, the swap annotation need only be applied to either the getter, setter, or field.
The swap annotation can also be applied to the private field of a bean property, like so: