public class DefaultProperty extends PropertyCodeGenerator
PropertyCodeGenerator, providing reference semantics for any type.PropertyCodeGenerator.Config, PropertyCodeGenerator.Initially| Modifier and Type | Field and Description |
|---|---|
static FieldAccess |
UNSET_PROPERTIES |
datatype, property| Modifier and Type | Method and Description |
|---|---|
void |
addAssignToBuilder(SourceBuilder code,
Variable builder)
Adds an assignment to the field on the builder from the Value/Partial implementation.
|
void |
addBuilderFieldAccessors(SourceBuilder code)
Add the accessor methods for the property to the builder's source code.
|
void |
addBuilderFieldDeclaration(SourceBuilder code)
Add the field declaration for the property to the builder's source code.
|
void |
addClearField(SourceBuilder code)
Adds a clear call for the property given a template builder to the builder's source code.
|
void |
addFinalFieldAssignment(SourceBuilder code,
Excerpt finalField,
java.lang.String builder)
Add the final assignment of the property to the value object's source code.
|
void |
addMergeFromBuilder(SourceBuilder code,
java.lang.String builder)
Add a merge from builder for the property to the builder's source code.
|
void |
addMergeFromValue(SourceBuilder code,
java.lang.String value)
Add a merge from value for the property to the builder's source code.
|
void |
addSetFromResult(SourceBuilder code,
Excerpt builder,
Excerpt variable)
Adds a set call for the property from a function result to the builder's source code.
|
void |
addToStringValue(SourceBuilder code)
Adds value to an ongoing toString concatenation or append sequence.
|
void |
addValueFieldDeclaration(SourceBuilder code)
Add the field declaration for the property to the value's source code.
|
java.util.Set<MergeAction> |
getMergeActions()
Returns the actions taken in mergeFrom, for generating JavaDoc.
|
PropertyCodeGenerator.Initially |
initialState()
Returns whether the property is required, optional, or has a default.
|
addAccessorAnnotations, addGetterAnnotations, addPartialFieldAssignment, addPutAnnotations, addReadValueFragment, addToStringCondition, equals, hashCode, toStringpublic static final FieldAccess UNSET_PROPERTIES
public PropertyCodeGenerator.Initially initialState()
PropertyCodeGeneratorinitialState in class PropertyCodeGeneratorpublic void addValueFieldDeclaration(SourceBuilder code)
PropertyCodeGeneratoraddValueFieldDeclaration in class PropertyCodeGeneratorpublic void addBuilderFieldDeclaration(SourceBuilder code)
PropertyCodeGeneratoraddBuilderFieldDeclaration in class PropertyCodeGeneratorpublic void addBuilderFieldAccessors(SourceBuilder code)
PropertyCodeGeneratoraddBuilderFieldAccessors in class PropertyCodeGeneratorpublic void addFinalFieldAssignment(SourceBuilder code, Excerpt finalField, java.lang.String builder)
PropertyCodeGeneratoraddFinalFieldAssignment in class PropertyCodeGeneratorpublic void addAssignToBuilder(SourceBuilder code, Variable builder)
PropertyCodeGeneratoraddAssignToBuilder in class PropertyCodeGeneratorpublic void addMergeFromValue(SourceBuilder code, java.lang.String value)
PropertyCodeGeneratoraddMergeFromValue in class PropertyCodeGeneratorpublic void addMergeFromBuilder(SourceBuilder code, java.lang.String builder)
PropertyCodeGeneratoraddMergeFromBuilder in class PropertyCodeGeneratorpublic java.util.Set<MergeAction> getMergeActions()
PropertyCodeGeneratorgetMergeActions in class PropertyCodeGeneratorpublic void addSetFromResult(SourceBuilder code, Excerpt builder, Excerpt variable)
PropertyCodeGeneratoraddSetFromResult in class PropertyCodeGeneratorpublic void addClearField(SourceBuilder code)
PropertyCodeGeneratoraddClearField in class PropertyCodeGeneratorpublic void addToStringValue(SourceBuilder code)
PropertyCodeGeneratoraddToStringValue in class PropertyCodeGenerator