Class AttributeBuilderDescriptor
java.lang.Object
org.immutables.value.processor.meta.AttributeBuilderDescriptor
- Direct Known Subclasses:
ImmutableAttributeBuilderDescriptor
API for the template to use.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract StringA method to be invoked on the builder instance which returns a new value instance.abstract StringA fully qualified path and method which creates a new instance of a builder.abstract StringA fully qualified type for the builder object.UsesgetValueToBuilderTarget()to determine appropriate format for creating a new builder from a value object.abstract StringA fully qualified type for the value object.Use to generate helper methods for a specific builder/value in a unique namespace.protected abstract StringA method name which when invoked will return a builder with all the properties set from the value object.booleanHelper for the template.
-
Constructor Details
-
AttributeBuilderDescriptor
public AttributeBuilderDescriptor()
-
-
Method Details
-
getValueToBuilderTarget
-
getValueToBuilderMethod
A method name which when invoked will return a builder with all the properties set from the value object. This method will be invoked based ongetValueToBuilderTarget()- Returns:
- method to create a value instance. No () included.
-
getQualifiedValueToBuilderMethod
UsesgetValueToBuilderTarget()to determine appropriate format for creating a new builder from a value object. The template needs to still queryisCopyMethodOnValueInstance()to determine whether to use[expression].[n.getQualifiedValueToBuilderMethod]()vs[n.getQualifiedValueToBuilderMethod]([expression])- Returns:
- method to use for converting a value to a builder.
-
isCopyMethodOnValueInstance
public boolean isCopyMethodOnValueInstance()Helper for the template. -
getBuildMethod
A method to be invoked on the builder instance which returns a new value instance.- Returns:
- a method which constructs a new value instance.
-
getQualifiedValueTypeName
A fully qualified type for the value object.- Returns:
- fully qualified name of the value type.
-
getQualifiedBuilderTypeName
A fully qualified type for the builder object.- Returns:
- fully qualified name of the builder type.
-
getQualifiedValueTypeNameWithUnderscores
Use to generate helper methods for a specific builder/value in a unique namespace.- Returns:
- fully qualified name of the value type joined by underscores.
-
getQualifiedBuilderConstructorMethod
A fully qualified path and method which creates a new instance of a builder. If the builder is constructed from a no-arg constructor, thenewkeyword should be prepended with a space.- Returns:
- static path which invoked will create a new empty builder. No () included.
-