use of net.morimekta.providence.generator.format.java.shared.MessageMemberFormatter in project providence by morimekta.
the class JavaMessageFormatter method getFormatters.
private static List<MessageMemberFormatter> getFormatters(IndentedPrintWriter writer, JHelper helper, GeneratorOptions generatorOptions, JavaOptions javaOptions) {
ImmutableList.Builder<MessageMemberFormatter> builderFormatters = ImmutableList.builder();
builderFormatters.add(new BuilderCommonMemberFormatter(writer, helper)).add(new BuilderCoreOverridesFormatter(writer, helper));
if (javaOptions.hazelcast_portable) {
builderFormatters.add(new HazelcastPortableMessageFormatter(writer, helper));
}
ImmutableList.Builder<MessageMemberFormatter> formatters = ImmutableList.builder();
formatters.add(new CommonMemberFormatter(writer, helper, generatorOptions, javaOptions)).add(new CoreOverridesFormatter(writer)).add(new CommonOverridesFormatter(writer)).add(new BinarySerializableFormatter(writer, helper));
if (javaOptions.android) {
formatters.add(new AndroidMessageFormatter(writer));
}
if (javaOptions.jackson) {
formatters.add(new JacksonMessageFormatter(writer, helper));
}
if (javaOptions.rw_binary) {
formatters.add(new BinaryWriterFormatter(writer, helper));
builderFormatters.add(new BinaryReaderBuilderFormatter(writer, helper));
}
formatters.add(new CommonBuilderFormatter(writer, helper, builderFormatters.build()));
return formatters.build();
}
Aggregations