Protobufs reflection support allows you to do this. We don't have a
walkthrough, but you can create types dynamically using the Descriptors
classes along with DynamicMessage. You can build the definitions you want
into a FileDescriptorProto (along with any dependencies it may have) and
call Descriptors.FileDescriptor.buildFrom(). This will give you descriptor
objects that you can pass to DynamicMessage.

On Thu, Apr 14, 2011 at 10:50 AM, Robert <robert.panzer...@googlemail.com>wrote:

> Hi,
>
> I am new to the protocol buffers and I am really impressed of the
> encoding technique.
> I am just wondering if there is a way to use them without having to
> generate code from the .proto files.
>
> I would appreciate a way where you import or even generate the .proto
> files at runtime and then pass a java.util.Map where the library picks
> the properties from.
>
> Maybe there is already a way to do this, but I did not find it neither
> in the tutorials nor the faq.
>
> Thanks & regards,
> Robert
>
> --
> You received this message because you are subscribed to the Google Groups
> "Protocol Buffers" group.
> To post to this group, send email to protobuf@googlegroups.com.
> To unsubscribe from this group, send email to
> protobuf+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/protobuf?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to protobuf@googlegroups.com.
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.

Reply via email to