Class AvroCodeGenProviderBase.AvroOptions

    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) boolean createOptionalGetters
      The createOptionalGetters parameter enables generating the getOptional...
      (package private) boolean createSetters
      Determines whether or not to create setters for the fields of the record.
      (package private) List<String> customConversions
      A list of custom converter classes to register on the avro compiler.
      (package private) boolean enableDecimalLogicalType
      Determines whether or not to use Java classes for decimal types, defaults to false
      (package private) boolean gettersReturnOptional
      The gettersReturnOptional parameter enables generating get...
      (package private) String[] imports
      A list of files or directories that should be compiled first thus making them importable by subsequently compiled schemas.
      (package private) boolean optionalGettersForNullableFieldsOnly
      The optionalGettersForNullableFieldsOnly parameter works in conjunction with gettersReturnOptional option.
      (package private) org.apache.avro.generic.GenericData.StringType stringType
      The Java type to use for Avro strings.
    • Constructor Summary

      Constructors 
      Constructor Description
      AvroOptions​(org.eclipse.microprofile.config.Config config)  
    • Field Detail

      • 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+.
      • customConversions

        final List<String> customConversions
        A list of custom converter classes to register on the avro compiler. Conversions.UUIDConversion is registered by default.

        Passed as a comma-separated list.

    • Constructor Detail

      • AvroOptions

        AvroOptions​(org.eclipse.microprofile.config.Config config)