Class GwtSerialization

java.lang.Object
com.google.auto.value.processor.GwtSerialization

class GwtSerialization extends Object
Generates GWT serialization code for @AutoValue classes also marked @GwtCompatible(serializable = true).
  • Field Details

  • Constructor Details

  • Method Details

    • shouldWriteGwtSerializer

      private boolean shouldWriteGwtSerializer()
    • maybeWriteGwtSerializer

      void maybeWriteGwtSerializer(AutoValueTemplateVars autoVars)
      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

      private void writeSourceFile(String className, String text, TypeElement originatingType)
    • computeClassHash

      private String computeClassHash(Iterable<AutoValueOrOneOfProcessor.Property> props, String pkg)