Class BuildableListProperty
java.lang.Object
org.inferred.freebuilder.processor.property.PropertyCodeGenerator
org.inferred.freebuilder.processor.property.BuildableListProperty
PropertyCodeGenerator providing fluent methods for List properties
containing BuildableType instances.-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class PropertyCodeGenerator
PropertyCodeGenerator.Config, PropertyCodeGenerator.Initially -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final BuildableTypeprivate final booleanprivate final booleanprivate final booleanFields inherited from class PropertyCodeGenerator
datatype, property -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateBuildableListProperty(Datatype datatype, Property property, boolean needsSafeVarargs, boolean overridesValueInstanceVarargsAddMethod, boolean overridesBuilderVarargsAddMethod, BuildableType element) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAssignToBuilder(SourceBuilder code, Variable builder) Adds an assignment to the field on the builder from the Value/Partial implementation.private voidaddBuilderAdd(SourceBuilder code) voidAdd the accessor methods for the property to the builder's source code.voidAdd the field declaration for the property to the builder's source code.private voidprivate voidaddClear(SourceBuilder code) voidaddClearField(SourceBuilder code) Adds a clear call for the property given a template builder to the builder's source code.private voidaddFieldAssignment(SourceBuilder code, Excerpt finalField, String builder, String buildMethod) voidaddFinalFieldAssignment(SourceBuilder code, Excerpt finalField, String builder) Add the final assignment of the property to the value object's source code.private voidaddGetter(SourceBuilder code) private voidprivate voidprivate voidprivate voidvoidaddMergeFromBuilder(SourceBuilder code, String builder) Add a merge from builder for the property to the builder's source code.voidaddMergeFromValue(SourceBuilder code, String value) Add a merge from value for the property to the builder's source code.private voidaddMutate(SourceBuilder code) voidaddPartialFieldAssignment(SourceBuilder code, Excerpt finalField, String builder) Add the final assignment of the property to the partial value object's source code.private voidaddSafeVarargsForPublicMethod(SourceBuilder code, boolean isOverridden) voidaddSetFromResult(SourceBuilder code, Excerpt builder, Excerpt variable) Adds a set call for the property from a function result to the builder's source code.private voidprivate voidprivate voidprivate voidvoidAdd the field declaration for the property to the value's source code.private voidprivate voidReturns the actions taken in mergeFrom, for generating JavaDoc.Methods inherited from class PropertyCodeGenerator
addAccessorAnnotations, addGetterAnnotations, addPutAnnotations, addReadValueFragment, addToStringCondition, addToStringValue, equals, hashCode, initialState, toString
-
Field Details
-
needsSafeVarargs
private final boolean needsSafeVarargs -
overridesValueInstanceVarargsAddMethod
private final boolean overridesValueInstanceVarargsAddMethod -
overridesBuilderVarargsAddMethod
private final boolean overridesBuilderVarargsAddMethod -
element
-
-
Constructor Details
-
BuildableListProperty
private BuildableListProperty(Datatype datatype, Property property, boolean needsSafeVarargs, boolean overridesValueInstanceVarargsAddMethod, boolean overridesBuilderVarargsAddMethod, BuildableType element)
-
-
Method Details
-
addValueFieldDeclaration
Description copied from class:PropertyCodeGeneratorAdd the field declaration for the property to the value's source code.- Specified by:
addValueFieldDeclarationin classPropertyCodeGenerator
-
addBuilderFieldDeclaration
Description copied from class:PropertyCodeGeneratorAdd the field declaration for the property to the builder's source code.- Specified by:
addBuilderFieldDeclarationin classPropertyCodeGenerator
-
addBuilderFieldAccessors
Description copied from class:PropertyCodeGeneratorAdd the accessor methods for the property to the builder's source code.- Specified by:
addBuilderFieldAccessorsin classPropertyCodeGenerator
-
addValueInstanceAdd
-
addBuilderAdd
-
addJavadocForAddingMultipleValues
-
addJavadocForAddingMultipleBuilders
-
addValueInstanceVarargsAdd
-
addBuilderVarargsAdd
-
addSafeVarargsForPublicMethod
-
addSpliteratorValueInstanceAddAll
-
addSpliteratorBuilderAddAll
-
addIterableValueInstanceAddAll
-
addIterableBuilderAddAll
-
addStreamValueInstanceAddAll
-
addStreamBuilderAddAll
-
addMutate
-
addClear
-
addGetter
-
addFinalFieldAssignment
Description copied from class:PropertyCodeGeneratorAdd the final assignment of the property to the value object's source code.- Specified by:
addFinalFieldAssignmentin classPropertyCodeGenerator
-
addPartialFieldAssignment
Description copied from class:PropertyCodeGeneratorAdd the final assignment of the property to the partial value object's source code.- Overrides:
addPartialFieldAssignmentin classPropertyCodeGenerator
-
addFieldAssignment
private void addFieldAssignment(SourceBuilder code, Excerpt finalField, String builder, String buildMethod) -
addAssignToBuilder
Description copied from class:PropertyCodeGeneratorAdds an assignment to the field on the builder from the Value/Partial implementation.- Specified by:
addAssignToBuilderin classPropertyCodeGenerator
-
addMergeFromValue
Description copied from class:PropertyCodeGeneratorAdd a merge from value for the property to the builder's source code.- Specified by:
addMergeFromValuein classPropertyCodeGenerator
-
addMergeFromBuilder
Description copied from class:PropertyCodeGeneratorAdd a merge from builder for the property to the builder's source code.- Specified by:
addMergeFromBuilderin classPropertyCodeGenerator
-
getMergeActions
Description copied from class:PropertyCodeGeneratorReturns the actions taken in mergeFrom, for generating JavaDoc.- Specified by:
getMergeActionsin classPropertyCodeGenerator
-
addSetFromResult
Description copied from class:PropertyCodeGeneratorAdds a set call for the property from a function result to the builder's source code.- Specified by:
addSetFromResultin classPropertyCodeGenerator
-
addClearField
Description copied from class:PropertyCodeGeneratorAdds a clear call for the property given a template builder to the builder's source code.- Specified by:
addClearFieldin classPropertyCodeGenerator
-