Class ListProperty
java.lang.Object
org.inferred.freebuilder.processor.property.PropertyCodeGenerator
org.inferred.freebuilder.processor.property.ListProperty
PropertyCodeGenerator providing fluent methods for List properties.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static classprivate static classNested classes/interfaces inherited from class org.inferred.freebuilder.processor.property.PropertyCodeGenerator
PropertyCodeGenerator.Config, PropertyCodeGenerator.Initially -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final TypeMirrorprivate final FunctionalTypeprivate final booleanprivate final booleanprivate final booleanprivate final Optional<TypeMirror> Fields inherited from class org.inferred.freebuilder.processor.property.PropertyCodeGenerator
datatype, property -
Constructor Summary
ConstructorsConstructorDescriptionListProperty(Datatype datatype, Property property, boolean needsSafeVarargs, boolean overridesAddMethod, boolean overridesVarargsAddMethod, TypeMirror elementType, Optional<TypeMirror> unboxedType, FunctionalType mutatorType) -
Method Summary
Modifier and TypeMethodDescriptionprivate voidaddAdd(SourceBuilder code) voidaddAssignToBuilder(SourceBuilder code, Variable builder) Adds an assignment to the field on the builder from the Value/Partial implementation.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 voidaddClear(SourceBuilder code) voidaddClearField(SourceBuilder code) Adds a clear call for the property given a template builder to the builder's source code.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 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) 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 voidaddStreamAddAll(SourceBuilder code) voidAdd the field declaration for the property to the value's source code.private voidaddVarargsAdd(SourceBuilder code) Returns the actions taken in mergeFrom, for generating JavaDoc.Methods inherited from class org.inferred.freebuilder.processor.property.PropertyCodeGenerator
addAccessorAnnotations, addGetterAnnotations, addPartialFieldAssignment, addPutAnnotations, addReadValueFragment, addToStringCondition, addToStringValue, equals, hashCode, initialState, toString
-
Field Details
-
needsSafeVarargs
private final boolean needsSafeVarargs -
overridesAddMethod
private final boolean overridesAddMethod -
overridesVarargsAddMethod
private final boolean overridesVarargsAddMethod -
elementType
-
unboxedType
-
mutatorType
-
-
Constructor Details
-
ListProperty
ListProperty(Datatype datatype, Property property, boolean needsSafeVarargs, boolean overridesAddMethod, boolean overridesVarargsAddMethod, TypeMirror elementType, Optional<TypeMirror> unboxedType, FunctionalType mutatorType)
-
-
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
-
addAdd
-
addVarargsAdd
-
addSpliteratorAddAll
-
addIterableAddAll
-
addStreamAddAll
-
addJavadocForAddAll
-
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
-
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
-