public static class Metadata.Property.Builder
extends java.lang.Object
Metadata.Property.| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
Metadata.Property.Builder |
addAccessorAnnotations(Excerpt... elements)
Adds each element of
elements to the list to be returned from
Metadata.Property.getAccessorAnnotations(). |
Metadata.Property.Builder |
addAccessorAnnotations(Excerpt element)
Adds
element to the list to be returned from Metadata.Property.getAccessorAnnotations(). |
Metadata.Property.Builder |
addAllAccessorAnnotations(java.lang.Iterable<? extends Excerpt> elements)
Adds each element of
elements to the list to be returned from
Metadata.Property.getAccessorAnnotations(). |
Metadata.Property |
build()
Returns a newly-created
Metadata.Property based on the contents of the Builder. |
Metadata.Property |
buildPartial()
Returns a newly-created partial
Metadata.Property
based on the contents of the Builder. |
Metadata.Property.Builder |
clear()
Resets the state of this builder.
|
Metadata.Property.Builder |
clearAccessorAnnotations()
Clears the list to be returned from
Metadata.Property.getAccessorAnnotations(). |
static Metadata.Property.Builder |
from(Metadata.Property value)
Creates a new builder using
value as a template. |
java.util.List<Excerpt> |
getAccessorAnnotations()
Returns an unmodifiable view of the list that will be returned by
Metadata.Property.getAccessorAnnotations(). |
java.lang.String |
getAllCapsName()
Returns the value that will be returned by
Metadata.Property.getAllCapsName(). |
javax.lang.model.type.TypeMirror |
getBoxedType()
Returns the value that will be returned by
Metadata.Property.getBoxedType(). |
java.lang.String |
getCapitalizedName()
Returns the value that will be returned by
Metadata.Property.getCapitalizedName(). |
PropertyCodeGenerator |
getCodeGenerator()
Returns the value that will be returned by
Metadata.Property.getCodeGenerator(). |
java.lang.String |
getGetterName()
Returns the value that will be returned by
Metadata.Property.getGetterName(). |
java.lang.String |
getName()
Returns the value that will be returned by
Metadata.Property.getName(). |
javax.lang.model.type.TypeMirror |
getType()
Returns the value that will be returned by
Metadata.Property.getType(). |
boolean |
isFullyCheckedCast()
Returns the value that will be returned by
Metadata.Property.isFullyCheckedCast(). |
boolean |
isUsingBeanConvention()
Returns the value that will be returned by
Metadata.Property.isUsingBeanConvention(). |
Metadata.Property.Builder |
mergeFrom(Metadata.Property.Builder template)
Copies values from the given
Builder. |
Metadata.Property.Builder |
mergeFrom(Metadata.Property value)
Sets all property values using the given
Metadata.Property as a template. |
Metadata.Property.Builder |
setAllCapsName(java.lang.String allCapsName)
Sets the value to be returned by
Metadata.Property.getAllCapsName(). |
Metadata.Property.Builder |
setBoxedType(javax.lang.model.type.TypeMirror boxedType)
Sets the value to be returned by
Metadata.Property.getBoxedType(). |
Metadata.Property.Builder |
setCapitalizedName(java.lang.String capitalizedName)
Sets the value to be returned by
Metadata.Property.getCapitalizedName(). |
Metadata.Property.Builder |
setCodeGenerator(PropertyCodeGenerator codeGenerator)
Sets the value to be returned by
Metadata.Property.getCodeGenerator(). |
Metadata.Property.Builder |
setFullyCheckedCast(boolean fullyCheckedCast)
Sets the value to be returned by
Metadata.Property.isFullyCheckedCast(). |
Metadata.Property.Builder |
setGetterName(java.lang.String getterName)
Sets the value to be returned by
Metadata.Property.getGetterName(). |
Metadata.Property.Builder |
setName(java.lang.String name)
Sets the value to be returned by
Metadata.Property.getName(). |
Metadata.Property.Builder |
setType(javax.lang.model.type.TypeMirror type)
Sets the value to be returned by
Metadata.Property.getType(). |
Metadata.Property.Builder |
setUsingBeanConvention(boolean usingBeanConvention)
Sets the value to be returned by
Metadata.Property.isUsingBeanConvention(). |
public static Metadata.Property.Builder from(Metadata.Property value)
value as a template.public Metadata.Property.Builder setType(javax.lang.model.type.TypeMirror type)
Metadata.Property.getType().Builder objectjava.lang.NullPointerException - if type is nullpublic javax.lang.model.type.TypeMirror getType()
Metadata.Property.getType().java.lang.IllegalStateException - if the field has not been setpublic Metadata.Property.Builder setBoxedType(@Nullable javax.lang.model.type.TypeMirror boxedType)
Metadata.Property.getBoxedType().Builder object@Nullable public javax.lang.model.type.TypeMirror getBoxedType()
Metadata.Property.getBoxedType().public Metadata.Property.Builder setName(java.lang.String name)
Metadata.Property.getName().Builder objectjava.lang.NullPointerException - if name is nullpublic java.lang.String getName()
Metadata.Property.getName().java.lang.IllegalStateException - if the field has not been setpublic Metadata.Property.Builder setCapitalizedName(java.lang.String capitalizedName)
Metadata.Property.getCapitalizedName().Builder objectjava.lang.NullPointerException - if capitalizedName is nullpublic java.lang.String getCapitalizedName()
Metadata.Property.getCapitalizedName().java.lang.IllegalStateException - if the field has not been setpublic Metadata.Property.Builder setAllCapsName(java.lang.String allCapsName)
Metadata.Property.getAllCapsName().Builder objectjava.lang.NullPointerException - if allCapsName is nullpublic java.lang.String getAllCapsName()
Metadata.Property.getAllCapsName().java.lang.IllegalStateException - if the field has not been setpublic Metadata.Property.Builder setUsingBeanConvention(boolean usingBeanConvention)
Metadata.Property.isUsingBeanConvention().Builder objectpublic boolean isUsingBeanConvention()
Metadata.Property.isUsingBeanConvention().java.lang.IllegalStateException - if the field has not been setpublic Metadata.Property.Builder setGetterName(java.lang.String getterName)
Metadata.Property.getGetterName().Builder objectjava.lang.NullPointerException - if getterName is nullpublic java.lang.String getGetterName()
Metadata.Property.getGetterName().java.lang.IllegalStateException - if the field has not been setpublic Metadata.Property.Builder setCodeGenerator(@Nullable PropertyCodeGenerator codeGenerator)
Metadata.Property.getCodeGenerator().Builder object@Nullable public PropertyCodeGenerator getCodeGenerator()
Metadata.Property.getCodeGenerator().public Metadata.Property.Builder setFullyCheckedCast(boolean fullyCheckedCast)
Metadata.Property.isFullyCheckedCast().Builder objectpublic boolean isFullyCheckedCast()
Metadata.Property.isFullyCheckedCast().java.lang.IllegalStateException - if the field has not been setpublic Metadata.Property.Builder addAccessorAnnotations(Excerpt element)
element to the list to be returned from Metadata.Property.getAccessorAnnotations().Builder objectjava.lang.NullPointerException - if element is nullpublic Metadata.Property.Builder addAccessorAnnotations(Excerpt... elements)
elements to the list to be returned from
Metadata.Property.getAccessorAnnotations().Builder objectjava.lang.NullPointerException - if elements is null or contains a
null elementpublic Metadata.Property.Builder addAllAccessorAnnotations(java.lang.Iterable<? extends Excerpt> elements)
elements to the list to be returned from
Metadata.Property.getAccessorAnnotations().Builder objectjava.lang.NullPointerException - if elements is null or contains a
null elementpublic Metadata.Property.Builder clearAccessorAnnotations()
Metadata.Property.getAccessorAnnotations().Builder objectpublic java.util.List<Excerpt> getAccessorAnnotations()
Metadata.Property.getAccessorAnnotations().
Changes to this builder will be reflected in the view.public Metadata.Property.Builder mergeFrom(Metadata.Property value)
Metadata.Property as a template.public Metadata.Property.Builder mergeFrom(Metadata.Property.Builder template)
Builder.
Does not affect any properties not set on the input.public Metadata.Property.Builder clear()
public Metadata.Property build()
Metadata.Property based on the contents of the Builder.java.lang.IllegalStateException - if any field has not been setpublic Metadata.Property buildPartial()
Metadata.Property
based on the contents of the Builder.
State checking will not be performed.
Unset properties will throw an UnsupportedOperationException
when accessed via the partial object.
Partials should only ever be used in tests.