Class ImmutableStructurizer.Statement.Builder
java.lang.Object
org.immutables.value.processor.encode.ImmutableStructurizer.Statement.Builder
- Direct Known Subclasses:
Structurizer.Statement.Builder
- Enclosing class:
ImmutableStructurizer.Statement
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final com.google.common.collect.ImmutableList.Builder<Code.Term> private final com.google.common.collect.ImmutableList.Builder<Code.Term> private final com.google.common.collect.ImmutableList.Builder<Structurizer.Statement> private final com.google.common.collect.ImmutableList.Builder<Code.Term> private com.google.common.base.Optional<String> private static final longprivate longprivate final com.google.common.collect.ImmutableList.Builder<Code.Term> private final com.google.common.collect.ImmutableList.Builder<Code.Term> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddAllAnnotations(Iterable<? extends Code.Term> elements) Adds elements toannotationslist.addAllBlock(Iterable<? extends Code.Term> elements) Adds elements toblocklist.addAllDefinitions(Iterable<? extends Structurizer.Statement> elements) Adds elements todefinitionslist.addAllExpression(Iterable<? extends Code.Term> elements) Adds elements toexpressionlist.addAllParameters(Iterable<? extends Code.Term> elements) Adds elements toparameterslist.addAllSignature(Iterable<? extends Code.Term> elements) Adds elements tosignaturelist.addAnnotations(Code.Term element) Adds one element toannotationslist.addAnnotations(Code.Term... elements) Adds elements toannotationslist.Adds one element toblocklist.Adds elements toblocklist.addDefinitions(Structurizer.Statement element) Adds one element todefinitionslist.addDefinitions(Structurizer.Statement... elements) Adds elements todefinitionslist.addExpression(Code.Term element) Adds one element toexpressionlist.addExpression(Code.Term... elements) Adds elements toexpressionlist.addParameters(Code.Term element) Adds one element toparameterslist.addParameters(Code.Term... elements) Adds elements toparameterslist.addSignature(Code.Term element) Adds one element tosignaturelist.addSignature(Code.Term... elements) Adds elements tosignaturelist.build()Builds a newStatement.private static voidcheckNotIsSet(boolean isSet, String name) Initializes the value for thenameattribute.private boolean
-
Field Details
-
OPT_BIT_NAME
private static final long OPT_BIT_NAME- See Also:
-
optBits
private long optBits -
annotations
-
signature
-
parameters
-
expression
-
block
-
definitions
-
name
-
-
Constructor Details
-
Builder
public Builder()Creates a builder forStatementinstances.new Structurizer.Statement.Builder() .addAnnotations|addAllAnnotations(org.immutables.value.processor.encode.Code.Term) //annotationselements .addSignature|addAllSignature(org.immutables.value.processor.encode.Code.Term) //signatureelements .addParameters|addAllParameters(org.immutables.value.processor.encode.Code.Term) //parameterselements .addExpression|addAllExpression(org.immutables.value.processor.encode.Code.Term) //expressionelements .addBlock|addAllBlock(org.immutables.value.processor.encode.Code.Term) //blockelements .addDefinitions|addAllDefinitions(org.immutables.value.processor.encode.Structurizer.Statement) //definitionselements .name(com.google.common.base.Optional<String>) // optionalname.build();
-
-
Method Details
-
addAnnotations
Adds one element toannotationslist.- Parameters:
element- A annotations element- Returns:
thisbuilder for use in a chained invocation
-
addAnnotations
Adds elements toannotationslist.- Parameters:
elements- An array of annotations elements- Returns:
thisbuilder for use in a chained invocation
-
addAllAnnotations
public final Structurizer.Statement.Builder addAllAnnotations(Iterable<? extends Code.Term> elements) Adds elements toannotationslist.- Parameters:
elements- An iterable of annotations elements- Returns:
thisbuilder for use in a chained invocation
-
addSignature
Adds one element tosignaturelist.- Parameters:
element- A signature element- Returns:
thisbuilder for use in a chained invocation
-
addSignature
Adds elements tosignaturelist.- Parameters:
elements- An array of signature elements- Returns:
thisbuilder for use in a chained invocation
-
addAllSignature
Adds elements tosignaturelist.- Parameters:
elements- An iterable of signature elements- Returns:
thisbuilder for use in a chained invocation
-
addParameters
Adds one element toparameterslist.- Parameters:
element- A parameters element- Returns:
thisbuilder for use in a chained invocation
-
addParameters
Adds elements toparameterslist.- Parameters:
elements- An array of parameters elements- Returns:
thisbuilder for use in a chained invocation
-
addAllParameters
public final Structurizer.Statement.Builder addAllParameters(Iterable<? extends Code.Term> elements) Adds elements toparameterslist.- Parameters:
elements- An iterable of parameters elements- Returns:
thisbuilder for use in a chained invocation
-
addExpression
Adds one element toexpressionlist.- Parameters:
element- A expression element- Returns:
thisbuilder for use in a chained invocation
-
addExpression
Adds elements toexpressionlist.- Parameters:
elements- An array of expression elements- Returns:
thisbuilder for use in a chained invocation
-
addAllExpression
public final Structurizer.Statement.Builder addAllExpression(Iterable<? extends Code.Term> elements) Adds elements toexpressionlist.- Parameters:
elements- An iterable of expression elements- Returns:
thisbuilder for use in a chained invocation
-
addBlock
Adds one element toblocklist.- Parameters:
element- A block element- Returns:
thisbuilder for use in a chained invocation
-
addBlock
Adds elements toblocklist.- Parameters:
elements- An array of block elements- Returns:
thisbuilder for use in a chained invocation
-
addAllBlock
Adds elements toblocklist.- Parameters:
elements- An iterable of block elements- Returns:
thisbuilder for use in a chained invocation
-
addDefinitions
Adds one element todefinitionslist.- Parameters:
element- A definitions element- Returns:
thisbuilder for use in a chained invocation
-
addDefinitions
Adds elements todefinitionslist.- Parameters:
elements- An array of definitions elements- Returns:
thisbuilder for use in a chained invocation
-
addAllDefinitions
public final Structurizer.Statement.Builder addAllDefinitions(Iterable<? extends Structurizer.Statement> elements) Adds elements todefinitionslist.- Parameters:
elements- An iterable of definitions elements- Returns:
thisbuilder for use in a chained invocation
-
name
Initializes the value for thenameattribute.If not set, this attribute will have a default value as returned by the initializer of
name.- Parameters:
name- The value for name- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newStatement.- Returns:
- An immutable instance of Statement
- Throws:
IllegalStateException- if any required attributes are missing
-
nameIsSet
private boolean nameIsSet() -
checkNotIsSet
-