Class ImmutableRound.Builder

  • Enclosing class:
    ImmutableRound

    @NotThreadSafe
    public static final class ImmutableRound.Builder
    extends java.lang.Object
    Builds instances of type ImmutableRound. 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 Detail

      • 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
    • Constructor Detail

      • Builder

        private Builder()
    • Method Detail

      • processing

        public final ImmutableRound.Builder processing​(javax.annotation.processing.ProcessingEnvironment processing)
        Initializes the value for the processing attribute.
        Parameters:
        processing - The value for processing
        Returns:
        this builder for use in a chained invocation
      • round

        public final ImmutableRound.Builder round​(javax.annotation.processing.RoundEnvironment round)
        Initializes the value for the round attribute.
        Parameters:
        round - The value for round
        Returns:
        this builder for use in a chained invocation
      • addAnnotations

        public final ImmutableRound.Builder addAnnotations​(javax.lang.model.element.TypeElement element)
        Adds one element to annotations set.
        Parameters:
        element - A annotations element
        Returns:
        this builder for use in a chained invocation
      • addAnnotations

        public final ImmutableRound.Builder addAnnotations​(javax.lang.model.element.TypeElement... elements)
        Adds elements to annotations set.
        Parameters:
        elements - An array of annotations elements
        Returns:
        this builder for use in a chained invocation
      • addAllAnnotations

        public final ImmutableRound.Builder addAllAnnotations​(java.lang.Iterable<? extends javax.lang.model.element.TypeElement> elements)
        Adds elements to annotations set.
        Parameters:
        elements - An iterable of annotations elements
        Returns:
        this builder for use in a chained invocation
      • addCustomImmutableAnnotations

        public final ImmutableRound.Builder addCustomImmutableAnnotations​(java.lang.String element)
        Adds one element to customImmutableAnnotations set.
        Parameters:
        element - A customImmutableAnnotations element
        Returns:
        this builder for use in a chained invocation
      • addCustomImmutableAnnotations

        public final ImmutableRound.Builder addCustomImmutableAnnotations​(java.lang.String... elements)
        Adds elements to customImmutableAnnotations set.
        Parameters:
        elements - An array of customImmutableAnnotations elements
        Returns:
        this builder for use in a chained invocation
      • addAllCustomImmutableAnnotations

        public final ImmutableRound.Builder addAllCustomImmutableAnnotations​(java.lang.Iterable<java.lang.String> elements)
        Adds elements to customImmutableAnnotations set.
        Parameters:
        elements - An iterable of customImmutableAnnotations elements
        Returns:
        this builder for use in a chained invocation
      • build

        public ImmutableRound build()
        Builds a new ImmutableRound.
        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()