Class ImmutableRound.Builder
- java.lang.Object
-
- org.immutables.value.processor.meta.ImmutableRound.Builder
-
- Enclosing class:
- ImmutableRound
@NotThreadSafe public static final class ImmutableRound.Builder extends java.lang.ObjectBuilds instances of typeImmutableRound. 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.collect.ImmutableSet.Builder<javax.lang.model.element.TypeElement>annotationsprivate com.google.common.collect.ImmutableSet.Builder<java.lang.String>customImmutableAnnotationsprivate static longINIT_BIT_PROCESSINGprivate static longINIT_BIT_ROUNDprivate longinitBitsprivate javax.annotation.processing.ProcessingEnvironmentprocessingprivate javax.annotation.processing.RoundEnvironmentround
-
Constructor Summary
Constructors Modifier Constructor Description privateBuilder()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ImmutableRound.BuilderaddAllAnnotations(java.lang.Iterable<? extends javax.lang.model.element.TypeElement> elements)Adds elements toannotationsset.ImmutableRound.BuilderaddAllCustomImmutableAnnotations(java.lang.Iterable<java.lang.String> elements)Adds elements tocustomImmutableAnnotationsset.ImmutableRound.BuilderaddAnnotations(javax.lang.model.element.TypeElement element)Adds one element toannotationsset.ImmutableRound.BuilderaddAnnotations(javax.lang.model.element.TypeElement... elements)Adds elements toannotationsset.ImmutableRound.BuilderaddCustomImmutableAnnotations(java.lang.String element)Adds one element tocustomImmutableAnnotationsset.ImmutableRound.BuilderaddCustomImmutableAnnotations(java.lang.String... elements)Adds elements tocustomImmutableAnnotationsset.ImmutableRoundbuild()Builds a newImmutableRound.private static voidcheckNotIsSet(boolean isSet, java.lang.String name)private voidcheckRequiredAttributes()private java.lang.StringformatRequiredAttributesMessage()ImmutableRound.Builderprocessing(javax.annotation.processing.ProcessingEnvironment processing)Initializes the value for theprocessingattribute.private booleanprocessingIsSet()ImmutableRound.Builderround(javax.annotation.processing.RoundEnvironment round)Initializes the value for theroundattribute.private booleanroundIsSet()
-
-
-
Field Detail
-
INIT_BIT_PROCESSING
private static final long INIT_BIT_PROCESSING
- See Also:
- Constant Field Values
-
INIT_BIT_ROUND
private static final long INIT_BIT_ROUND
- See Also:
- Constant Field Values
-
initBits
private long initBits
-
processing
@Nullable private javax.annotation.processing.ProcessingEnvironment processing
-
round
@Nullable private javax.annotation.processing.RoundEnvironment round
-
annotations
private final com.google.common.collect.ImmutableSet.Builder<javax.lang.model.element.TypeElement> annotations
-
customImmutableAnnotations
private final com.google.common.collect.ImmutableSet.Builder<java.lang.String> customImmutableAnnotations
-
-
Method Detail
-
processing
public final ImmutableRound.Builder processing(javax.annotation.processing.ProcessingEnvironment processing)
Initializes the value for theprocessingattribute.- Parameters:
processing- The value for processing- Returns:
thisbuilder for use in a chained invocation
-
round
public final ImmutableRound.Builder round(javax.annotation.processing.RoundEnvironment round)
Initializes the value for theroundattribute.- Parameters:
round- The value for round- Returns:
thisbuilder for use in a chained invocation
-
addAnnotations
public final ImmutableRound.Builder addAnnotations(javax.lang.model.element.TypeElement element)
Adds one element toannotationsset.- Parameters:
element- A annotations element- Returns:
thisbuilder for use in a chained invocation
-
addAnnotations
public final ImmutableRound.Builder addAnnotations(javax.lang.model.element.TypeElement... elements)
Adds elements toannotationsset.- Parameters:
elements- An array of annotations elements- Returns:
thisbuilder for use in a chained invocation
-
addAllAnnotations
public final ImmutableRound.Builder addAllAnnotations(java.lang.Iterable<? extends javax.lang.model.element.TypeElement> elements)
Adds elements toannotationsset.- Parameters:
elements- An iterable of annotations elements- Returns:
thisbuilder for use in a chained invocation
-
addCustomImmutableAnnotations
public final ImmutableRound.Builder addCustomImmutableAnnotations(java.lang.String element)
Adds one element tocustomImmutableAnnotationsset.- Parameters:
element- A customImmutableAnnotations element- Returns:
thisbuilder for use in a chained invocation
-
addCustomImmutableAnnotations
public final ImmutableRound.Builder addCustomImmutableAnnotations(java.lang.String... elements)
Adds elements tocustomImmutableAnnotationsset.- Parameters:
elements- An array of customImmutableAnnotations elements- Returns:
thisbuilder for use in a chained invocation
-
addAllCustomImmutableAnnotations
public final ImmutableRound.Builder addAllCustomImmutableAnnotations(java.lang.Iterable<java.lang.String> elements)
Adds elements tocustomImmutableAnnotationsset.- Parameters:
elements- An iterable of customImmutableAnnotations elements- Returns:
thisbuilder for use in a chained invocation
-
build
public ImmutableRound build()
Builds a newImmutableRound.- Returns:
- An immutable instance of Round
- Throws:
java.lang.IllegalStateException- if any required attributes are missing
-
processingIsSet
private boolean processingIsSet()
-
roundIsSet
private boolean roundIsSet()
-
checkNotIsSet
private static void checkNotIsSet(boolean isSet, java.lang.String name)
-
checkRequiredAttributes
private void checkRequiredAttributes()
-
formatRequiredAttributesMessage
private java.lang.String formatRequiredAttributesMessage()
-
-