For this extension to work:
Serializable.
com.google.auto.value.extension.serializable.serializer.interfaces.SerializerExtension .
| Modifier and Type | Class and Description |
|---|---|
| private static class | |
| private static class | SerializableAutoValueExtension.
A generator of nested serializable Proxy classes. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | applicable(AutoValueExtension.
The Context of the code generation for this class. contextOverrides com. Determines whether this Extension applies to the given context. |
| public String | generateClass(AutoValueExtension.
The context,Context of the code generation for this class.The simple name of the resulting class. The returned code will be written to a
file named accordingly. className, String The simple name of the direct parent of the generated class. This could be
the AutoValue generated class, or a class generated as the result of another Extension. classToExtend, boolean True if this class is the last class in the chain, meaning it should be marked
as final. Otherwise it should be marked as abstract. isFinal)Implements abstract com. Returns the generated source code of the class named |
| private static boolean | |
| private static boolean | |
| public AutoValueExtension. | incrementalType(javax.
Overrides com. Determines the incremental type of this Extension. |
| SerializableAutoValueExtension | back to summary |
|---|---|
| public SerializableAutoValueExtension() | |
| applicable | back to summary |
|---|---|
| public boolean applicable(AutoValueExtension. Overrides com. Doc from com. Determines whether this Extension applies to the given context. If an Extension returns
| |
| generateClass | back to summary |
|---|---|
| public String generateClass(AutoValueExtension. Implements abstract com. Doc from com. Returns the generated source code of the class named The returned string will typically look like this:
Here,
| |
| hasSerializableAutoValueAnnotation | back to summary |
|---|---|
| private static boolean hasSerializableAutoValueAnnotation(AutoValueExtension. | |
| hasSerializableInterface | back to summary |
|---|---|
| private static boolean hasSerializableInterface(AutoValueExtension. | |
| incrementalType | back to summary |
|---|---|
| public AutoValueExtension. Overrides com. Doc from com. Determines the incremental type of this Extension. The The actual incremental type of the AutoValue processor as a whole will be the loosest
incremental types of the Extensions present in the annotation processor path. The default
returned value is
| |
| Modifier and Type | Field and Description |
|---|---|
| private final String | |
| private final String | |
| private final AutoValueExtension. | |
| private final boolean | |
| private final ImmutableList | |
| private final SerializableAutoValueExtension. | |
| private final ImmutableList |
| Access | Constructor and Description |
|---|---|
| pack-priv | Generator(AutoValueExtension.
|
| Modifier and Type | Method and Description |
|---|---|
| private ImmutableMap | |
| private MethodSpec | |
| private String | |
| private static TypeName | getClassTypeName(ClassName className, List<TypeVariableName> typeVariableNames)
Adds type parameters to the given |
| private MethodSpec | writeReplace()
Creates an implementation of writeReplace that delegates serialization to its inner Proxy class. |
| className | back to summary |
|---|---|
| private final String className | |
| classToExtend | back to summary |
|---|---|
| private final String classToExtend | |
| context | back to summary |
|---|---|
| private final AutoValueExtension. | |
| isFinal | back to summary |
|---|---|
| private final boolean isFinal | |
| propertyMirrors | back to summary |
|---|---|
| private final ImmutableList<PropertyMirror> propertyMirrors | |
| proxyGenerator | back to summary |
|---|---|
| private final SerializableAutoValueExtension. | |
| typeVariableNames | back to summary |
|---|---|
| private final ImmutableList<TypeVariableName> typeVariableNames | |
| Generator | back to summary |
|---|---|
| pack-priv Generator(AutoValueExtension. | |
| buildSerializersMap | back to summary |
|---|---|
| private ImmutableMap | |
| constructor | back to summary |
|---|---|
| private MethodSpec constructor() Creates a constructor that calls super with all the AutoValue fields. | |
| generate | back to summary |
|---|---|
| private String generate() | |
| getClassTypeName | back to summary |
|---|---|
| private static TypeName getClassTypeName(ClassName className, List<TypeVariableName> typeVariableNames) Adds type parameters to the given | |
| writeReplace | back to summary |
|---|---|
| private MethodSpec writeReplace() Creates an implementation of writeReplace that delegates serialization to its inner Proxy class. | |
| Modifier and Type | Field and Description |
|---|---|
| private final TypeName | |
| private final ImmutableList | |
| private static final String | |
| private final ImmutableMap | |
| private final ImmutableList |
| Access | Constructor and Description |
|---|---|
| pack-priv | ProxyGenerator(TypeName outerClassTypeName, ImmutableList<TypeVariableName> typeVariableNames, ImmutableList<PropertyMirror> propertyMirrors, ImmutableMap<Equivalence.
|
| Modifier and Type | Method and Description |
|---|---|
| private MethodSpec | |
| private TypeSpec | |
| private List | |
| private MethodSpec | readResolve()
Creates an implementation of |
| private CodeBlock | resolve(PropertyMirror propertyMirror)
Maps a serializable type back to its original AutoValue property. |
| private static FieldSpec |
| outerClassTypeName | back to summary |
|---|---|
| private final TypeName outerClassTypeName | |
| propertyMirrors | back to summary |
|---|---|
| private final ImmutableList<PropertyMirror> propertyMirrors | |
| PROXY_CLASS_NAME | back to summary |
|---|---|
| private static final String PROXY_CLASS_NAME | |
| serializersMap | back to summary |
|---|---|
| private final ImmutableMap<Equivalence. | |
| typeVariableNames | back to summary |
|---|---|
| private final ImmutableList<TypeVariableName> typeVariableNames | |
| ProxyGenerator | back to summary |
|---|---|
| pack-priv ProxyGenerator(TypeName outerClassTypeName, ImmutableList<TypeVariableName> typeVariableNames, ImmutableList<PropertyMirror> propertyMirrors, ImmutableMap<Equivalence. | |
| constructor | back to summary |
|---|---|
| private MethodSpec constructor() Creates a constructor that converts the AutoValue's properties to serializable values. | |
| generate | back to summary |
|---|---|
| private TypeSpec generate() | |
| properties | back to summary |
|---|---|
| private List Maps each AutoValue property to a serializable type. | |
| readResolve | back to summary |
|---|---|
| private MethodSpec readResolve() Creates an implementation of | |
| resolve | back to summary |
|---|---|
| private CodeBlock resolve(PropertyMirror propertyMirror) Maps a serializable type back to its original AutoValue property. | |
| serialVersionUid | back to summary |
|---|---|
| private static FieldSpec serialVersionUid() | |