Class ImmutableTrees.TextLine.Builder
- java.lang.Object
-
- org.immutables.generator.processor.ImmutableTrees.TextLine.Builder
-
- Enclosing class:
- ImmutableTrees.TextLine
@NotThreadSafe public static final class ImmutableTrees.TextLine.Builder extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private Trees.TextFragmentfragmentprivate static longINIT_BIT_FRAGMENTprivate longinitBitsprivate booleannewlineprivate static longOPT_BIT_NEWLINEprivate longoptBits
-
Constructor Summary
Constructors Modifier Constructor Description privateBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ImmutableTrees.TextLinebuild()Builds a newTextLine.private java.lang.StringformatRequiredAttributesMessage()ImmutableTrees.TextLine.Builderfragment(Trees.TextFragment fragment)Initializes the value for thefragmentattribute.ImmutableTrees.TextLine.Builderfrom(Trees.TextLine instance)Fill a builder with attribute values from the providedTextLineinstance.ImmutableTrees.TextLine.Buildernewline(boolean newline)Initializes the value for thenewlineattribute.private booleannewlineIsSet()
-
-
-
Field Detail
-
INIT_BIT_FRAGMENT
private static final long INIT_BIT_FRAGMENT
- See Also:
- Constant Field Values
-
OPT_BIT_NEWLINE
private static final long OPT_BIT_NEWLINE
- See Also:
- Constant Field Values
-
initBits
private long initBits
-
optBits
private long optBits
-
fragment
@Nullable private Trees.TextFragment fragment
-
newline
private boolean newline
-
-
Method Detail
-
from
public final ImmutableTrees.TextLine.Builder from(Trees.TextLine instance)
Fill a builder with attribute values from the providedTextLineinstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
fragment
public final ImmutableTrees.TextLine.Builder fragment(Trees.TextFragment fragment)
Initializes the value for thefragmentattribute.- Parameters:
fragment- The value for fragment- Returns:
thisbuilder for use in a chained invocation
-
newline
public final ImmutableTrees.TextLine.Builder newline(boolean newline)
Initializes the value for thenewlineattribute.If not set, this attribute will have a default value as returned by the initializer of
newline.- Parameters:
newline- The value for newline- Returns:
thisbuilder for use in a chained invocation
-
build
public ImmutableTrees.TextLine build()
Builds a newTextLine.- Returns:
- An immutable instance of TextLine
- Throws:
java.lang.IllegalStateException- if any required attributes are missing
-
newlineIsSet
private boolean newlineIsSet()
-
formatRequiredAttributesMessage
private java.lang.String formatRequiredAttributesMessage()
-
-