Search in sources :

Example 1 with CommonOverridesFormatter

use of net.morimekta.providence.generator.format.java.messages.CommonOverridesFormatter 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();
}
Also used : BuilderCoreOverridesFormatter(net.morimekta.providence.generator.format.java.messages.BuilderCoreOverridesFormatter) HazelcastPortableMessageFormatter(net.morimekta.providence.generator.format.java.messages.extras.HazelcastPortableMessageFormatter) ImmutableList(com.google.common.collect.ImmutableList) BinaryWriterFormatter(net.morimekta.providence.generator.format.java.messages.extras.BinaryWriterFormatter) MessageMemberFormatter(net.morimekta.providence.generator.format.java.shared.MessageMemberFormatter) JacksonMessageFormatter(net.morimekta.providence.generator.format.java.messages.extras.JacksonMessageFormatter) AndroidMessageFormatter(net.morimekta.providence.generator.format.java.messages.extras.AndroidMessageFormatter) BinaryReaderBuilderFormatter(net.morimekta.providence.generator.format.java.messages.extras.BinaryReaderBuilderFormatter) BuilderCommonMemberFormatter(net.morimekta.providence.generator.format.java.messages.BuilderCommonMemberFormatter) CommonMemberFormatter(net.morimekta.providence.generator.format.java.messages.CommonMemberFormatter) BuilderCommonMemberFormatter(net.morimekta.providence.generator.format.java.messages.BuilderCommonMemberFormatter) CommonOverridesFormatter(net.morimekta.providence.generator.format.java.messages.CommonOverridesFormatter) CoreOverridesFormatter(net.morimekta.providence.generator.format.java.messages.CoreOverridesFormatter) BuilderCoreOverridesFormatter(net.morimekta.providence.generator.format.java.messages.BuilderCoreOverridesFormatter) BinarySerializableFormatter(net.morimekta.providence.generator.format.java.messages.extras.BinarySerializableFormatter) CommonBuilderFormatter(net.morimekta.providence.generator.format.java.messages.CommonBuilderFormatter)

Aggregations

ImmutableList (com.google.common.collect.ImmutableList)1 BuilderCommonMemberFormatter (net.morimekta.providence.generator.format.java.messages.BuilderCommonMemberFormatter)1 BuilderCoreOverridesFormatter (net.morimekta.providence.generator.format.java.messages.BuilderCoreOverridesFormatter)1 CommonBuilderFormatter (net.morimekta.providence.generator.format.java.messages.CommonBuilderFormatter)1 CommonMemberFormatter (net.morimekta.providence.generator.format.java.messages.CommonMemberFormatter)1 CommonOverridesFormatter (net.morimekta.providence.generator.format.java.messages.CommonOverridesFormatter)1 CoreOverridesFormatter (net.morimekta.providence.generator.format.java.messages.CoreOverridesFormatter)1 AndroidMessageFormatter (net.morimekta.providence.generator.format.java.messages.extras.AndroidMessageFormatter)1 BinaryReaderBuilderFormatter (net.morimekta.providence.generator.format.java.messages.extras.BinaryReaderBuilderFormatter)1 BinarySerializableFormatter (net.morimekta.providence.generator.format.java.messages.extras.BinarySerializableFormatter)1 BinaryWriterFormatter (net.morimekta.providence.generator.format.java.messages.extras.BinaryWriterFormatter)1 HazelcastPortableMessageFormatter (net.morimekta.providence.generator.format.java.messages.extras.HazelcastPortableMessageFormatter)1 JacksonMessageFormatter (net.morimekta.providence.generator.format.java.messages.extras.JacksonMessageFormatter)1 MessageMemberFormatter (net.morimekta.providence.generator.format.java.shared.MessageMemberFormatter)1