Package com.google.auto.value.processor
Class GwtSerialization
java.lang.Object
com.google.auto.value.processor.GwtSerialization
Generates GWT serialization code for
@AutoValue
classes also marked
@GwtCompatible(serializable = true)
.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static class
static class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final GwtCompatibility
private final ProcessingEnvironment
private final TypeElement
-
Constructor Summary
ConstructorsConstructorDescriptionGwtSerialization
(GwtCompatibility gwtCompatibility, ProcessingEnvironment processingEnv, TypeElement type) -
Method Summary
Modifier and TypeMethodDescriptionprivate String
computeClassHash
(Iterable<AutoValueOrOneOfProcessor.Property> props, String pkg) (package private) void
maybeWriteGwtSerializer
(AutoValueTemplateVars autoVars) Writes the GWT serializer for the given type, if appropriate.private boolean
private void
writeSourceFile
(String className, String text, TypeElement originatingType)
-
Field Details
-
gwtCompatibility
-
processingEnv
-
type
-
-
Constructor Details
-
GwtSerialization
GwtSerialization(GwtCompatibility gwtCompatibility, ProcessingEnvironment processingEnv, TypeElement type)
-
-
Method Details
-
shouldWriteGwtSerializer
private boolean shouldWriteGwtSerializer() -
maybeWriteGwtSerializer
Writes the GWT serializer for the given type, if appropriate. An@AutoValue
class gets a GWT serializer if it is annotated with@GwtCompatible(serializable = true)
, where the@GwtCompatible
annotation can come from any package.If the type is com.example.Foo then the generated AutoValue subclass is com.example.AutoValue_Foo and the GWT serializer is com.example.AutoValue_Foo_CustomFieldSerializer.
- Parameters:
autoVars
- the template variables defined for this type.
-
writeSourceFile
-
computeClassHash
-