Class ImmutableAnnotation.Builder

  • Enclosing class:
    ImmutableAnnotation

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

    • Method Detail

      • from

        @CanIgnoreReturnValue
        public final ImmutableAnnotation.Builder from​(Annotation instance)
        Fill a builder with attribute values from the provided Annotation instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.
        Parameters:
        instance - The instance from which to copy values
        Returns:
        this builder for use in a chained invocation
      • path

        @CanIgnoreReturnValue
        public final ImmutableAnnotation.Builder path​(String path)
        Initializes the value for the path attribute.
        Parameters:
        path - The value for path
        Returns:
        this builder for use in a chained invocation
      • blobHref

        @CanIgnoreReturnValue
        public final ImmutableAnnotation.Builder blobHref​(String blobHref)
        Initializes the optional value blobHref to blobHref.
        Parameters:
        blobHref - The value for blobHref
        Returns:
        this builder for chained invocation
      • blobHref

        @CanIgnoreReturnValue
        public final ImmutableAnnotation.Builder blobHref​(Optional<String> blobHref)
        Initializes the optional value blobHref to blobHref.
        Parameters:
        blobHref - The value for blobHref
        Returns:
        this builder for use in a chained invocation
      • annotationLevel

        @CanIgnoreReturnValue
        public final ImmutableAnnotation.Builder annotationLevel​(AnnotationLevel annotationLevel)
        Initializes the value for the annotationLevel attribute.
        Parameters:
        annotationLevel - The value for annotationLevel
        Returns:
        this builder for use in a chained invocation
      • message

        @CanIgnoreReturnValue
        public final ImmutableAnnotation.Builder message​(String message)
        Initializes the value for the message attribute.
        Parameters:
        message - The value for message
        Returns:
        this builder for use in a chained invocation
      • title

        @CanIgnoreReturnValue
        public final ImmutableAnnotation.Builder title​(String title)
        Initializes the optional value title to title.
        Parameters:
        title - The value for title
        Returns:
        this builder for chained invocation
      • title

        @CanIgnoreReturnValue
        public final ImmutableAnnotation.Builder title​(Optional<String> title)
        Initializes the optional value title to title.
        Parameters:
        title - The value for title
        Returns:
        this builder for use in a chained invocation
      • rawDetails

        @CanIgnoreReturnValue
        public final ImmutableAnnotation.Builder rawDetails​(String rawDetails)
        Initializes the optional value rawDetails to rawDetails.
        Parameters:
        rawDetails - The value for rawDetails
        Returns:
        this builder for chained invocation
      • rawDetails

        @CanIgnoreReturnValue
        public final ImmutableAnnotation.Builder rawDetails​(Optional<String> rawDetails)
        Initializes the optional value rawDetails to rawDetails.
        Parameters:
        rawDetails - The value for rawDetails
        Returns:
        this builder for use in a chained invocation
      • startLine

        @CanIgnoreReturnValue
        public final ImmutableAnnotation.Builder startLine​(int startLine)
        Initializes the value for the startLine attribute.
        Parameters:
        startLine - The value for startLine
        Returns:
        this builder for use in a chained invocation
      • endLine

        @CanIgnoreReturnValue
        public final ImmutableAnnotation.Builder endLine​(int endLine)
        Initializes the value for the endLine attribute.
        Parameters:
        endLine - The value for endLine
        Returns:
        this builder for use in a chained invocation
      • startColumn

        @CanIgnoreReturnValue
        public final ImmutableAnnotation.Builder startColumn​(int startColumn)
        Initializes the optional value startColumn to startColumn.
        Parameters:
        startColumn - The value for startColumn
        Returns:
        this builder for chained invocation
      • startColumn

        @CanIgnoreReturnValue
        public final ImmutableAnnotation.Builder startColumn​(Optional<Integer> startColumn)
        Initializes the optional value startColumn to startColumn.
        Parameters:
        startColumn - The value for startColumn
        Returns:
        this builder for use in a chained invocation
      • endColumn

        @CanIgnoreReturnValue
        public final ImmutableAnnotation.Builder endColumn​(int endColumn)
        Initializes the optional value endColumn to endColumn.
        Parameters:
        endColumn - The value for endColumn
        Returns:
        this builder for chained invocation
      • endColumn

        @CanIgnoreReturnValue
        public final ImmutableAnnotation.Builder endColumn​(Optional<Integer> endColumn)
        Initializes the optional value endColumn to endColumn.
        Parameters:
        endColumn - The value for endColumn
        Returns:
        this builder for use in a chained invocation