public interface SerializerFactory
Serializer for any given TypeMirror.
Defaults to an identity serializer if no SerializerExtensions are suitable.
| Modifier and Type | Method and Description |
|---|---|
Serializer |
getSerializer(TypeMirror type)
Returns a
Serializer for the given TypeMirror. |
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.
|
Serializer getSerializer(TypeMirror type)
Serializer for the given TypeMirror.default com.squareup.javapoet.CodeBlock newIdentifier(String prefix)
$,
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.
Copyright © 2022 Google LLC. All rights reserved.