Top Description Inners Constructors Methods
com.google.auto.value.extension.serializable.serializer.impl

public final Class ImmutableListSerializerExtension

extends Object
implements SerializerExtension
Class Inheritance
All Implemented Interfaces
com.google.auto.value.extension.serializable.serializer.interfaces.SerializerExtension
Annotations
@AutoService:SerializerExtension
Imports
com.google.auto.common.MoreTypes, com.google.auto.service.AutoService, com.google.auto.value.extension.serializable.serializer.interfaces.Serializer, .SerializerExtension, .SerializerFactory, com.google.auto.value.extension.serializable.serializer.runtime.FunctionWithExceptions, com.google.common.collect.ImmutableList, com.squareup.javapoet.CodeBlock, java.util.Optional, javax.annotation.processing.ProcessingEnvironment, javax.lang.model.element.TypeElement, javax.lang.model.type.TypeKind, javax.lang.model.type.TypeMirror

A SerializerExtension that deserializes objects inside an ImmutableList.

Enables unserializable objects inside an ImmutableList to be serializable.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private static javax.lang.model.type.TypeMirror
getContainedType(javax.lang.model.type.TypeMirror type)

public Optional<Serializer>
getSerializer(javax.lang.model.type.TypeMirror
the type being serialized
typeMirror
,
SerializerFactory
a SerializerFactory that can be used to serialize nested types
factory
,
javax.annotation.processing.ProcessingEnvironment
the processing environment provided by the annotation processing framework
processingEnv
)

Implements com.google.auto.value.extension.serializable.serializer.interfaces.SerializerExtension.getSerializer.

Returns a Serializer if this SerializerExtension applies to the given type.

private static boolean
isImmutableList(javax.lang.model.type.TypeMirror type)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

ImmutableListSerializerExtensionback to summary
public ImmutableListSerializerExtension()

Method Detail

getContainedTypeback to summary
private static javax.lang.model.type.TypeMirror getContainedType(javax.lang.model.type.TypeMirror type)
getSerializerback to summary
public Optional<Serializer> getSerializer(javax.lang.model.type.TypeMirror typeMirror, SerializerFactory factory, javax.annotation.processing.ProcessingEnvironment processingEnv)

Implements com.google.auto.value.extension.serializable.serializer.interfaces.SerializerExtension.getSerializer.

Doc from com.google.auto.value.extension.serializable.serializer.interfaces.SerializerExtension.getSerializer.

Returns a Serializer if this SerializerExtension applies to the given type. Otherwise, Optional.empty is returned.

Parameters
typeMirror:javax.lang.model.type.TypeMirror

the type being serialized

factory:SerializerFactory

a SerializerFactory that can be used to serialize nested types

processingEnv:javax.annotation.processing.ProcessingEnvironment

the processing environment provided by the annotation processing framework

Annotations
@Override
isImmutableListback to summary
private static boolean isImmutableList(javax.lang.model.type.TypeMirror type)
com.google.auto.value.extension.serializable.serializer.impl back to summary

private Class ImmutableListSerializerExtension.ImmutableListSerializer

extends Object
implements Serializer
Class Inheritance
  • java.lang.Object
  • com.google.auto.value.extension.serializable.serializer.impl.ImmutableListSerializerExtension.ImmutableListSerializer
All Implemented Interfaces
com.google.auto.value.extension.serializable.serializer.interfaces.Serializer

Field Summary

Modifier and TypeField and Description
private final Serializer
private final SerializerFactory
private final javax.annotation.processing.ProcessingEnvironment

Constructor Summary

AccessConstructor and Description
pack-priv
ImmutableListSerializer(Serializer containedTypeSerializer, SerializerFactory factory, javax.annotation.processing.ProcessingEnvironment processingEnv)

Method Summary

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

Implements com.google.auto.value.extension.serializable.serializer.interfaces.Serializer.fromProxy.

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

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

Implements com.google.auto.value.extension.serializable.serializer.interfaces.Serializer.proxyFieldType.

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

public CodeBlock
toProxy(CodeBlock expression)

Implements com.google.auto.value.extension.serializable.serializer.interfaces.Serializer.toProxy.

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

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

containedTypeSerializerback to summary
private final Serializer containedTypeSerializer
factoryback to summary
private final SerializerFactory factory
processingEnvback to summary
private final javax.annotation.processing.ProcessingEnvironment processingEnv

Constructor Detail

ImmutableListSerializerback to summary
pack-priv ImmutableListSerializer(Serializer containedTypeSerializer, SerializerFactory factory, javax.annotation.processing.ProcessingEnvironment processingEnv)

Method Detail

fromProxyback to summary
public CodeBlock fromProxy(CodeBlock expression)

Implements com.google.auto.value.extension.serializable.serializer.interfaces.Serializer.fromProxy.

Doc from com.google.auto.value.extension.serializable.serializer.interfaces.Serializer.fromProxy.

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

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

Implements com.google.auto.value.extension.serializable.serializer.interfaces.Serializer.proxyFieldType.

Doc from com.google.auto.value.extension.serializable.serializer.interfaces.Serializer.proxyFieldType.

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

Annotations
@Override
toProxyback to summary
public CodeBlock toProxy(CodeBlock expression)

Implements com.google.auto.value.extension.serializable.serializer.interfaces.Serializer.toProxy.

Doc from com.google.auto.value.extension.serializable.serializer.interfaces.Serializer.toProxy.

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

Annotations
@Override