Class ReflectionSerializer<T>

java.lang.Object
se.l4.commons.serialization.spi.AbstractSerializerResolver<T>
se.l4.commons.serialization.ReflectionSerializer<T>
All Implemented Interfaces:
SerializerOrResolver<T>, SerializerResolver<T>

public class ReflectionSerializer<T>
extends AbstractSerializerResolver<T>
Serializer that will use reflection to access fields and methods in a class. Will export anything annotated with Expose.

  • Named can be used if you want a field to have a specific name in serialized form.
  • If you need to use a custom serializer for a field annotate it with Use.
  • AllowAny will cause dynamic serialization to be used for a field.
Author:
Andreas Holstenson