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 Serializer
getSerializer(TypeMirror typeMirror)
Returns aSerializer
for the givenTypeMirror
.com.squareup.javapoet.CodeBlock
newIdentifier(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:SerializerFactory
Returns aSerializer
for the givenTypeMirror
.- Specified by:
getSerializer
in interfaceSerializerFactory
-
newIdentifier
public com.squareup.javapoet.CodeBlock newIdentifier(String prefix)
Description copied from interface:SerializerFactory
Returns 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
UnsupportedOperationException
for compatibility reasons.- Specified by:
newIdentifier
in interfaceSerializerFactory
-
-