com.google.api.server.spi.config
Interface Transformer<TFrom,TTo>
-
- Type Parameters:
TFrom
- The type being transformedTTo
- The type being transformed to
public interface Transformer<TFrom,TTo>
An interface used to transform between a bean type and another type during JSON serialization.A serializer is constructed using one of the following constructor signatures (sorted by precedence):
- A constructor taking in a single
java.lang.reflect.Type
. This is the type being serialized. - A constructor taking in a single
java.lang.Class
. This is the class being serialized. - A no-arg constructor
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description TFrom
transformFrom(TTo in)
Converts an object from the destination type into the source type.TTo
transformTo(TFrom in)
Converts the source object into the destination type.
-