I was scanning the Language Guide and saw that there are simple ways
to access the MessageOptions defined in the java code like:

String value =

However if i have a field option like (using the e.g. in Language
extend google.protobuf.FieldOptions {
  optional float my_field_option = 50002;

optional int32 foo = 1 [(my_field_option) = 4.5];

How do I access the my_field_option value in Java. The
MyProtoFile.myFieldOption static member does exist, but I don't know
how to use it.

I have tried a lot of things, but was unable to figure out a way.

Thanks, Harpreet

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 
For more options, visit this group at 

Reply via email to