Class Datatype_Builder
- Direct Known Subclasses:
Datatype.Builder
Datatype.Builder, derived from the API of Datatype.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final classprivate static enumprivate static classprivate static final class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final EnumSet<Datatype_Builder.Property> private Typeprivate BuilderFactoryprivate booleanprivate NameAndVisibilityprivate NameAndVisibilityprivate NameAndVisibilityprivate booleanprivate TypeClassprivate booleanprivate booleanprivate NameAndVisibilityprivate NameAndVisibilityprivate TypeClassprivate TypeClassprivate TypeClassprivate final LinkedHashMap<Datatype.StandardMethod, Datatype.UnderrideLevel> private TypeClassprivate TypeClassprivate Datatype.Visibility -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddAllGeneratedBuilderAnnotations(Iterable<? extends Excerpt> elements) Adds each element ofelementsto the list to be returned fromDatatype.getGeneratedBuilderAnnotations().addAllGeneratedBuilderAnnotations(Spliterator<? extends Excerpt> elements) Adds each element ofelementsto the list to be returned fromDatatype.getGeneratedBuilderAnnotations().addAllGeneratedBuilderAnnotations(BaseStream<? extends Excerpt, ?> elements) Adds each element ofelementsto the list to be returned fromDatatype.getGeneratedBuilderAnnotations().addAllNestedClasses(Iterable<? extends Excerpt> elements) Adds each element ofelementsto the list to be returned fromDatatype.getNestedClasses().addAllNestedClasses(Spliterator<? extends Excerpt> elements) Adds each element ofelementsto the list to be returned fromDatatype.getNestedClasses().addAllNestedClasses(BaseStream<? extends Excerpt, ?> elements) Adds each element ofelementsto the list to be returned fromDatatype.getNestedClasses().addAllValueTypeAnnotations(Iterable<? extends Excerpt> elements) Adds each element ofelementsto the list to be returned fromDatatype.getValueTypeAnnotations().addAllValueTypeAnnotations(Spliterator<? extends Excerpt> elements) Adds each element ofelementsto the list to be returned fromDatatype.getValueTypeAnnotations().addAllValueTypeAnnotations(BaseStream<? extends Excerpt, ?> elements) Adds each element ofelementsto the list to be returned fromDatatype.getValueTypeAnnotations().addGeneratedBuilderAnnotations(Excerpt element) Addselementto the list to be returned fromDatatype.getGeneratedBuilderAnnotations().addGeneratedBuilderAnnotations(Excerpt... elements) Adds each element ofelementsto the list to be returned fromDatatype.getGeneratedBuilderAnnotations().addNestedClasses(Excerpt element) Addselementto the list to be returned fromDatatype.getNestedClasses().addNestedClasses(Excerpt... elements) Adds each element ofelementsto the list to be returned fromDatatype.getNestedClasses().addValueTypeAnnotations(Excerpt element) Addselementto the list to be returned fromDatatype.getValueTypeAnnotations().addValueTypeAnnotations(Excerpt... elements) Adds each element ofelementsto the list to be returned fromDatatype.getValueTypeAnnotations().build()Returns a newly-createdDatatypebased on the contents of thisBuilder.Returns a newly-created partialDatatypefor use in unit tests.clear()Resets the state of this builder.Sets the value to be returned byDatatype.getBuilderFactory()toOptional.empty().Clears the list to be returned fromDatatype.getGeneratedBuilderAnnotations().Clears the list to be returned fromDatatype.getNestedClasses().Sets the value to be returned byDatatype.getRebuildableType()toOptional.empty().Removes all of the mappings from the map to be returned fromDatatype.getStandardMethodUnderrides().Clears the list to be returned fromDatatype.getValueTypeAnnotations().static Datatype.BuilderCreates a new builder usingvalueas a template.Returns the value that will be returned byDatatype.getBuilder().Returns the value that will be returned byDatatype.getBuilderFactory().Returns the value that will be returned byDatatype.getBuildMethod().Returns the value that will be returned byDatatype.getBuildPartialMethod().Returns the value that will be returned byDatatype.getClearMethod().Returns the value that will be returned byDatatype.getGeneratedBuilder().Returns an unmodifiable view of the list that will be returned byDatatype.getGeneratedBuilderAnnotations().booleanReturns the value that will be returned byDatatype.getHasToBuilderMethod().Returns the value that will be returned byDatatype.getMergeFromBuilderMethod().Returns the value that will be returned byDatatype.getMergeFromValueMethod().Returns an unmodifiable view of the list that will be returned byDatatype.getNestedClasses().Returns the value that will be returned byDatatype.getPartialType().Returns the value that will be returned byDatatype.getPropertyEnum().Returns the value that will be returned byDatatype.getRebuildableType().Returns an unmodifiable view of the map that will be returned byDatatype.getStandardMethodUnderrides().getType()Returns the value that will be returned byDatatype.getType().Returns the value that will be returned byDatatype.getValueType().Returns an unmodifiable view of the list that will be returned byDatatype.getValueTypeAnnotations().Returns the value that will be returned byDatatype.getValueTypeVisibility().booleanReturns the value that will be returned byDatatype.isBuilderSerializable().booleanReturns the value that will be returned byDatatype.isExtensible().booleanReturns the value that will be returned byDatatype.isInterfaceType().mapBuilder(UnaryOperator<Type> mapper) Replaces the value to be returned byDatatype.getBuilder()by applyingmapperto it and using the result.mapBuilderFactory(UnaryOperator<BuilderFactory> mapper) If the value to be returned byDatatype.getBuilderFactory()is present, replaces it by applyingmapperto it and using the result.mapBuilderSerializable(UnaryOperator<Boolean> mapper) Replaces the value to be returned byDatatype.isBuilderSerializable()by applyingmapperto it and using the result.mapBuildMethod(UnaryOperator<NameAndVisibility> mapper) Replaces the value to be returned byDatatype.getBuildMethod()by applyingmapperto it and using the result.Replaces the value to be returned byDatatype.getBuildPartialMethod()by applyingmapperto it and using the result.mapClearMethod(UnaryOperator<NameAndVisibility> mapper) Replaces the value to be returned byDatatype.getClearMethod()by applyingmapperto it and using the result.mapExtensible(UnaryOperator<Boolean> mapper) Replaces the value to be returned byDatatype.isExtensible()by applyingmapperto it and using the result.mapGeneratedBuilder(UnaryOperator<TypeClass> mapper) Replaces the value to be returned byDatatype.getGeneratedBuilder()by applyingmapperto it and using the result.mapHasToBuilderMethod(UnaryOperator<Boolean> mapper) Replaces the value to be returned byDatatype.getHasToBuilderMethod()by applyingmapperto it and using the result.mapInterfaceType(UnaryOperator<Boolean> mapper) Replaces the value to be returned byDatatype.isInterfaceType()by applyingmapperto it and using the result.Replaces the value to be returned byDatatype.getMergeFromBuilderMethod()by applyingmapperto it and using the result.Replaces the value to be returned byDatatype.getMergeFromValueMethod()by applyingmapperto it and using the result.mapPartialType(UnaryOperator<TypeClass> mapper) Replaces the value to be returned byDatatype.getPartialType()by applyingmapperto it and using the result.mapPropertyEnum(UnaryOperator<TypeClass> mapper) Replaces the value to be returned byDatatype.getPropertyEnum()by applyingmapperto it and using the result.mapRebuildableType(UnaryOperator<TypeClass> mapper) If the value to be returned byDatatype.getRebuildableType()is present, replaces it by applyingmapperto it and using the result.mapType(UnaryOperator<TypeClass> mapper) Replaces the value to be returned byDatatype.getType()by applyingmapperto it and using the result.mapValueType(UnaryOperator<TypeClass> mapper) Replaces the value to be returned byDatatype.getValueType()by applyingmapperto it and using the result.Replaces the value to be returned byDatatype.getValueTypeVisibility()by applyingmapperto it and using the result.Copies values fromvalue, appending to collections, and skipping empty optionals.mergeFrom(Datatype.Builder template) Copies values fromtemplate, appending to collections, and skipping empty optionals and unset properties.mutateGeneratedBuilderAnnotations(Consumer<? super List<Excerpt>> mutator) Appliesmutatorto the list to be returned fromDatatype.getGeneratedBuilderAnnotations().mutateNestedClasses(Consumer<? super List<Excerpt>> mutator) Appliesmutatorto the list to be returned fromDatatype.getNestedClasses().mutateStandardMethodUnderrides(Consumer<? super Map<Datatype.StandardMethod, Datatype.UnderrideLevel>> mutator) Invokesmutatorwith the map to be returned fromDatatype.getStandardMethodUnderrides().mutateValueTypeAnnotations(Consumer<? super List<Excerpt>> mutator) Appliesmutatorto the list to be returned fromDatatype.getValueTypeAnnotations().putAllStandardMethodUnderrides(Map<? extends Datatype.StandardMethod, ? extends Datatype.UnderrideLevel> map) Copies all of the mappings frommapto the map to be returned fromDatatype.getStandardMethodUnderrides().Removes the mapping forkeyfrom the map to be returned fromDatatype.getStandardMethodUnderrides(), if one is present.setBuilder(Type builder) Sets the value to be returned byDatatype.getBuilder().setBuilderFactory(Optional<? extends BuilderFactory> builderFactory) Sets the value to be returned byDatatype.getBuilderFactory().setBuilderFactory(BuilderFactory builderFactory) Sets the value to be returned byDatatype.getBuilderFactory().setBuilderSerializable(boolean builderSerializable) Sets the value to be returned byDatatype.isBuilderSerializable().setBuildMethod(NameAndVisibility buildMethod) Sets the value to be returned byDatatype.getBuildMethod().setBuildPartialMethod(NameAndVisibility buildPartialMethod) Sets the value to be returned byDatatype.getBuildPartialMethod().setClearMethod(NameAndVisibility clearMethod) Sets the value to be returned byDatatype.getClearMethod().setExtensible(boolean extensible) Sets the value to be returned byDatatype.isExtensible().setGeneratedBuilder(TypeClass generatedBuilder) Sets the value to be returned byDatatype.getGeneratedBuilder().setHasToBuilderMethod(boolean hasToBuilderMethod) Sets the value to be returned byDatatype.getHasToBuilderMethod().setInterfaceType(boolean interfaceType) Sets the value to be returned byDatatype.isInterfaceType().setMergeFromBuilderMethod(NameAndVisibility mergeFromBuilderMethod) Sets the value to be returned byDatatype.getMergeFromBuilderMethod().setMergeFromValueMethod(NameAndVisibility mergeFromValueMethod) Sets the value to be returned byDatatype.getMergeFromValueMethod().setNullableBuilderFactory(BuilderFactory builderFactory) Sets the value to be returned byDatatype.getBuilderFactory().setNullableRebuildableType(TypeClass rebuildableType) Sets the value to be returned byDatatype.getRebuildableType().setPartialType(TypeClass partialType) Sets the value to be returned byDatatype.getPartialType().setPropertyEnum(TypeClass propertyEnum) Sets the value to be returned byDatatype.getPropertyEnum().setRebuildableType(Optional<? extends TypeClass> rebuildableType) Sets the value to be returned byDatatype.getRebuildableType().setRebuildableType(TypeClass rebuildableType) Sets the value to be returned byDatatype.getRebuildableType().Sets the value to be returned byDatatype.getType().setValueType(TypeClass valueType) Sets the value to be returned byDatatype.getValueType().setValueTypeVisibility(Datatype.Visibility valueTypeVisibility) Sets the value to be returned byDatatype.getValueTypeVisibility().
-
Field Details
-
type
-
interfaceType
private boolean interfaceType -
builder
-
extensible
private boolean extensible -
builderFactory
-
generatedBuilder
-
valueType
-
partialType
-
rebuildableType
-
propertyEnum
-
standardMethodUnderrides
private final LinkedHashMap<Datatype.StandardMethod, Datatype.UnderrideLevel> standardMethodUnderrides -
builderSerializable
private boolean builderSerializable -
hasToBuilderMethod
private boolean hasToBuilderMethod -
buildMethod
-
buildPartialMethod
-
clearMethod
-
mergeFromBuilderMethod
-
mergeFromValueMethod
-
generatedBuilderAnnotations
-
valueTypeAnnotations
-
valueTypeVisibility
-
nestedClasses
-
_unsetProperties
-
-
Constructor Details
-
Datatype_Builder
Datatype_Builder()
-
-
Method Details
-
from
Creates a new builder usingvalueas a template.If
valueis a partial, the builder will return more partials. -
setType
Sets the value to be returned byDatatype.getType().- Returns:
- this
Builderobject - Throws:
NullPointerException- iftypeis null
-
mapType
Replaces the value to be returned byDatatype.getType()by applyingmapperto it and using the result.- Returns:
- this
Builderobject - Throws:
NullPointerException- ifmapperis null or returns nullIllegalStateException- if the field has not been set
-
getType
Returns the value that will be returned byDatatype.getType().- Throws:
IllegalStateException- if the field has not been set
-
setInterfaceType
Sets the value to be returned byDatatype.isInterfaceType().- Returns:
- this
Builderobject
-
mapInterfaceType
Replaces the value to be returned byDatatype.isInterfaceType()by applyingmapperto it and using the result.- Returns:
- this
Builderobject - Throws:
NullPointerException- ifmapperis null or returns nullIllegalStateException- if the field has not been set
-
isInterfaceType
public boolean isInterfaceType()Returns the value that will be returned byDatatype.isInterfaceType().- Throws:
IllegalStateException- if the field has not been set
-
setBuilder
Sets the value to be returned byDatatype.getBuilder().- Returns:
- this
Builderobject - Throws:
NullPointerException- ifbuilderis null
-
mapBuilder
Replaces the value to be returned byDatatype.getBuilder()by applyingmapperto it and using the result.- Returns:
- this
Builderobject - Throws:
NullPointerException- ifmapperis null or returns nullIllegalStateException- if the field has not been set
-
getBuilder
Returns the value that will be returned byDatatype.getBuilder().- Throws:
IllegalStateException- if the field has not been set
-
setExtensible
Sets the value to be returned byDatatype.isExtensible().- Returns:
- this
Builderobject
-
mapExtensible
Replaces the value to be returned byDatatype.isExtensible()by applyingmapperto it and using the result.- Returns:
- this
Builderobject - Throws:
NullPointerException- ifmapperis null or returns nullIllegalStateException- if the field has not been set
-
isExtensible
public boolean isExtensible()Returns the value that will be returned byDatatype.isExtensible().- Throws:
IllegalStateException- if the field has not been set
-
setBuilderFactory
Sets the value to be returned byDatatype.getBuilderFactory().- Returns:
- this
Builderobject - Throws:
NullPointerException- ifbuilderFactoryis null
-
setBuilderFactory
Sets the value to be returned byDatatype.getBuilderFactory().- Returns:
- this
Builderobject
-
setNullableBuilderFactory
Sets the value to be returned byDatatype.getBuilderFactory().- Returns:
- this
Builderobject
-
mapBuilderFactory
If the value to be returned byDatatype.getBuilderFactory()is present, replaces it by applyingmapperto it and using the result.If the result is null, clears the value.
- Returns:
- this
Builderobject - Throws:
NullPointerException- ifmapperis null
-
clearBuilderFactory
Sets the value to be returned byDatatype.getBuilderFactory()toOptional.empty().- Returns:
- this
Builderobject
-
getBuilderFactory
Returns the value that will be returned byDatatype.getBuilderFactory(). -
setGeneratedBuilder
Sets the value to be returned byDatatype.getGeneratedBuilder().- Returns:
- this
Builderobject - Throws:
NullPointerException- ifgeneratedBuilderis null
-
mapGeneratedBuilder
Replaces the value to be returned byDatatype.getGeneratedBuilder()by applyingmapperto it and using the result.- Returns:
- this
Builderobject - Throws:
NullPointerException- ifmapperis null or returns nullIllegalStateException- if the field has not been set
-
getGeneratedBuilder
Returns the value that will be returned byDatatype.getGeneratedBuilder().- Throws:
IllegalStateException- if the field has not been set
-
setValueType
Sets the value to be returned byDatatype.getValueType().- Returns:
- this
Builderobject - Throws:
NullPointerException- ifvalueTypeis null
-
mapValueType
Replaces the value to be returned byDatatype.getValueType()by applyingmapperto it and using the result.- Returns:
- this
Builderobject - Throws:
NullPointerException- ifmapperis null or returns nullIllegalStateException- if the field has not been set
-
getValueType
Returns the value that will be returned byDatatype.getValueType().- Throws:
IllegalStateException- if the field has not been set
-
setPartialType
Sets the value to be returned byDatatype.getPartialType().- Returns:
- this
Builderobject - Throws:
NullPointerException- ifpartialTypeis null
-
mapPartialType
Replaces the value to be returned byDatatype.getPartialType()by applyingmapperto it and using the result.- Returns:
- this
Builderobject - Throws:
NullPointerException- ifmapperis null or returns nullIllegalStateException- if the field has not been set
-
getPartialType
Returns the value that will be returned byDatatype.getPartialType().- Throws:
IllegalStateException- if the field has not been set
-
setRebuildableType
Sets the value to be returned byDatatype.getRebuildableType().- Returns:
- this
Builderobject - Throws:
NullPointerException- ifrebuildableTypeis null
-
setRebuildableType
Sets the value to be returned byDatatype.getRebuildableType().- Returns:
- this
Builderobject
-
setNullableRebuildableType
Sets the value to be returned byDatatype.getRebuildableType().- Returns:
- this
Builderobject
-
mapRebuildableType
If the value to be returned byDatatype.getRebuildableType()is present, replaces it by applyingmapperto it and using the result.If the result is null, clears the value.
- Returns:
- this
Builderobject - Throws:
NullPointerException- ifmapperis null
-
clearRebuildableType
Sets the value to be returned byDatatype.getRebuildableType()toOptional.empty().- Returns:
- this
Builderobject
-
getRebuildableType
Returns the value that will be returned byDatatype.getRebuildableType(). -
setPropertyEnum
Sets the value to be returned byDatatype.getPropertyEnum().- Returns:
- this
Builderobject - Throws:
NullPointerException- ifpropertyEnumis null
-
mapPropertyEnum
Replaces the value to be returned byDatatype.getPropertyEnum()by applyingmapperto it and using the result.- Returns:
- this
Builderobject - Throws:
NullPointerException- ifmapperis null or returns nullIllegalStateException- if the field has not been set
-
getPropertyEnum
Returns the value that will be returned byDatatype.getPropertyEnum().- Throws:
IllegalStateException- if the field has not been set
-
putStandardMethodUnderrides
public Datatype.Builder putStandardMethodUnderrides(Datatype.StandardMethod key, Datatype.UnderrideLevel value) Associateskeywithvaluein the map to be returned fromDatatype.getStandardMethodUnderrides(). If the map previously contained a mapping for the key, the old value is replaced by the specified value.- Returns:
- this
Builderobject - Throws:
NullPointerException- if eitherkeyorvalueare null
-
putAllStandardMethodUnderrides
public Datatype.Builder putAllStandardMethodUnderrides(Map<? extends Datatype.StandardMethod, ? extends Datatype.UnderrideLevel> map) Copies all of the mappings frommapto the map to be returned fromDatatype.getStandardMethodUnderrides().- Returns:
- this
Builderobject - Throws:
NullPointerException- ifmapis null or contains a null key or value
-
removeStandardMethodUnderrides
Removes the mapping forkeyfrom the map to be returned fromDatatype.getStandardMethodUnderrides(), if one is present.- Returns:
- this
Builderobject - Throws:
NullPointerException- ifkeyis null
-
mutateStandardMethodUnderrides
public Datatype.Builder mutateStandardMethodUnderrides(Consumer<? super Map<Datatype.StandardMethod, Datatype.UnderrideLevel>> mutator) Invokesmutatorwith the map to be returned fromDatatype.getStandardMethodUnderrides().This method mutates the map in-place.
mutatoris a void consumer, so any value returned from a lambda will be ignored. Take care not to call pure functions, likeCollection.stream().- Returns:
- this
Builderobject - Throws:
NullPointerException- ifmutatoris null
-
clearStandardMethodUnderrides
Removes all of the mappings from the map to be returned fromDatatype.getStandardMethodUnderrides().- Returns:
- this
Builderobject
-
getStandardMethodUnderrides
Returns an unmodifiable view of the map that will be returned byDatatype.getStandardMethodUnderrides(). Changes to this builder will be reflected in the view. -
setBuilderSerializable
Sets the value to be returned byDatatype.isBuilderSerializable().- Returns:
- this
Builderobject
-
mapBuilderSerializable
Replaces the value to be returned byDatatype.isBuilderSerializable()by applyingmapperto it and using the result.- Returns:
- this
Builderobject - Throws:
NullPointerException- ifmapperis null or returns nullIllegalStateException- if the field has not been set
-
isBuilderSerializable
public boolean isBuilderSerializable()Returns the value that will be returned byDatatype.isBuilderSerializable().- Throws:
IllegalStateException- if the field has not been set
-
setHasToBuilderMethod
Sets the value to be returned byDatatype.getHasToBuilderMethod().- Returns:
- this
Builderobject
-
mapHasToBuilderMethod
Replaces the value to be returned byDatatype.getHasToBuilderMethod()by applyingmapperto it and using the result.- Returns:
- this
Builderobject - Throws:
NullPointerException- ifmapperis null or returns nullIllegalStateException- if the field has not been set
-
getHasToBuilderMethod
public boolean getHasToBuilderMethod()Returns the value that will be returned byDatatype.getHasToBuilderMethod().- Throws:
IllegalStateException- if the field has not been set
-
setBuildMethod
Sets the value to be returned byDatatype.getBuildMethod().- Returns:
- this
Builderobject - Throws:
NullPointerException- ifbuildMethodis null
-
mapBuildMethod
Replaces the value to be returned byDatatype.getBuildMethod()by applyingmapperto it and using the result.- Returns:
- this
Builderobject - Throws:
NullPointerException- ifmapperis null or returns nullIllegalStateException- if the field has not been set
-
getBuildMethod
Returns the value that will be returned byDatatype.getBuildMethod().- Throws:
IllegalStateException- if the field has not been set
-
setBuildPartialMethod
Sets the value to be returned byDatatype.getBuildPartialMethod().- Returns:
- this
Builderobject - Throws:
NullPointerException- ifbuildPartialMethodis null
-
mapBuildPartialMethod
Replaces the value to be returned byDatatype.getBuildPartialMethod()by applyingmapperto it and using the result.- Returns:
- this
Builderobject - Throws:
NullPointerException- ifmapperis null or returns nullIllegalStateException- if the field has not been set
-
getBuildPartialMethod
Returns the value that will be returned byDatatype.getBuildPartialMethod().- Throws:
IllegalStateException- if the field has not been set
-
setClearMethod
Sets the value to be returned byDatatype.getClearMethod().- Returns:
- this
Builderobject - Throws:
NullPointerException- ifclearMethodis null
-
mapClearMethod
Replaces the value to be returned byDatatype.getClearMethod()by applyingmapperto it and using the result.- Returns:
- this
Builderobject - Throws:
NullPointerException- ifmapperis null or returns nullIllegalStateException- if the field has not been set
-
getClearMethod
Returns the value that will be returned byDatatype.getClearMethod().- Throws:
IllegalStateException- if the field has not been set
-
setMergeFromBuilderMethod
Sets the value to be returned byDatatype.getMergeFromBuilderMethod().- Returns:
- this
Builderobject - Throws:
NullPointerException- ifmergeFromBuilderMethodis null
-
mapMergeFromBuilderMethod
Replaces the value to be returned byDatatype.getMergeFromBuilderMethod()by applyingmapperto it and using the result.- Returns:
- this
Builderobject - Throws:
NullPointerException- ifmapperis null or returns nullIllegalStateException- if the field has not been set
-
getMergeFromBuilderMethod
Returns the value that will be returned byDatatype.getMergeFromBuilderMethod().- Throws:
IllegalStateException- if the field has not been set
-
setMergeFromValueMethod
Sets the value to be returned byDatatype.getMergeFromValueMethod().- Returns:
- this
Builderobject - Throws:
NullPointerException- ifmergeFromValueMethodis null
-
mapMergeFromValueMethod
Replaces the value to be returned byDatatype.getMergeFromValueMethod()by applyingmapperto it and using the result.- Returns:
- this
Builderobject - Throws:
NullPointerException- ifmapperis null or returns nullIllegalStateException- if the field has not been set
-
getMergeFromValueMethod
Returns the value that will be returned byDatatype.getMergeFromValueMethod().- Throws:
IllegalStateException- if the field has not been set
-
addGeneratedBuilderAnnotations
Addselementto the list to be returned fromDatatype.getGeneratedBuilderAnnotations().- Returns:
- this
Builderobject - Throws:
NullPointerException- ifelementis null
-
addGeneratedBuilderAnnotations
Adds each element ofelementsto the list to be returned fromDatatype.getGeneratedBuilderAnnotations().- Returns:
- this
Builderobject - Throws:
NullPointerException- ifelementsis null or contains a null element
-
addAllGeneratedBuilderAnnotations
Adds each element ofelementsto the list to be returned fromDatatype.getGeneratedBuilderAnnotations().- Returns:
- this
Builderobject - Throws:
NullPointerException- ifelementsis null or contains a null element
-
addAllGeneratedBuilderAnnotations
public Datatype.Builder addAllGeneratedBuilderAnnotations(BaseStream<? extends Excerpt, ?> elements) Adds each element ofelementsto the list to be returned fromDatatype.getGeneratedBuilderAnnotations().- Returns:
- this
Builderobject - Throws:
NullPointerException- ifelementsis null or contains a null element
-
addAllGeneratedBuilderAnnotations
Adds each element ofelementsto the list to be returned fromDatatype.getGeneratedBuilderAnnotations().- Returns:
- this
Builderobject - Throws:
NullPointerException- ifelementsis null or contains a null element
-
mutateGeneratedBuilderAnnotations
Appliesmutatorto the list to be returned fromDatatype.getGeneratedBuilderAnnotations().This method mutates the list in-place.
mutatoris a void consumer, so any value returned from a lambda will be ignored. Take care not to call pure functions, likeCollection.stream().- Returns:
- this
Builderobject - Throws:
NullPointerException- ifmutatoris null
-
clearGeneratedBuilderAnnotations
Clears the list to be returned fromDatatype.getGeneratedBuilderAnnotations().- Returns:
- this
Builderobject
-
getGeneratedBuilderAnnotations
Returns an unmodifiable view of the list that will be returned byDatatype.getGeneratedBuilderAnnotations(). Changes to this builder will be reflected in the view. -
addValueTypeAnnotations
Addselementto the list to be returned fromDatatype.getValueTypeAnnotations().- Returns:
- this
Builderobject - Throws:
NullPointerException- ifelementis null
-
addValueTypeAnnotations
Adds each element ofelementsto the list to be returned fromDatatype.getValueTypeAnnotations().- Returns:
- this
Builderobject - Throws:
NullPointerException- ifelementsis null or contains a null element
-
addAllValueTypeAnnotations
Adds each element ofelementsto the list to be returned fromDatatype.getValueTypeAnnotations().- Returns:
- this
Builderobject - Throws:
NullPointerException- ifelementsis null or contains a null element
-
addAllValueTypeAnnotations
Adds each element ofelementsto the list to be returned fromDatatype.getValueTypeAnnotations().- Returns:
- this
Builderobject - Throws:
NullPointerException- ifelementsis null or contains a null element
-
addAllValueTypeAnnotations
Adds each element ofelementsto the list to be returned fromDatatype.getValueTypeAnnotations().- Returns:
- this
Builderobject - Throws:
NullPointerException- ifelementsis null or contains a null element
-
mutateValueTypeAnnotations
Appliesmutatorto the list to be returned fromDatatype.getValueTypeAnnotations().This method mutates the list in-place.
mutatoris a void consumer, so any value returned from a lambda will be ignored. Take care not to call pure functions, likeCollection.stream().- Returns:
- this
Builderobject - Throws:
NullPointerException- ifmutatoris null
-
clearValueTypeAnnotations
Clears the list to be returned fromDatatype.getValueTypeAnnotations().- Returns:
- this
Builderobject
-
getValueTypeAnnotations
Returns an unmodifiable view of the list that will be returned byDatatype.getValueTypeAnnotations(). Changes to this builder will be reflected in the view. -
setValueTypeVisibility
Sets the value to be returned byDatatype.getValueTypeVisibility().- Returns:
- this
Builderobject - Throws:
NullPointerException- ifvalueTypeVisibilityis null
-
mapValueTypeVisibility
Replaces the value to be returned byDatatype.getValueTypeVisibility()by applyingmapperto it and using the result.- Returns:
- this
Builderobject - Throws:
NullPointerException- ifmapperis null or returns nullIllegalStateException- if the field has not been set
-
getValueTypeVisibility
Returns the value that will be returned byDatatype.getValueTypeVisibility().- Throws:
IllegalStateException- if the field has not been set
-
addNestedClasses
Addselementto the list to be returned fromDatatype.getNestedClasses().- Returns:
- this
Builderobject - Throws:
NullPointerException- ifelementis null
-
addNestedClasses
Adds each element ofelementsto the list to be returned fromDatatype.getNestedClasses().- Returns:
- this
Builderobject - Throws:
NullPointerException- ifelementsis null or contains a null element
-
addAllNestedClasses
Adds each element ofelementsto the list to be returned fromDatatype.getNestedClasses().- Returns:
- this
Builderobject - Throws:
NullPointerException- ifelementsis null or contains a null element
-
addAllNestedClasses
Adds each element ofelementsto the list to be returned fromDatatype.getNestedClasses().- Returns:
- this
Builderobject - Throws:
NullPointerException- ifelementsis null or contains a null element
-
addAllNestedClasses
Adds each element ofelementsto the list to be returned fromDatatype.getNestedClasses().- Returns:
- this
Builderobject - Throws:
NullPointerException- ifelementsis null or contains a null element
-
mutateNestedClasses
Appliesmutatorto the list to be returned fromDatatype.getNestedClasses().This method mutates the list in-place.
mutatoris a void consumer, so any value returned from a lambda will be ignored. Take care not to call pure functions, likeCollection.stream().- Returns:
- this
Builderobject - Throws:
NullPointerException- ifmutatoris null
-
clearNestedClasses
Clears the list to be returned fromDatatype.getNestedClasses().- Returns:
- this
Builderobject
-
getNestedClasses
Returns an unmodifiable view of the list that will be returned byDatatype.getNestedClasses(). Changes to this builder will be reflected in the view. -
mergeFrom
Copies values fromvalue, appending to collections, and skipping empty optionals.- Returns:
- this
Builderobject
-
mergeFrom
Copies values fromtemplate, appending to collections, and skipping empty optionals and unset properties.- Returns:
- this
Builderobject
-
clear
-
build
Returns a newly-createdDatatypebased on the contents of thisBuilder.- Throws:
IllegalStateException- if any field has not been set
-
buildPartial
Returns a newly-created partialDatatypefor use in unit tests. State checking will not be performed. Unset properties will throw anUnsupportedOperationExceptionwhen accessed via the partial object.The builder returned by
from(Datatype)will propagate the partial status of its input, overridingbuild()to return another partial. This allows for robust tests of modify-rebuild code.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.
-