Class SortedSetProperty
- java.lang.Object
-
- org.inferred.freebuilder.processor.property.PropertyCodeGenerator
-
- org.inferred.freebuilder.processor.property.SortedSetProperty
-
class SortedSetProperty extends PropertyCodeGenerator
PropertyCodeGeneratorproviding fluent methods forSortedSetproperties.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static classSortedSetProperty.Factory-
Nested classes/interfaces inherited from class org.inferred.freebuilder.processor.property.PropertyCodeGenerator
PropertyCodeGenerator.Config, PropertyCodeGenerator.Initially
-
-
Field Summary
Fields Modifier and Type Field Description private javax.lang.model.type.TypeMirrorelementTypeprivate FunctionalTypemutatorTypeprivate booleanneedsSafeVarargsprivate booleanoverridesAddMethodprivate booleanoverridesVarargsAddMethodprivate java.util.Optional<javax.lang.model.type.TypeMirror>unboxedType-
Fields inherited from class org.inferred.freebuilder.processor.property.PropertyCodeGenerator
datatype, property
-
-
Constructor Summary
Constructors Constructor Description SortedSetProperty(Datatype datatype, Property property, javax.lang.model.type.TypeMirror elementType, java.util.Optional<javax.lang.model.type.TypeMirror> unboxedType, FunctionalType mutatorType, boolean needsSafeVarargs, boolean overridesAddMethod, boolean overridesVarargsAddMethod)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidaddAdd(SourceBuilder code)voidaddAssignToBuilder(SourceBuilder code, Variable builder)Adds an assignment to the field on the builder from the Value/Partial implementation.voidaddBuilderFieldAccessors(SourceBuilder code)Add the accessor methods for the property to the builder's source code.voidaddBuilderFieldDeclaration(SourceBuilder code)Add 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.private voidaddConvertToTreeSet(SourceBuilder code)voidaddFinalFieldAssignment(SourceBuilder code, Excerpt finalField, java.lang.String builder)Add the final assignment of the property to the value object's source code.private voidaddGetter(SourceBuilder code)private voidaddIterableAddAll(SourceBuilder code)private voidaddJavadocForAddAll(SourceBuilder code)voidaddMergeFromBuilder(SourceBuilder code, java.lang.String builder)Add a merge from builder for the property to the builder's source code.voidaddMergeFromValue(SourceBuilder code, java.lang.String value)Add a merge from value for the property to the builder's source code.private voidaddMutator(SourceBuilder code)private voidaddRemove(SourceBuilder code)private voidaddSetComparator(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 voidaddSpliteratorAddAll(SourceBuilder code)private voidaddStreamAddAll(SourceBuilder code)voidaddValueFieldDeclaration(SourceBuilder code)Add the field declaration for the property to the value's source code.private voidaddVarargsAdd(SourceBuilder code)java.util.Set<MergeAction>getMergeActions()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 Detail
-
elementType
private final javax.lang.model.type.TypeMirror elementType
-
unboxedType
private final java.util.Optional<javax.lang.model.type.TypeMirror> unboxedType
-
mutatorType
private final FunctionalType mutatorType
-
needsSafeVarargs
private final boolean needsSafeVarargs
-
overridesAddMethod
private final boolean overridesAddMethod
-
overridesVarargsAddMethod
private final boolean overridesVarargsAddMethod
-
-
Constructor Detail
-
SortedSetProperty
SortedSetProperty(Datatype datatype, Property property, javax.lang.model.type.TypeMirror elementType, java.util.Optional<javax.lang.model.type.TypeMirror> unboxedType, FunctionalType mutatorType, boolean needsSafeVarargs, boolean overridesAddMethod, boolean overridesVarargsAddMethod)
-
-
Method Detail
-
addValueFieldDeclaration
public void addValueFieldDeclaration(SourceBuilder code)
Description copied from class:PropertyCodeGeneratorAdd the field declaration for the property to the value's source code.- Specified by:
addValueFieldDeclarationin classPropertyCodeGenerator
-
addBuilderFieldDeclaration
public void addBuilderFieldDeclaration(SourceBuilder code)
Description copied from class:PropertyCodeGeneratorAdd the field declaration for the property to the builder's source code.- Specified by:
addBuilderFieldDeclarationin classPropertyCodeGenerator
-
addBuilderFieldAccessors
public void addBuilderFieldAccessors(SourceBuilder code)
Description copied from class:PropertyCodeGeneratorAdd the accessor methods for the property to the builder's source code.- Specified by:
addBuilderFieldAccessorsin classPropertyCodeGenerator
-
addSetComparator
private void addSetComparator(SourceBuilder code)
-
addAdd
private void addAdd(SourceBuilder code)
-
addConvertToTreeSet
private void addConvertToTreeSet(SourceBuilder code)
-
addVarargsAdd
private void addVarargsAdd(SourceBuilder code)
-
addSpliteratorAddAll
private void addSpliteratorAddAll(SourceBuilder code)
-
addStreamAddAll
private void addStreamAddAll(SourceBuilder code)
-
addIterableAddAll
private void addIterableAddAll(SourceBuilder code)
-
addJavadocForAddAll
private void addJavadocForAddAll(SourceBuilder code)
-
addRemove
private void addRemove(SourceBuilder code)
-
addMutator
private void addMutator(SourceBuilder code)
-
addClear
private void addClear(SourceBuilder code)
-
addGetter
private void addGetter(SourceBuilder code)
-
addFinalFieldAssignment
public void addFinalFieldAssignment(SourceBuilder code, Excerpt finalField, java.lang.String builder)
Description copied from class:PropertyCodeGeneratorAdd the final assignment of the property to the value object's source code.- Specified by:
addFinalFieldAssignmentin classPropertyCodeGenerator
-
addAssignToBuilder
public void addAssignToBuilder(SourceBuilder code, Variable builder)
Description copied from class:PropertyCodeGeneratorAdds an assignment to the field on the builder from the Value/Partial implementation.- Specified by:
addAssignToBuilderin classPropertyCodeGenerator
-
addMergeFromValue
public void addMergeFromValue(SourceBuilder code, java.lang.String value)
Description copied from class:PropertyCodeGeneratorAdd a merge from value for the property to the builder's source code.- Specified by:
addMergeFromValuein classPropertyCodeGenerator
-
addMergeFromBuilder
public void addMergeFromBuilder(SourceBuilder code, java.lang.String builder)
Description copied from class:PropertyCodeGeneratorAdd a merge from builder for the property to the builder's source code.- Specified by:
addMergeFromBuilderin classPropertyCodeGenerator
-
getMergeActions
public java.util.Set<MergeAction> getMergeActions()
Description copied from class:PropertyCodeGeneratorReturns the actions taken in mergeFrom, for generating JavaDoc.- Specified by:
getMergeActionsin classPropertyCodeGenerator
-
addSetFromResult
public void addSetFromResult(SourceBuilder code, Excerpt builder, Excerpt variable)
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
public void addClearField(SourceBuilder code)
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
-
-