I have this property in a class:
private final List<KafkaInterface<EventWhateverDTO>> producers;
Code of interface:
public interface KafkaInterface<T> {
void produceEvent(Map<String, String> headers, T event);
void produceEvent(String topic, Map<String, String> headers, T event);
default List<String> getActions() {
return Collections.emptyList();
}
default Class<T> getEvetTypeClass() {
return null;
}
}
and the class
import org.apache.avro.message.SchemaStore;
import org.apache.avro.specific.AvroGenerated;
import org.apache.avro.specific.SpecificData;
import org.apache.avro.specific.SpecificRecord;
import org.apache.avro.specific.SpecificRecordBase;
import org.apache.avro.specific.SpecificRecordBuilderBase;
@AvroGenerated
public class EventWhateverDTO extends SpecificRecordBase implements SpecificRecord {
...
}
I'm using:
log.info(String.format("producers: %s.", producers));
What would be the suitable way to print the list?