@Test public void serializeMessageByClass() { Buffer buffer = newBuffer(); provider.getSerializer(DummyMessage.class).serialize(testMessage, buffer); assertThat(toBytes(buffer), equalTo(testMessageBytes)); }
@Override public <T> StreamingSerializer getSerializer(final Class<T> classToSerialize) { requireMessageLite(classToSerialize); return new ProtobufSerializer(); }
ProtobufSerializationProvider implements SerializationProvider { @Override public <T> StreamingSerializer getSerializer(final Class<T> classToSerialize) { requireMessageLite(classToSerialize); return new ProtobufSerializer(); } }
ProtobufSerializationProvider implements SerializationProvider { @Override public <T> StreamingSerializer getSerializer(final Class<T> classToSerialize) { requireMessageLite(classToSerialize); return new ProtobufSerializer(); } ProtobufSerializationProvider();  ProtobufSerializationProvider(final Function<Class<?>, Parser<?>> parserForClass); }
ProtobufSerializationProvider implements SerializationProvider { @Override public <T> StreamingSerializer getSerializer(final Class<T> classToSerialize) { requireMessageLite(classToSerialize); return new ProtobufSerializer(); } ProtobufSerializationProvider();  ProtobufSerializationProvider(final Function<Class<?>, Parser<?>> parserForClass); @Override StreamingSerializer getSerializer(final Class<T> classToSerialize); @Override StreamingSerializer getSerializer(final TypeHolder<T> typeToSerialize); @Override @SuppressWarnings("unchecked") StreamingDeserializer<T> getDeserializer(final Class<T> classToDeSerialize); @Override StreamingDeserializer<T> getDeserializer(final TypeHolder<T> typeToDeserialize); }
ProtobufSerializationProvider implements SerializationProvider { @Override public <T> StreamingSerializer getSerializer(final Class<T> classToSerialize) { requireMessageLite(classToSerialize); return new ProtobufSerializer(); } ProtobufSerializationProvider();  ProtobufSerializationProvider(final Function<Class<?>, Parser<?>> parserForClass); @Override StreamingSerializer getSerializer(final Class<T> classToSerialize); @Override StreamingSerializer getSerializer(final TypeHolder<T> typeToSerialize); @Override @SuppressWarnings("unchecked") StreamingDeserializer<T> getDeserializer(final Class<T> classToDeSerialize); @Override StreamingDeserializer<T> getDeserializer(final TypeHolder<T> typeToDeserialize);  }