Class ImmutableTrees.ValueDeclaration.Builder
java.lang.Object
org.immutables.generator.processor.ImmutableTrees.ValueDeclaration.Builder
- Enclosing class:
ImmutableTrees.ValueDeclaration
Builds instances of type
ValueDeclaration.
Initialize attributes and then invoke the build() method to create an
immutable instance.
Builder is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate com.google.common.base.Optional<Trees.TypeReference> private static final longprivate longprivate Trees.Identifierprivate com.google.common.base.Optional<Trees.TypeReference> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds a newValueDeclaration.containedType(com.google.common.base.Optional<? extends Trees.TypeReference> containedType) Initializes the optional valuecontainedTypeto containedType.containedType(Trees.TypeReference containedType) Initializes the optional valuecontainedTypeto containedType.private Stringprivate voidfrom(Trees.Named instance) Fill a builder with attribute values from the providedorg.immutables.generator.processor.Trees.Namedinstance.from(Trees.ValueDeclaration instance) Fill a builder with attribute values from the providedorg.immutables.generator.processor.Trees.ValueDeclarationinstance.name(Trees.Identifier name) Initializes the value for thenameattribute.type(com.google.common.base.Optional<? extends Trees.TypeReference> type) Initializes the optional valuetypeto type.type(Trees.TypeReference type) Initializes the optional valuetypeto type.
-
Field Details
-
INIT_BIT_NAME
private static final long INIT_BIT_NAME- See Also:
-
initBits
private long initBits -
name
-
type
-
containedType
-
-
Constructor Details
-
Builder
private Builder()
-
-
Method Details
-
from
Fill a builder with attribute values from the providedorg.immutables.generator.processor.Trees.Namedinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
Fill a builder with attribute values from the providedorg.immutables.generator.processor.Trees.ValueDeclarationinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
-
name
Initializes the value for thenameattribute.- Parameters:
name- The value for name- Returns:
thisbuilder for use in a chained invocation
-
type
Initializes the optional valuetypeto type.- Parameters:
type- The value for type- Returns:
thisbuilder for chained invocation
-
type
public final ImmutableTrees.ValueDeclaration.Builder type(com.google.common.base.Optional<? extends Trees.TypeReference> type) Initializes the optional valuetypeto type.- Parameters:
type- The value for type- Returns:
thisbuilder for use in a chained invocation
-
containedType
public final ImmutableTrees.ValueDeclaration.Builder containedType(Trees.TypeReference containedType) Initializes the optional valuecontainedTypeto containedType.- Parameters:
containedType- The value for containedType- Returns:
thisbuilder for chained invocation
-
containedType
public final ImmutableTrees.ValueDeclaration.Builder containedType(com.google.common.base.Optional<? extends Trees.TypeReference> containedType) Initializes the optional valuecontainedTypeto containedType.- Parameters:
containedType- The value for containedType- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newValueDeclaration.- Returns:
- An immutable instance of ValueDeclaration
- Throws:
IllegalStateException- if any required attributes are missing
-
formatRequiredAttributesMessage
-