@Override public BuilderType clone() { BuilderType builder = (BuilderType) getDefaultInstanceForType().newBuilderForType(); builder.mergeFrom(buildPartial()); return builder; }
@Override public BuilderType clone() { BuilderType builder = (BuilderType) getDefaultInstanceForType().newBuilderForType(); builder.mergeFrom(buildPartial()); return builder; }
/** * Get the message for the field. If the message is currently stored * as a {@code Builder}, it is converted to a {@code Message} by * calling {@link Message.Builder#buildPartial} on it. If no message has * been set, returns the default instance of the message. * * @return the message for the field */ @SuppressWarnings("unchecked") public MType getMessage() { if (message == null) { // If message is null, the invariant is that we must be have a builder. message = (MType) builder.buildPartial(); } return message; }
/** * Get the message for the field. If the message is currently stored * as a {@code Builder}, it is converted to a {@code Message} by * calling {@link Message.Builder#buildPartial} on it. If no message has * been set, returns the default instance of the message. * * @return the message for the field */ @SuppressWarnings("unchecked") public MType getMessage() { if (message == null) { // If message is null, the invariant is that we must be have a builder. message = (MType) builder.buildPartial(); } return message; }
/** * Get the message for the field. If the message is currently stored * as a {@code Builder}, it is converted to a {@code Message} by * calling {@link Message.Builder#buildPartial} on it. If no message has * been set, returns the default instance of the message. * * @return the message for the field */ @SuppressWarnings("unchecked") public MType getMessage() { if (message == null) { // If message is null, the invariant is that we must be have a builder. message = (MType) builder.buildPartial(); } return message; }
/** * Get the message for the field. If the message is currently stored * as a {@code Builder}, it is converted to a {@code Message} by * calling {@link Message.Builder#buildPartial} on it. If no message has * been set, returns the default instance of the message. * * @return the message for the field */ @SuppressWarnings("unchecked") public MType getMessage() { if (message == null) { // If message is null, the invariant is that we must be have a builder. message = (MType) builder.buildPartial(); } return message; }