Class AvroCodeGenProviderBase.AvroOptions

    • Field Detail

      • EMPTY

        public static final String[] EMPTY
      • imports

        final String[] imports
        A list of files or directories that should be compiled first thus making them importable by subsequently compiled schemas. Note that imported files should not reference each other.

        All paths should be relative to the src/[main|test]/avro directory

        Passed as a comma-separated list.

      • stringType

        final org.apache.avro.generic.GenericData.StringType stringType
        The Java type to use for Avro strings. May be one of CharSequence, String or Utf8. CharSequence by default.
      • createOptionalGetters

        final boolean createOptionalGetters
        The createOptionalGetters parameter enables generating the getOptional... methods that return an Optional of the requested type. This works ONLY on Java 8+
      • enableDecimalLogicalType

        final boolean enableDecimalLogicalType
        Determines whether or not to use Java classes for decimal types, defaults to false
      • createSetters

        final boolean createSetters
        Determines whether or not to create setters for the fields of the record. The default is to create setters.
      • gettersReturnOptional

        final boolean gettersReturnOptional
        The gettersReturnOptional parameter enables generating get... methods that return an Optional of the requested type. This will replace the This works ONLY on Java 8+
      • optionalGettersForNullableFieldsOnly

        final boolean optionalGettersForNullableFieldsOnly
        The optionalGettersForNullableFieldsOnly parameter works in conjunction with gettersReturnOptional option. If it is set, Optional getters will be generated only for fields that are nullable. If the field is mandatory, regular getter will be generated. This works ONLY on Java 8+.