Class SerializerFactoryImpl
- java.lang.Object
-
- com.google.auto.value.extension.serializable.serializer.impl.SerializerFactoryImpl
-
- All Implemented Interfaces:
SerializerFactory
public final class SerializerFactoryImpl extends Object implements SerializerFactory
A concrete implementation ofSerializerFactory.
-
-
Constructor Summary
Constructors Constructor Description SerializerFactoryImpl(com.google.common.collect.ImmutableList<SerializerExtension> extensions, ProcessingEnvironment env)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SerializergetSerializer(TypeMirror typeMirror)Returns aSerializerfor the givenTypeMirror.com.squareup.javapoet.CodeBlocknewIdentifier(String prefix)Returns an identifier beginning with the given prefix and that is distinct from any identifier returned by another call to this method.
-
-
-
Constructor Detail
-
SerializerFactoryImpl
public SerializerFactoryImpl(com.google.common.collect.ImmutableList<SerializerExtension> extensions, ProcessingEnvironment env)
-
-
Method Detail
-
getSerializer
public Serializer getSerializer(TypeMirror typeMirror)
Description copied from interface:SerializerFactoryReturns aSerializerfor the givenTypeMirror.- Specified by:
getSerializerin interfaceSerializerFactory
-
newIdentifier
public com.squareup.javapoet.CodeBlock newIdentifier(String prefix)
Description copied from interface:SerializerFactoryReturns an identifier beginning with the given prefix and that is distinct from any identifier returned by another call to this method. The returned identifier will contain a$, which should also mean it is distinct from identifiers in user code that are in scope.The default implementation of this method throws
UnsupportedOperationExceptionfor compatibility reasons.- Specified by:
newIdentifierin interfaceSerializerFactory
-
-