class GwtSerialization
extends java.lang.Object
@AutoValue
classes also marked
@GwtCompatible(serializable = true)
.Modifier and Type | Class and Description |
---|---|
(package private) static class |
GwtSerialization.GwtTemplateVars |
static class |
GwtSerialization.Property |
Modifier and Type | Field and Description |
---|---|
private GwtCompatibility |
gwtCompatibility |
private javax.annotation.processing.ProcessingEnvironment |
processingEnv |
private javax.lang.model.element.TypeElement |
type |
private static java.nio.charset.Charset |
UTF8 |
Constructor and Description |
---|
GwtSerialization(GwtCompatibility gwtCompatibility,
javax.annotation.processing.ProcessingEnvironment processingEnv,
javax.lang.model.element.TypeElement type) |
Modifier and Type | Method and Description |
---|---|
private java.lang.String |
computeClassHash(java.lang.Iterable<AutoValueProcessor.Property> props) |
(package private) void |
maybeWriteGwtSerializer(AutoValueTemplateVars autoVars)
Writes the GWT serializer for the given type, if appropriate.
|
private boolean |
shouldWriteGwtSerializer() |
private static void |
update(java.util.zip.CRC32 crc,
java.lang.String s) |
private void |
writeSourceFile(java.lang.String className,
java.lang.String text,
javax.lang.model.element.TypeElement originatingType) |
private final GwtCompatibility gwtCompatibility
private final javax.annotation.processing.ProcessingEnvironment processingEnv
private final javax.lang.model.element.TypeElement type
private static final java.nio.charset.Charset UTF8
GwtSerialization(GwtCompatibility gwtCompatibility, javax.annotation.processing.ProcessingEnvironment processingEnv, javax.lang.model.element.TypeElement type)
private boolean shouldWriteGwtSerializer()
void maybeWriteGwtSerializer(AutoValueTemplateVars autoVars)
@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.
autoVars
- the template variables defined for this type.private void writeSourceFile(java.lang.String className, java.lang.String text, javax.lang.model.element.TypeElement originatingType)
private java.lang.String computeClassHash(java.lang.Iterable<AutoValueProcessor.Property> props)
private static void update(java.util.zip.CRC32 crc, java.lang.String s)