Interface SerializerFactory
-
- All Known Implementing Classes:
SerializerFactoryImpl
public interface SerializerFactoryA factory that returns aSerializerfor any givenTypeMirror.Defaults to an identity serializer if no SerializerExtensions are suitable.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description SerializergetSerializer(TypeMirror type)Returns aSerializerfor the givenTypeMirror.default 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.
-
-
-
Method Detail
-
getSerializer
Serializer getSerializer(TypeMirror type)
Returns aSerializerfor the givenTypeMirror.
-
newIdentifier
default 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. 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.
-
-