public final class SingularFieldType extends java.lang.Object implements FieldType
Modifier and Type | Method and Description |
---|---|
com.google.common.collect.ImmutableSet<AccessorTemplate> |
generatedAccessorTemplates()
Obtains the templates of the generated Java accessors for a field of this type.
|
com.squareup.javapoet.TypeName |
getTypeName()
Obtains the
TypeName for the field. |
AccessorTemplate |
primarySetterTemplate()
Returns "set" setter template used to initialize a singular field using a Protobuf message
builder.
|
public com.squareup.javapoet.TypeName getTypeName()
FieldType
TypeName
for the field.getTypeName
in interface FieldType
public com.google.common.collect.ImmutableSet<AccessorTemplate> generatedAccessorTemplates()
FieldType
generatedAccessorTemplates
in interface FieldType
public AccessorTemplate primarySetterTemplate()
The call should have the following structure: builder.setFieldName(FieldType)
.
primarySetterTemplate
in interface FieldType