congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
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
  • getSupportFragmentManager (FragmentActivity)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • putExtra (Intent)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • Point (java.awt)
    A point representing a location in (x,y) coordinate space, specified in integer precision.
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • StringTokenizer (java.util)
    Breaks a string into tokens; new code should probably use String#split.> // Legacy code: StringTo
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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