Codota Logo
Message$Builder.getRepeatedField
Code IndexAdd Codota to your IDE (free)

How to use
getRepeatedField
method
in
com.google.protobuf.Message$Builder

Best Java code snippets using com.google.protobuf.Message$Builder.getRepeatedField (Showing top 4 results out of 315)

  • Common ways to obtain Message$Builder
private void myMethod () {
Message$Builder m =
  • Codota IconMessage defaultInstance;defaultInstance.newBuilderForType()
  • Codota IconMessage message;message.toBuilder()
  • Codota IconAbstractMessage.Builder abstractMessageBuilder;UnknownFieldSet.Builder unknownFieldSetBuilder;abstractMessageBuilder.setUnknownFields(unknownFieldSetBuilder.build())
  • Smart code suggestions by Codota
}
origin: com.github.protobufel/protobufel-el

@SuppressWarnings("unchecked")
@Override
public E get(final int index) {
 return (E) parent.getRepeatedField(field, index);
}
origin: com.github.protobufel/protobufel-el

@Override
public Message getMessage(final int index) {
 return (Message) parent.getRepeatedField(field, index);
}
origin: com.google.api/api-compiler

/**
 * Constructs a sub-builder for a element at given index of the repeated message field, and
 * calls action on it.
 */
public Builder withBuilderAt(FieldDescriptor field, int index, BuildAction action) {
 Message.Builder repeatedFieldBuilder = configBuilder.newBuilderForField(field);
 repeatedFieldBuilder.mergeFrom((Message) configBuilder.getRepeatedField(field, index));
 Builder elementBuilder =
   new Builder(repeatedFieldBuilder.build(), repeatedFieldBuilder, locations);
 action.accept(elementBuilder);
 // Call build so locations map is updated.
 ConfigSource configSource = elementBuilder.build();
 // Update the list with the built element
 configBuilder.setRepeatedField(field, index, configSource.configMessage);
 return this;
}
origin: googleapis/api-compiler

/**
 * Constructs a sub-builder for a element at given index of the repeated message field, and
 * calls action on it.
 */
public Builder withBuilderAt(FieldDescriptor field, int index, BuildAction action) {
 Message.Builder repeatedFieldBuilder = configBuilder.newBuilderForField(field);
 repeatedFieldBuilder.mergeFrom((Message) configBuilder.getRepeatedField(field, index));
 Builder elementBuilder =
   new Builder(repeatedFieldBuilder.build(), repeatedFieldBuilder, locations);
 action.accept(elementBuilder);
 // Call build so locations map is updated.
 ConfigSource configSource = elementBuilder.build();
 // Update the list with the built element
 configBuilder.setRepeatedField(field, index, configSource.configMessage);
 return this;
}
com.google.protobufMessage$BuildergetRepeatedField

Javadoc

Get a nested builder instance for the given repeated field instance.

Normally, we hold a reference to the immutable message object for the message type field. Some implementations(the generated message builders), however, can also hold a reference to the builder object (a nested builder) for the field.

If the field is already backed up by a nested builder, the nested builder will be returned. Otherwise, a new field builder will be created and returned. The original message field (if exist) will be merged into the field builder, which will then be nested into its parent builder.

NOTE: implementations that do not support nested builders will throw UnsupportedOperationException.

Popular methods of Message$Builder

  • build
  • mergeFrom
  • setField
    Sets a field to the given value. The value must be of the correct type for this field, i.e. the same
  • getDescriptorForType
    Get the message's type's descriptor. See Message#getDescriptorForType().
  • newBuilderForField
    Create a Builder for messages of the appropriate type for the given field. Messages built with this
  • addRepeatedField
    Like setRepeatedField, but appends the value as a new element.
  • clearField
    Clears the field. This is exactly equivalent to calling the generated "clear" accessor method corres
  • getDefaultInstanceForType
  • buildPartial
  • getRepeatedFieldCount
  • hasField
  • setRepeatedField
    Sets an element of a repeated field to the given value. The value must be of the correct type for th
  • hasField,
  • setRepeatedField,
  • getField,
  • getOneofFieldDescriptor,
  • getFieldBuilder,
  • clearOneof,
  • getRepeatedFieldBuilder,
  • hasOneof,
  • mergeDelimitedFrom

Popular in Java

  • Reactive rest calls using spring rest template
  • getExternalFilesDir (Context)
  • getContentResolver (Context)
  • putExtra (Intent)
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • Properties (java.util)
    The Properties class represents a persistent set of properties. The Properties can be saved to a st
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • Collectors (java.util.stream)
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now