Class ImmutableTrees.TransformGenerator.Builder
- java.lang.Object
-
- org.immutables.generator.processor.ImmutableTrees.TransformGenerator.Builder
-
- Enclosing class:
- ImmutableTrees.TransformGenerator
@NotThreadSafe public static final class ImmutableTrees.TransformGenerator.Builder extends java.lang.ObjectBuilds instances of typeTransformGenerator. Initialize attributes and then invoke thebuild()method to create an immutable instance.Builderis not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.
-
-
Field Summary
Fields Modifier and Type Field Description private com.google.common.base.Optional<Trees.Expression>conditionprivate Trees.ValueDeclarationdeclarationprivate Trees.Expressionfromprivate static longINIT_BIT_DECLARATIONprivate static longINIT_BIT_FROMprivate static longINIT_BIT_TRANSFORMprivate static longINIT_BIT_VAR_DECLARATIONprivate longinitBitsprivate Trees.Expressiontransformprivate Trees.ValueDeclarationvarDeclaration
-
Constructor Summary
Constructors Modifier Constructor Description privateBuilder()
-
Method Summary
-
-
-
Field Detail
-
INIT_BIT_DECLARATION
private static final long INIT_BIT_DECLARATION
- See Also:
- Constant Field Values
-
INIT_BIT_FROM
private static final long INIT_BIT_FROM
- See Also:
- Constant Field Values
-
INIT_BIT_TRANSFORM
private static final long INIT_BIT_TRANSFORM
- See Also:
- Constant Field Values
-
INIT_BIT_VAR_DECLARATION
private static final long INIT_BIT_VAR_DECLARATION
- See Also:
- Constant Field Values
-
initBits
private long initBits
-
declaration
@Nullable private Trees.ValueDeclaration declaration
-
from
@Nullable private Trees.Expression from
-
transform
@Nullable private Trees.Expression transform
-
varDeclaration
@Nullable private Trees.ValueDeclaration varDeclaration
-
condition
private com.google.common.base.Optional<Trees.Expression> condition
-
-
Method Detail
-
declaration
public final ImmutableTrees.TransformGenerator.Builder declaration(Trees.ValueDeclaration declaration)
Initializes the value for thedeclarationattribute.- Parameters:
declaration- The value for declaration- Returns:
thisbuilder for use in a chained invocation
-
from
public final ImmutableTrees.TransformGenerator.Builder from(Trees.Expression from)
Initializes the value for thefromattribute.- Parameters:
from- The value for from- Returns:
thisbuilder for use in a chained invocation
-
transform
public final ImmutableTrees.TransformGenerator.Builder transform(Trees.Expression transform)
Initializes the value for thetransformattribute.- Parameters:
transform- The value for transform- Returns:
thisbuilder for use in a chained invocation
-
varDeclaration
public final ImmutableTrees.TransformGenerator.Builder varDeclaration(Trees.ValueDeclaration varDeclaration)
Initializes the value for thevarDeclarationattribute.- Parameters:
varDeclaration- The value for varDeclaration- Returns:
thisbuilder for use in a chained invocation
-
condition
public final ImmutableTrees.TransformGenerator.Builder condition(Trees.Expression condition)
Initializes the optional valueconditionto condition.- Parameters:
condition- The value for condition- Returns:
thisbuilder for chained invocation
-
condition
public final ImmutableTrees.TransformGenerator.Builder condition(com.google.common.base.Optional<? extends Trees.Expression> condition)
Initializes the optional valueconditionto condition.- Parameters:
condition- The value for condition- Returns:
thisbuilder for use in a chained invocation
-
build
public ImmutableTrees.TransformGenerator build()
Builds a newTransformGenerator.- Returns:
- An immutable instance of TransformGenerator
- Throws:
java.lang.IllegalStateException- if any required attributes are missing
-
formatRequiredAttributesMessage
private java.lang.String formatRequiredAttributesMessage()
-
-