Top Description Methods
com.google.auto.value.extension.serializable.serializer.interfaces

public Interface Serializer

Known Direct Implementers
com.google.auto.value.extension.serializable.serializer.impl.IdentitySerializerFactory.IdentitySerializer, com.google.auto.value.extension.serializable.serializer.impl.ImmutableListSerializerExtension.ImmutableListSerializer, com.google.auto.value.extension.serializable.serializer.impl.ImmutableMapSerializerExtension.ImmutableMapSerializer, com.google.auto.value.extension.serializable.serializer.impl.OptionalSerializerExtension.OptionalSerializer
Imports
com.squareup.javapoet.CodeBlock, javax.lang.model.type.TypeMirror

A Serializer, at compile time, generates code to map an unserializable type to a serializable type. It also generates the reverse code to re-create the original type.

Method Summary

Modifier and TypeMethod and Description
public CodeBlock
fromProxy(CodeBlock expression)

Creates an expression that converts the proxy type back to the original type.

public default boolean
isIdentity()

Returns true if this is an identity Serializer.

public javax.lang.model.type.TypeMirror
proxyFieldType()

The proxy type the original unserializable type will be mapped to.

public CodeBlock
toProxy(CodeBlock expression)

Creates an expression that converts the original type to the proxy type.

Method Detail

fromProxyback to summary
public CodeBlock fromProxy(CodeBlock expression)

Creates an expression that converts the proxy type back to the original type.

isIdentityback to summary
public default boolean isIdentity()

Returns true if this is an identity Serializer.

proxyFieldTypeback to summary
public javax.lang.model.type.TypeMirror proxyFieldType()

The proxy type the original unserializable type will be mapped to.

toProxyback to summary
public CodeBlock toProxy(CodeBlock expression)

Creates an expression that converts the original type to the proxy type.