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().

  • Field Details

    • processing

      private final ProcessingEnvironment processing
    • round

      private final RoundEnvironment round
    • annotations

      private final com.google.common.collect.ImmutableSet<TypeElement> annotations
    • customImmutableAnnotations

      private final com.google.common.collect.ImmutableSet<String> customImmutableAnnotations
    • composer

      private final transient ValueTypeComposer composer
    • lazyInitBitmap

      private transient volatile long lazyInitBitmap
    • ENVIRONMENT_LAZY_INIT_BIT

      private static final long ENVIRONMENT_LAZY_INIT_BIT
      See Also:
    • environment

      private transient Proto.Environment environment
  • Constructor Details

  • Method Details

    • processing

      public ProcessingEnvironment processing()
      Specified by:
      processing in class Round
      Returns:
      The value of the processing attribute
    • round

      public RoundEnvironment round()
      Specified by:
      round in class Round
      Returns:
      The value of the round attribute
    • annotations

      public com.google.common.collect.ImmutableSet<TypeElement> annotations()
      Specified by:
      annotations in class Round
      Returns:
      The value of the annotations attribute
    • customImmutableAnnotations

      public com.google.common.collect.ImmutableSet<String> customImmutableAnnotations()
      Specified by:
      customImmutableAnnotations in class Round
      Returns:
      The value of the customImmutableAnnotations attribute
    • composer

      ValueTypeComposer composer()
      Overrides:
      composer in class Round
      Returns:
      The computed-at-construction value of the composer attribute
    • withProcessing

      public final ImmutableRound withProcessing(ProcessingEnvironment value)
      Copy the current immutable object by setting a value for the processing attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for processing
      Returns:
      A modified copy of the this object
    • withRound

      public final ImmutableRound withRound(RoundEnvironment value)
      Copy the current immutable object by setting a value for the round attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for round
      Returns:
      A modified copy of the this object
    • withAnnotations

      public final ImmutableRound withAnnotations(TypeElement... elements)
      Copy the current immutable object with elements that replace the content of annotations.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withAnnotations

      public final ImmutableRound withAnnotations(Iterable<? extends TypeElement> elements)
      Copy the current immutable object with elements that replace the content of annotations. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of annotations elements to set
      Returns:
      A modified copy of this object
    • withCustomImmutableAnnotations

      public final ImmutableRound withCustomImmutableAnnotations(String... elements)
      Copy the current immutable object with elements that replace the content of customImmutableAnnotations.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withCustomImmutableAnnotations

      public final ImmutableRound withCustomImmutableAnnotations(Iterable<String> elements)
      Copy the current immutable object with elements that replace the content of customImmutableAnnotations. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of customImmutableAnnotations elements to set
      Returns:
      A modified copy of this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutableRound that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • equalTo

      private boolean equalTo(int synthetic, ImmutableRound another)
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: processing, round, annotations, customImmutableAnnotations, composer.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value Round with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • environment

      public Proto.Environment environment()

      Returns a lazily initialized value of the environment attribute. 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:
      environment in class Round
      Returns:
      A lazily initialized value of the environment attribute
    • copyOf

      public static ImmutableRound copyOf(Round instance)
      Creates an immutable copy of a Round value. 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

      public static ImmutableRound.Builder builder()
      Creates a builder for ImmutableRound.
       ImmutableRound.builder()
          .processing(javax.annotation.processing.ProcessingEnvironment) // required processing
          .round(javax.annotation.processing.RoundEnvironment) // required round
          .addAnnotations|addAllAnnotations(javax.lang.model.element.TypeElement) // annotations elements
          .addCustomImmutableAnnotations|addAllCustomImmutableAnnotations(String) // customImmutableAnnotations elements
          .build();
       
      Returns:
      A new ImmutableRound builder