Class AttributeBuilderDescriptor
- java.lang.Object
-
- org.immutables.value.processor.meta.AttributeBuilderDescriptor
-
- Direct Known Subclasses:
ImmutableAttributeBuilderDescriptor
@Immutable public abstract class AttributeBuilderDescriptor extends java.lang.Object
API for the template to use.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAttributeBuilderDescriptor.ValueToBuilderTarget
-
Constructor Summary
Constructors Constructor Description AttributeBuilderDescriptor()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract java.lang.StringgetBuildMethod()A method to be invoked on the builder instance which returns a new value instance.abstract java.lang.StringgetQualifiedBuilderConstructorMethod()A fully qualified path and method which creates a new instance of a builder.abstract java.lang.StringgetQualifiedBuilderTypeName()A fully qualified type for the builder object.java.lang.StringgetQualifiedValueToBuilderMethod()UsesgetValueToBuilderTarget()to determine appropriate format for creating a new builder from a value object.abstract java.lang.StringgetQualifiedValueTypeName()A fully qualified type for the value object.java.lang.StringgetQualifiedValueTypeNameWithUnderscores()Use to generate helper methods for a specific builder/value in a unique namespace.protected abstract java.lang.StringgetValueToBuilderMethod()A method name which when invoked will return a builder with all the properties set from the value object.abstract AttributeBuilderDescriptor.ValueToBuilderTargetgetValueToBuilderTarget()booleanisCopyMethodOnValueInstance()Helper for the template.
-
-
-
Method Detail
-
getValueToBuilderTarget
public abstract AttributeBuilderDescriptor.ValueToBuilderTarget getValueToBuilderTarget()
-
getValueToBuilderMethod
protected abstract java.lang.String 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
public java.lang.String 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
public abstract java.lang.String 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
public abstract java.lang.String getQualifiedValueTypeName()
A fully qualified type for the value object.- Returns:
- fully qualified name of the value type.
-
getQualifiedBuilderTypeName
public abstract java.lang.String getQualifiedBuilderTypeName()
A fully qualified type for the builder object.- Returns:
- fully qualified name of the builder type.
-
getQualifiedValueTypeNameWithUnderscores
public java.lang.String 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
public abstract java.lang.String 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.
-
-