congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
Message$Builder.hasField
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: com.google.protobuf/protobuf-java-util

 continue;
if (!source.hasField(field) && !destination.hasField(field)) {
origin: com.google.protobuf/protobuf-java-util

if (builder.hasField(field)) {
 throw new InvalidProtocolBufferException(
   "Field " + field.getFullName() + " has already been set.");
origin: io.netifi.proteus/tracing-openzipkin

if (builder.hasField(field)) {
  throw new InvalidProtocolBufferException(
    "Field " + field.getFullName() + " has already been set.");
origin: netifi-proteus/proteus-java

if (builder.hasField(field)) {
 throw new InvalidProtocolBufferException(
   "Field " + field.getFullName() + " has already been set.");
origin: io.netifi.proteus/proteus-tracing-openzipkin

if (builder.hasField(field)) {
 throw new InvalidProtocolBufferException(
   "Field " + field.getFullName() + " has already been set.");
origin: org.openbase.bco/dal.lib

  /**
   * Serialize a serviceAttribute and filter a list of fields beforehand.
   *
   * @param serviceAttribute  the service attribute which is serialized
   * @param filteredFieldList a list of field names which shall be filtered before serialization
   * @return a jSon string representation of the service attribute without the filtered fields
   * @throws CouldNotPerformException if the serialization fails or the service attribute does not contain any context
   */
  public String serialize(final Message serviceAttribute, final List<String> filteredFieldList) throws CouldNotPerformException {
    final Message.Builder builder = serviceAttribute.toBuilder();

    for (String filteredField : filteredFieldList) {
      FieldDescriptor fieldDescriptor = ProtoBufFieldProcessor.getFieldDescriptor(builder, filteredField);
      if (!builder.hasField(fieldDescriptor)) {
        continue;
      }

      builder.clearField(fieldDescriptor);
    }

    return super.serialize(builder.build());
  }
}
origin: yeriomin/play-store-api

@Override
public boolean hasField(Descriptors.FieldDescriptor field) {
 return builder.hasField(field);
}
origin: WeAreFairphone/FP2-Launcher

@Override
public boolean hasField(Descriptors.FieldDescriptor field) {
 return builder.hasField(field);
}
origin: com.google.protobuf/protobuf-java

@Override
public boolean hasField(Descriptors.FieldDescriptor field) {
 return builder.hasField(field);
}
origin: osmandapp/Osmand

/** helper method to handle {@code builder} and {@code extensions}. */
private static boolean hasOriginalMessage(
  Message.Builder builder,
  FieldSet<FieldDescriptor> extensions,
  FieldDescriptor field) {
 if (builder != null) {
  return builder.hasField(field);
 } else {
  return extensions.hasField(field);
 }
}
com.google.protobufMessage$BuilderhasField

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
  • setRepeatedField
    Sets an element of a repeated field to the given value. The value must be of the correct type for th
  • getField
  • setRepeatedField,
  • getField,
  • getOneofFieldDescriptor,
  • getFieldBuilder,
  • clearOneof,
  • getRepeatedField,
  • getRepeatedFieldBuilder,
  • hasOneof,
  • mergeDelimitedFrom

Popular in Java

  • Updating database using SQL prepared statement
  • scheduleAtFixedRate (ScheduledExecutorService)
  • findViewById (Activity)
  • compareTo (BigDecimal)
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • FileWriter (java.io)
    A specialized Writer that writes to a file in the file system. All write requests made by calling me
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now