Mark,
I usually use SpringEL when creating a protobuf using Spring XML; like this:
<property
name="foobar"
value="#{
T(your.protobuf.package.OuterType$MsgType).newBuilder().setField1( "foo"
).setField2( "bar" ).build() }"/>
See
http://static.springsource.org/spring/docs/3.2.x/spring-framework-reference/html/expressions.html
for
some details on SpringEL.
On Monday, February 25, 2013 11:20:23 AM UTC-5, Mark wrote:
> In Java I can do the following:
>
> MyObject.Builder builder = MyObject.newBuilder();
> builder.setXXX(...);
> builder.setYYY(...);
> MyObject obj = builder.build();
>
> I would like to perform these tasks in Spring so that I can inject an
> instance into another class. What is the easiest way to perform this task
> using XML?
>
> Thanks,
> Mark
>
>
--
You received this message because you are subscribed to the Google Groups
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/protobuf?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.