| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
Datatype.Builder |
addAllGeneratedBuilderAnnotations(java.lang.Iterable<? extends Excerpt> elements)
Adds each element of
elements to the list to be returned from Datatype.getGeneratedBuilderAnnotations(). |
Datatype.Builder |
addAllNestedClasses(java.lang.Iterable<? extends Excerpt> elements)
Adds each element of
elements to the list to be returned from Datatype.getNestedClasses(). |
Datatype.Builder |
addAllValueTypeAnnotations(java.lang.Iterable<? extends Excerpt> elements)
Adds each element of
elements to the list to be returned from Datatype.getValueTypeAnnotations(). |
Datatype.Builder |
addAllVisibleNestedTypes(java.lang.Iterable<? extends QualifiedName> elements)
Adds each element of
elements to the set to be returned from Datatype.getVisibleNestedTypes(), ignoring duplicate elements (only the first duplicate
element is added). |
Datatype.Builder |
addGeneratedBuilderAnnotations(Excerpt... elements)
Adds each element of
elements to the list to be returned from Datatype.getGeneratedBuilderAnnotations(). |
Datatype.Builder |
addGeneratedBuilderAnnotations(Excerpt element)
Adds
element to the list to be returned from Datatype.getGeneratedBuilderAnnotations(). |
Datatype.Builder |
addNestedClasses(Excerpt... elements)
Adds each element of
elements to the list to be returned from Datatype.getNestedClasses(). |
Datatype.Builder |
addNestedClasses(Excerpt element)
Adds
element to the list to be returned from Datatype.getNestedClasses(). |
Datatype.Builder |
addValueTypeAnnotations(Excerpt... elements)
Adds each element of
elements to the list to be returned from Datatype.getValueTypeAnnotations(). |
Datatype.Builder |
addValueTypeAnnotations(Excerpt element)
Adds
element to the list to be returned from Datatype.getValueTypeAnnotations(). |
Datatype.Builder |
addVisibleNestedTypes(QualifiedName... elements)
Adds each element of
elements to the set to be returned from Datatype.getVisibleNestedTypes(), ignoring duplicate elements (only the first duplicate
element is added). |
Datatype.Builder |
addVisibleNestedTypes(QualifiedName element)
Adds
element to the set to be returned from Datatype.getVisibleNestedTypes(). |
Datatype |
build()
Returns a newly-built
Datatype based on the content of the Builder. |
Datatype |
buildPartial()
Returns a newly-created partial
Datatype for use in unit tests. |
Datatype.Builder |
clear()
Resets the state of this builder.
|
Datatype.Builder |
clearBuilderFactory()
Sets the value to be returned by
Datatype.getBuilderFactory() to Optional.absent(). |
Datatype.Builder |
clearGeneratedBuilderAnnotations()
Clears the list to be returned from
Datatype.getGeneratedBuilderAnnotations(). |
Datatype.Builder |
clearNestedClasses()
Clears the list to be returned from
Datatype.getNestedClasses(). |
Datatype.Builder |
clearStandardMethodUnderrides()
Removes all of the mappings from the map to be returned from
Datatype.getStandardMethodUnderrides(). |
Datatype.Builder |
clearValueTypeAnnotations()
Clears the list to be returned from
Datatype.getValueTypeAnnotations(). |
Datatype.Builder |
clearVisibleNestedTypes()
Clears the set to be returned from
Datatype.getVisibleNestedTypes(). |
static Datatype.Builder |
from(Datatype value)
Creates a new builder using
value as a template. |
Type |
getBuilder()
Returns the value that will be returned by
Datatype.getBuilder(). |
com.google.common.base.Optional<BuilderFactory> |
getBuilderFactory()
Returns the value that will be returned by
Datatype.getBuilderFactory(). |
TypeClass |
getGeneratedBuilder()
Returns the value that will be returned by
Datatype.getGeneratedBuilder(). |
java.util.List<Excerpt> |
getGeneratedBuilderAnnotations()
Returns an unmodifiable view of the list that will be returned by
Datatype.getGeneratedBuilderAnnotations(). |
boolean |
getHasToBuilderMethod()
Returns the value that will be returned by
Datatype.getHasToBuilderMethod(). |
java.util.List<Excerpt> |
getNestedClasses()
Returns an unmodifiable view of the list that will be returned by
Datatype.getNestedClasses(). |
TypeClass |
getPartialType()
Returns the value that will be returned by
Datatype.getPartialType(). |
TypeClass |
getPropertyEnum()
Returns the value that will be returned by
Datatype.getPropertyEnum(). |
java.util.Map<Datatype.StandardMethod,Datatype.UnderrideLevel> |
getStandardMethodUnderrides()
Returns an unmodifiable view of the map that will be returned by
Datatype.getStandardMethodUnderrides(). |
TypeClass |
getType()
Returns the value that will be returned by
Datatype.getType(). |
TypeClass |
getValueType()
Returns the value that will be returned by
Datatype.getValueType(). |
java.util.List<Excerpt> |
getValueTypeAnnotations()
Returns an unmodifiable view of the list that will be returned by
Datatype.getValueTypeAnnotations(). |
Datatype.Visibility |
getValueTypeVisibility()
Returns the value that will be returned by
Datatype.getValueTypeVisibility(). |
java.util.Set<QualifiedName> |
getVisibleNestedTypes()
Returns an unmodifiable view of the set that will be returned by
Datatype.getVisibleNestedTypes(). |
boolean |
isBuilderSerializable()
Returns the value that will be returned by
Datatype.isBuilderSerializable(). |
boolean |
isExtensible()
Returns the value that will be returned by
Datatype.isExtensible(). |
boolean |
isInterfaceType()
Returns the value that will be returned by
Datatype.isInterfaceType(). |
Datatype.Builder |
mergeFrom(Datatype.Builder template)
Copies values from the given
Builder. |
Datatype.Builder |
mergeFrom(Datatype value)
Sets all property values using the given
Datatype as a template. |
Datatype.Builder |
putAllStandardMethodUnderrides(java.util.Map<? extends Datatype.StandardMethod,? extends Datatype.UnderrideLevel> map)
Copies all of the mappings from
map to the map to be returned from Datatype.getStandardMethodUnderrides(). |
Datatype.Builder |
putStandardMethodUnderrides(Datatype.StandardMethod key,
Datatype.UnderrideLevel value)
|
Datatype.Builder |
removeStandardMethodUnderrides(Datatype.StandardMethod key)
Removes the mapping for
key from the map to be returned from Datatype.getStandardMethodUnderrides(), if one is present. |
Datatype.Builder |
removeVisibleNestedTypes(QualifiedName element)
Removes
element from the set to be returned from Datatype.getVisibleNestedTypes(). |
Datatype.Builder |
setBuilder(Type builder)
Sets the value to be returned by
Datatype.getBuilder(). |
Datatype.Builder |
setBuilderFactory(BuilderFactory builderFactory)
Sets the value to be returned by
Datatype.getBuilderFactory(). |
Datatype.Builder |
setBuilderFactory(com.google.common.base.Optional<? extends BuilderFactory> builderFactory)
Sets the value to be returned by
Datatype.getBuilderFactory(). |
Datatype.Builder |
setBuilderSerializable(boolean builderSerializable)
Sets the value to be returned by
Datatype.isBuilderSerializable(). |
Datatype.Builder |
setExtensible(boolean extensible)
Sets the value to be returned by
Datatype.isExtensible(). |
Datatype.Builder |
setGeneratedBuilder(TypeClass generatedBuilder)
Sets the value to be returned by
Datatype.getGeneratedBuilder(). |
Datatype.Builder |
setHasToBuilderMethod(boolean hasToBuilderMethod)
Sets the value to be returned by
Datatype.getHasToBuilderMethod(). |
Datatype.Builder |
setInterfaceType(boolean interfaceType)
Sets the value to be returned by
Datatype.isInterfaceType(). |
Datatype.Builder |
setNullableBuilderFactory(BuilderFactory builderFactory)
Sets the value to be returned by
Datatype.getBuilderFactory(). |
Datatype.Builder |
setPartialType(TypeClass partialType)
Sets the value to be returned by
Datatype.getPartialType(). |
Datatype.Builder |
setPropertyEnum(TypeClass propertyEnum)
Sets the value to be returned by
Datatype.getPropertyEnum(). |
Datatype.Builder |
setType(TypeClass type)
Sets the value to be returned by
Datatype.getType(). |
Datatype.Builder |
setValueType(TypeClass valueType)
Sets the value to be returned by
Datatype.getValueType(). |
Datatype.Builder |
setValueTypeVisibility(Datatype.Visibility visibility)
Sets the value to be returned by
Datatype.getValueTypeVisibility() to the most
visible of the current value and visibility. |
public Datatype.Builder setValueTypeVisibility(Datatype.Visibility visibility)
Datatype.getValueTypeVisibility() to the most
visible of the current value and visibility. Will not decrease visibility.Builder objectjava.lang.NullPointerException - if visibility is nullpublic static Datatype.Builder from(Datatype value)
value as a template.public Datatype.Builder setType(TypeClass type)
Datatype.getType().Builder objectjava.lang.NullPointerException - if type is nullpublic TypeClass getType()
Datatype.getType().java.lang.IllegalStateException - if the field has not been setpublic Datatype.Builder setInterfaceType(boolean interfaceType)
Datatype.isInterfaceType().Builder objectpublic boolean isInterfaceType()
Datatype.isInterfaceType().java.lang.IllegalStateException - if the field has not been setpublic Datatype.Builder setBuilder(Type builder)
Datatype.getBuilder().Builder objectjava.lang.NullPointerException - if builder is nullpublic Type getBuilder()
Datatype.getBuilder().java.lang.IllegalStateException - if the field has not been setpublic Datatype.Builder setExtensible(boolean extensible)
Datatype.isExtensible().Builder objectpublic boolean isExtensible()
Datatype.isExtensible().java.lang.IllegalStateException - if the field has not been setpublic Datatype.Builder setBuilderFactory(BuilderFactory builderFactory)
Datatype.getBuilderFactory().Builder objectjava.lang.NullPointerException - if builderFactory is nullpublic Datatype.Builder setBuilderFactory(com.google.common.base.Optional<? extends BuilderFactory> builderFactory)
Datatype.getBuilderFactory().Builder objectpublic Datatype.Builder setNullableBuilderFactory(@Nullable BuilderFactory builderFactory)
Datatype.getBuilderFactory().Builder objectpublic Datatype.Builder clearBuilderFactory()
Datatype.getBuilderFactory() to Optional.absent().Builder objectpublic com.google.common.base.Optional<BuilderFactory> getBuilderFactory()
Datatype.getBuilderFactory().public Datatype.Builder setGeneratedBuilder(TypeClass generatedBuilder)
Datatype.getGeneratedBuilder().Builder objectjava.lang.NullPointerException - if generatedBuilder is nullpublic TypeClass getGeneratedBuilder()
Datatype.getGeneratedBuilder().java.lang.IllegalStateException - if the field has not been setpublic Datatype.Builder setValueType(TypeClass valueType)
Datatype.getValueType().Builder objectjava.lang.NullPointerException - if valueType is nullpublic TypeClass getValueType()
Datatype.getValueType().java.lang.IllegalStateException - if the field has not been setpublic Datatype.Builder setPartialType(TypeClass partialType)
Datatype.getPartialType().Builder objectjava.lang.NullPointerException - if partialType is nullpublic TypeClass getPartialType()
Datatype.getPartialType().java.lang.IllegalStateException - if the field has not been setpublic Datatype.Builder addVisibleNestedTypes(QualifiedName element)
element to the set to be returned from Datatype.getVisibleNestedTypes().
If the set already contains element, then addVisibleNestedTypes has no effect
(only the previously added element is retained).Builder objectjava.lang.NullPointerException - if element is nullpublic Datatype.Builder addVisibleNestedTypes(QualifiedName... elements)
elements to the set to be returned from Datatype.getVisibleNestedTypes(), ignoring duplicate elements (only the first duplicate
element is added).Builder objectjava.lang.NullPointerException - if elements is null or contains a null elementpublic Datatype.Builder addAllVisibleNestedTypes(java.lang.Iterable<? extends QualifiedName> elements)
elements to the set to be returned from Datatype.getVisibleNestedTypes(), ignoring duplicate elements (only the first duplicate
element is added).Builder objectjava.lang.NullPointerException - if elements is null or contains a null elementpublic Datatype.Builder removeVisibleNestedTypes(QualifiedName element)
element from the set to be returned from Datatype.getVisibleNestedTypes(). Does nothing if element is not a member of the set.Builder objectjava.lang.NullPointerException - if element is nullpublic Datatype.Builder clearVisibleNestedTypes()
Datatype.getVisibleNestedTypes().Builder objectpublic java.util.Set<QualifiedName> getVisibleNestedTypes()
Datatype.getVisibleNestedTypes(). Changes to this builder will be reflected in the view.public Datatype.Builder setPropertyEnum(TypeClass propertyEnum)
Datatype.getPropertyEnum().Builder objectjava.lang.NullPointerException - if propertyEnum is nullpublic TypeClass getPropertyEnum()
Datatype.getPropertyEnum().java.lang.IllegalStateException - if the field has not been setpublic Datatype.Builder putStandardMethodUnderrides(Datatype.StandardMethod key, Datatype.UnderrideLevel value)
key with value in the map to be returned from Datatype.getStandardMethodUnderrides(). If the map previously contained a mapping for the key,
the old value is replaced by the specified value.Builder objectjava.lang.NullPointerException - if either key or value are nullpublic Datatype.Builder putAllStandardMethodUnderrides(java.util.Map<? extends Datatype.StandardMethod,? extends Datatype.UnderrideLevel> map)
map to the map to be returned from Datatype.getStandardMethodUnderrides().Builder objectjava.lang.NullPointerException - if map is null or contains a null key or valuepublic Datatype.Builder removeStandardMethodUnderrides(Datatype.StandardMethod key)
key from the map to be returned from Datatype.getStandardMethodUnderrides(), if one is present.Builder objectjava.lang.NullPointerException - if key is nullpublic Datatype.Builder clearStandardMethodUnderrides()
Datatype.getStandardMethodUnderrides().Builder objectpublic java.util.Map<Datatype.StandardMethod,Datatype.UnderrideLevel> getStandardMethodUnderrides()
Datatype.getStandardMethodUnderrides(). Changes to this builder will be reflected in the view.public Datatype.Builder setBuilderSerializable(boolean builderSerializable)
Datatype.isBuilderSerializable().Builder objectpublic boolean isBuilderSerializable()
Datatype.isBuilderSerializable().java.lang.IllegalStateException - if the field has not been setpublic Datatype.Builder setHasToBuilderMethod(boolean hasToBuilderMethod)
Datatype.getHasToBuilderMethod().Builder objectpublic boolean getHasToBuilderMethod()
Datatype.getHasToBuilderMethod().java.lang.IllegalStateException - if the field has not been setpublic Datatype.Builder addGeneratedBuilderAnnotations(Excerpt element)
element to the list to be returned from Datatype.getGeneratedBuilderAnnotations().Builder objectjava.lang.NullPointerException - if element is nullpublic Datatype.Builder addGeneratedBuilderAnnotations(Excerpt... elements)
elements to the list to be returned from Datatype.getGeneratedBuilderAnnotations().Builder objectjava.lang.NullPointerException - if elements is null or contains a null elementpublic Datatype.Builder addAllGeneratedBuilderAnnotations(java.lang.Iterable<? extends Excerpt> elements)
elements to the list to be returned from Datatype.getGeneratedBuilderAnnotations().Builder objectjava.lang.NullPointerException - if elements is null or contains a null elementpublic Datatype.Builder clearGeneratedBuilderAnnotations()
Datatype.getGeneratedBuilderAnnotations().Builder objectpublic java.util.List<Excerpt> getGeneratedBuilderAnnotations()
Datatype.getGeneratedBuilderAnnotations(). Changes to this builder will be reflected in the
view.public Datatype.Builder addValueTypeAnnotations(Excerpt element)
element to the list to be returned from Datatype.getValueTypeAnnotations().Builder objectjava.lang.NullPointerException - if element is nullpublic Datatype.Builder addValueTypeAnnotations(Excerpt... elements)
elements to the list to be returned from Datatype.getValueTypeAnnotations().Builder objectjava.lang.NullPointerException - if elements is null or contains a null elementpublic Datatype.Builder addAllValueTypeAnnotations(java.lang.Iterable<? extends Excerpt> elements)
elements to the list to be returned from Datatype.getValueTypeAnnotations().Builder objectjava.lang.NullPointerException - if elements is null or contains a null elementpublic Datatype.Builder clearValueTypeAnnotations()
Datatype.getValueTypeAnnotations().Builder objectpublic java.util.List<Excerpt> getValueTypeAnnotations()
Datatype.getValueTypeAnnotations(). Changes to this builder will be reflected in the view.public Datatype.Visibility getValueTypeVisibility()
Datatype.getValueTypeVisibility().java.lang.IllegalStateException - if the field has not been setpublic Datatype.Builder addNestedClasses(Excerpt element)
element to the list to be returned from Datatype.getNestedClasses().Builder objectjava.lang.NullPointerException - if element is nullpublic Datatype.Builder addNestedClasses(Excerpt... elements)
elements to the list to be returned from Datatype.getNestedClasses().Builder objectjava.lang.NullPointerException - if elements is null or contains a null elementpublic Datatype.Builder addAllNestedClasses(java.lang.Iterable<? extends Excerpt> elements)
elements to the list to be returned from Datatype.getNestedClasses().Builder objectjava.lang.NullPointerException - if elements is null or contains a null elementpublic Datatype.Builder clearNestedClasses()
Datatype.getNestedClasses().Builder objectpublic java.util.List<Excerpt> getNestedClasses()
Datatype.getNestedClasses(). Changes to this builder will be reflected in the view.public Datatype.Builder mergeFrom(Datatype value)
Datatype as a template.public Datatype.Builder mergeFrom(Datatype.Builder template)
Builder. Does not affect any properties not set on the
input.public Datatype.Builder clear()
public Datatype buildPartial()
Datatype for use in unit tests. 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. They permit writing robust test cases that won't fail if this type gains more application-level constraints (e.g. new required fields) in future. If you require partially complete values in production code, consider using a Builder.