Class TemplateVars

java.lang.Object
com.google.auto.value.processor.TemplateVars
Direct Known Subclasses:
AutoAnnotationTemplateVars, AutoValueOrOneOfTemplateVars, GwtSerialization.GwtTemplateVars

abstract class TemplateVars extends Object
A template and a set of variables to be substituted into that template. A concrete subclass of this class defines a set of fields that are template variables, and an implementation of the parsedTemplate() method which is the template to substitute them into. Once the values of the fields have been assigned, the toText() method returns the result of substituting them into the template.

The subclass may be a direct subclass of this class or a more distant descendant. Every field in the starting class and its ancestors up to this class will be included. Fields cannot be static unless they are also final. They cannot be private, though they can be package-private if the class is in the same package as this class. They cannot be primitive or null, so that there is a clear indication when a field has not been set.