org.springframework.batch.item.avro.builder

## Class AvroItemWriterBuilder<T>

- java.lang.Object
- - org.springframework.batch.item.avro.builder.AvroItemWriterBuilder<T>

-     public class AvroItemWriterBuilder<T>
      extends java.lang.Object

  A builder implementation for the `AvroItemWriter`.
  Since:
    4.2
  Author:
    David Turanski, Mahmoud Ben Hassine

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AvroItemWriterBuilder()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `AvroItemWriter<T>` | `build()` Build an instance of `AvroItemWriter`.
    `AvroItemWriterBuilder<T>` | `name(java.lang.String name)` The name used to calculate the key within the `ExecutionContext`.
    `AvroItemWriterBuilder<T>` | `resource(org.springframework.core.io.WritableResource resource)`
    `AvroItemWriterBuilder<T>` | `schema(org.springframework.core.io.Resource schema)`
    `AvroItemWriterBuilder<T>` | `schema(java.lang.String schemaString)`
    `AvroItemWriterBuilder<T>` | `type(java.lang.Class<T> type)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### AvroItemWriterBuilder

          public AvroItemWriterBuilder()

  - ### Method Detail

    - #### resource

          public AvroItemWriterBuilder<T> resource(org.springframework.core.io.WritableResource resource)

      Parameters:
        `resource` - the `WritableResource` used to write the serialized data.
      Returns:
        The current instance of the builder.

    - #### schema

          public AvroItemWriterBuilder<T> schema(org.springframework.core.io.Resource schema)

      Parameters:
        `schema` - the Resource containing the schema JSON used to serialize the output.
      Returns:
        The current instance of the builder.

    - #### schema

          public AvroItemWriterBuilder<T> schema(java.lang.String schemaString)

      Parameters:
        `schemaString` - the String containing the schema JSON used to serialize the output.
      Returns:
        The current instance of the builder.

    - #### type

          public AvroItemWriterBuilder<T> type(java.lang.Class<T> type)

      Parameters:
        `type` - the Class of objects to be serialized.
      Returns:
        The current instance of the builder.

    - #### name

          public AvroItemWriterBuilder<T> name(java.lang.String name)

      The name used to calculate the key within the `ExecutionContext`.
      Parameters:
        `name` - name of the reader instance
      Returns:
        The current instance of the builder.
      See Also:
        `ItemStreamSupport.setName(String)`

    - #### build

          public AvroItemWriter<T> build()

      Build an instance of `AvroItemWriter`.
      Returns:
        the instance;