public class Property
extends java.lang.Object
ExecutableElement for properties provided by the
AutoValueExtension.Context to make accessing values easier.
It is recommended that you get the humanName directly from the properties returned from
the AutoValueExtension.Context#properties method.
ImmutableList.Buildervalues = ImmutableList.builder(); for (Map.Entry entry : context.properties().entrySet()) { values.add(new Property(entry.getKey(), entry.getValue())); } return values.build();
| Constructor and Description |
|---|
Property(java.lang.String humanName,
javax.lang.model.element.ExecutableElement element) |
| Modifier and Type | Method and Description |
|---|---|
java.util.Set<java.lang.String> |
annotations()
The set of annotations present on the original property.
|
static com.google.common.collect.ImmutableList<Property> |
buildProperties(com.google.auto.value.extension.AutoValueExtension.Context context)
Builds a List of
Property for the given AutoValueExtension.Context. |
javax.lang.model.element.ExecutableElement |
element()
The underlying ExecutableElement representing the get method of the property.
|
java.lang.String |
humanName()
The human readable name of the property.
|
java.lang.String |
methodName()
The method name of the property.
|
java.lang.Boolean |
nullable()
True if the property can be null.
|
com.squareup.javapoet.TypeName |
type()
The return type of the property.
|
public Property(java.lang.String humanName,
javax.lang.model.element.ExecutableElement element)
public static com.google.common.collect.ImmutableList<Property> buildProperties(com.google.auto.value.extension.AutoValueExtension.Context context)
Property for the given AutoValueExtension.Context.public java.lang.String methodName()
public java.lang.String humanName()
get or is
prefixes, this name will be different from methodName().public javax.lang.model.element.ExecutableElement element()
public com.squareup.javapoet.TypeName type()
public java.util.Set<java.lang.String> annotations()
public java.lang.Boolean nullable()