Class ImmutableRound
java.lang.Object
org.immutables.value.processor.meta.Round
org.immutables.value.processor.meta.ImmutableRound
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class ImmutableRound
extends Round
Immutable implementation of
Round.
Use the builder to create immutable instances:
ImmutableRound.builder().
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final com.google.common.collect.ImmutableSet<TypeElement> private final ValueTypeComposerprivate final com.google.common.collect.ImmutableSet<String> private Proto.Environmentprivate static final longprivate longprivate final ProcessingEnvironmentprivate final RoundEnvironment -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateImmutableRound(ProcessingEnvironment processing, RoundEnvironment round, com.google.common.collect.ImmutableSet<TypeElement> annotations, com.google.common.collect.ImmutableSet<String> customImmutableAnnotations) -
Method Summary
Modifier and TypeMethodDescriptioncom.google.common.collect.ImmutableSet<TypeElement> static ImmutableRound.Builderbuilder()Creates a builder forImmutableRound.(package private) ValueTypeComposercomposer()static ImmutableRoundCreates an immutable copy of aRoundvalue.com.google.common.collect.ImmutableSet<String> booleanThis instance is equal to all instances ofImmutableRoundthat have equal attribute values.private booleanequalTo(int synthetic, ImmutableRound another) inthashCode()Computes a hash code from attributes:processing,round,annotations,customImmutableAnnotations,composer.round()toString()Prints the immutable valueRoundwith attribute values.final ImmutableRoundwithAnnotations(Iterable<? extends TypeElement> elements) Copy the current immutable object with elements that replace the content ofannotations.final ImmutableRoundwithAnnotations(TypeElement... elements) Copy the current immutable object with elements that replace the content ofannotations.final ImmutableRoundwithCustomImmutableAnnotations(Iterable<String> elements) Copy the current immutable object with elements that replace the content ofcustomImmutableAnnotations.final ImmutableRoundwithCustomImmutableAnnotations(String... elements) Copy the current immutable object with elements that replace the content ofcustomImmutableAnnotations.final ImmutableRoundCopy the current immutable object by setting a value for theprocessingattribute.final ImmutableRoundwithRound(RoundEnvironment value) Copy the current immutable object by setting a value for theroundattribute.Methods inherited from class org.immutables.value.processor.meta.Round
collectProtoclasses, collectValues, composeValue, declaringTypeFrom, inferDeclaringTypeFor, protoclassesFrom, wrapElement, wrapElement, wrapElement
-
Field Details
-
processing
-
round
-
annotations
-
customImmutableAnnotations
-
composer
-
lazyInitBitmap
private transient volatile long lazyInitBitmap -
ENVIRONMENT_LAZY_INIT_BIT
private static final long ENVIRONMENT_LAZY_INIT_BIT- See Also:
-
environment
-
-
Constructor Details
-
ImmutableRound
private ImmutableRound(ProcessingEnvironment processing, RoundEnvironment round, com.google.common.collect.ImmutableSet<TypeElement> annotations, com.google.common.collect.ImmutableSet<String> customImmutableAnnotations)
-
-
Method Details
-
processing
- Specified by:
processingin classRound- Returns:
- The value of the
processingattribute
-
round
-
annotations
- Specified by:
annotationsin classRound- Returns:
- The value of the
annotationsattribute
-
customImmutableAnnotations
- Specified by:
customImmutableAnnotationsin classRound- Returns:
- The value of the
customImmutableAnnotationsattribute
-
composer
ValueTypeComposer composer() -
withProcessing
Copy the current immutable object by setting a value for theprocessingattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for processing- Returns:
- A modified copy of the
thisobject
-
withRound
Copy the current immutable object by setting a value for theroundattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for round- Returns:
- A modified copy of the
thisobject
-
withAnnotations
Copy the current immutable object with elements that replace the content ofannotations.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withAnnotations
Copy the current immutable object with elements that replace the content ofannotations. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of annotations elements to set- Returns:
- A modified copy of
thisobject
-
withCustomImmutableAnnotations
Copy the current immutable object with elements that replace the content ofcustomImmutableAnnotations.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withCustomImmutableAnnotations
Copy the current immutable object with elements that replace the content ofcustomImmutableAnnotations. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of customImmutableAnnotations elements to set- Returns:
- A modified copy of
thisobject
-
equals
This instance is equal to all instances ofImmutableRoundthat have equal attribute values. -
equalTo
-
hashCode
public int hashCode()Computes a hash code from attributes:processing,round,annotations,customImmutableAnnotations,composer. -
toString
Prints the immutable valueRoundwith attribute values. -
environment
Returns a lazily initialized value of the
environmentattribute. Initialized once and only once and stored for subsequent access with proper synchronization. In case of any exception or error thrown by the lazy value initializer, the result will not be memoised (i.e. remembered) and on next call computation will be attempted again.- Overrides:
environmentin classRound- Returns:
- A lazily initialized value of the
environmentattribute
-
copyOf
Creates an immutable copy of aRoundvalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable Round instance
-
builder
Creates a builder forImmutableRound.ImmutableRound.builder() .processing(javax.annotation.processing.ProcessingEnvironment) // requiredprocessing.round(javax.annotation.processing.RoundEnvironment) // requiredround.addAnnotations|addAllAnnotations(javax.lang.model.element.TypeElement) //annotationselements .addCustomImmutableAnnotations|addAllCustomImmutableAnnotations(String) //customImmutableAnnotationselements .build();- Returns:
- A new ImmutableRound builder
-