code: private void avroCompile(String avroSchemaSource, File avroSchemaFile,
              File javaTargetFolder) throws IOException {
  
          log.debug("Avro compiler started for: {}", avroSchemaFile);
  
          Schema.Parser parser = new Schema.Parser();
          Schema schema = parser.parse(avroSchemaSource);
          SpecificCompiler compiler = new CustomSpecificCompiler(schema);
          compiler.setStringType(StringType.CharSequence);
          compiler.compileToDestination(avroSchemaFile, javaTargetFolder);
  
          log.debug("Avro compiler ended for: {}", avroSchemaFile);
      }
docs: Given an Avro schema produce java specific classes.
  
  @param avroSchemaFile the Avro schema file (used by avro for timestamp
  checking)
  @param avroSchemaSource the Avro schema source
  @param javaTargetFolder the target folder for java classes
  @throws IOException if compilation fails