Java code generation w/o reflection

19 views
Skip to first unread message

Harald Pehl

unread,
Jul 4, 2019, 7:03:17 AM7/4/19
to Protocol Buffers
Is it possible to generate Java source code for proto3 w/o reflection usage. That is the generated code must not depend on reflection. I see there's the optimize_for
option. But setting it to LITE_RUNTIME did not have any effect. 

Are there other ways to control whether reflection is used for generated Java code?

Thanks 
Harald

Adam Cozzette

unread,
Jul 8, 2019, 6:04:18 PM7/8/19
to Harald Pehl, Protocol Buffers
We ended up making Java lite a separate implementation, and it's controlled by a protoc flag rather than a .proto file option (that option is now ignored for Java). See here for some more details on how to use Java lite.

--
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 protobuf+u...@googlegroups.com.
To post to this group, send email to prot...@googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
To view this discussion on the web visit https://groups.google.com/d/msgid/protobuf/4d99c2d6-3764-41f4-8fc1-b91da3f65f35%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages