Comment #7 on issue 148 by [email protected]: RFE: Support Documentation option in proto files and javadoc in generated Java files
http://code.google.com/p/protobuf/issues/detail?id=148

I agree, even without a proper protodoc/javadoc solution, just copying the associated bit of proto definition into the getter's/setter's javadoc would be an improvement. It's already being done as a line comment, just needs to be turned into a javadoc.

For example, currently we have in subinterfaces of MessageOrBuilder:

// required string name = 1;
boolean hasName();
String getName();

This can be converted to:

/**
 * Checks if field 'name' has beed set.
 *
 * @see #getName()
 */
boolean hasName();

/**
 * Generated property getter for field 'name'.<br/>
 * Field definition:
 * <pre>required string name = 1;</pre>
 *
 * @see #hasName()
 */
String getName();

...and in the associated Builder:

/**
 * Generated property setter for field 'name'.<br/>
 * Field definition:
 * <pre>required string name = 1;</pre>
 *
 * @see #getName()
 */
public Builder setName(String value) {...}

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

Reply via email to