All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.sonar.plugins.javascript.bridge.protobuf.FunctionDeclaration Maven / Gradle / Ivy

// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: estree.proto

// Protobuf Java Version: 3.25.5
package org.sonar.plugins.javascript.bridge.protobuf;

/**
 * Protobuf type {@code FunctionDeclaration}
 */
public final class FunctionDeclaration extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:FunctionDeclaration)
    FunctionDeclarationOrBuilder {
private static final long serialVersionUID = 0L;
  // Use FunctionDeclaration.newBuilder() to construct.
  private FunctionDeclaration(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    super(builder);
  }
  private FunctionDeclaration() {
    params_ = java.util.Collections.emptyList();
  }

  @java.lang.Override
  @SuppressWarnings({"unused"})
  protected java.lang.Object newInstance(
      UnusedPrivateParameter unused) {
    return new FunctionDeclaration();
  }

  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return org.sonar.plugins.javascript.bridge.protobuf.Estree.internal_static_FunctionDeclaration_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return org.sonar.plugins.javascript.bridge.protobuf.Estree.internal_static_FunctionDeclaration_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            org.sonar.plugins.javascript.bridge.protobuf.FunctionDeclaration.class, org.sonar.plugins.javascript.bridge.protobuf.FunctionDeclaration.Builder.class);
  }

  private int bitField0_;
  public static final int ID_FIELD_NUMBER = 1;
  private org.sonar.plugins.javascript.bridge.protobuf.Node id_;
  /**
   * .Node id = 1;
   * @return Whether the id field is set.
   */
  @java.lang.Override
  public boolean hasId() {
    return ((bitField0_ & 0x00000001) != 0);
  }
  /**
   * .Node id = 1;
   * @return The id.
   */
  @java.lang.Override
  public org.sonar.plugins.javascript.bridge.protobuf.Node getId() {
    return id_ == null ? org.sonar.plugins.javascript.bridge.protobuf.Node.getDefaultInstance() : id_;
  }
  /**
   * .Node id = 1;
   */
  @java.lang.Override
  public org.sonar.plugins.javascript.bridge.protobuf.NodeOrBuilder getIdOrBuilder() {
    return id_ == null ? org.sonar.plugins.javascript.bridge.protobuf.Node.getDefaultInstance() : id_;
  }

  public static final int BODY_FIELD_NUMBER = 2;
  private org.sonar.plugins.javascript.bridge.protobuf.Node body_;
  /**
   * .Node body = 2;
   * @return Whether the body field is set.
   */
  @java.lang.Override
  public boolean hasBody() {
    return ((bitField0_ & 0x00000002) != 0);
  }
  /**
   * .Node body = 2;
   * @return The body.
   */
  @java.lang.Override
  public org.sonar.plugins.javascript.bridge.protobuf.Node getBody() {
    return body_ == null ? org.sonar.plugins.javascript.bridge.protobuf.Node.getDefaultInstance() : body_;
  }
  /**
   * .Node body = 2;
   */
  @java.lang.Override
  public org.sonar.plugins.javascript.bridge.protobuf.NodeOrBuilder getBodyOrBuilder() {
    return body_ == null ? org.sonar.plugins.javascript.bridge.protobuf.Node.getDefaultInstance() : body_;
  }

  public static final int PARAMS_FIELD_NUMBER = 3;
  @SuppressWarnings("serial")
  private java.util.List params_;
  /**
   * repeated .Node params = 3;
   */
  @java.lang.Override
  public java.util.List getParamsList() {
    return params_;
  }
  /**
   * repeated .Node params = 3;
   */
  @java.lang.Override
  public java.util.List 
      getParamsOrBuilderList() {
    return params_;
  }
  /**
   * repeated .Node params = 3;
   */
  @java.lang.Override
  public int getParamsCount() {
    return params_.size();
  }
  /**
   * repeated .Node params = 3;
   */
  @java.lang.Override
  public org.sonar.plugins.javascript.bridge.protobuf.Node getParams(int index) {
    return params_.get(index);
  }
  /**
   * repeated .Node params = 3;
   */
  @java.lang.Override
  public org.sonar.plugins.javascript.bridge.protobuf.NodeOrBuilder getParamsOrBuilder(
      int index) {
    return params_.get(index);
  }

  public static final int GENERATOR_FIELD_NUMBER = 4;
  private boolean generator_ = false;
  /**
   * optional bool generator = 4;
   * @return Whether the generator field is set.
   */
  @java.lang.Override
  public boolean hasGenerator() {
    return ((bitField0_ & 0x00000004) != 0);
  }
  /**
   * optional bool generator = 4;
   * @return The generator.
   */
  @java.lang.Override
  public boolean getGenerator() {
    return generator_;
  }

  public static final int ASYNC_FIELD_NUMBER = 5;
  private boolean async_ = false;
  /**
   * optional bool async = 5;
   * @return Whether the async field is set.
   */
  @java.lang.Override
  public boolean hasAsync() {
    return ((bitField0_ & 0x00000008) != 0);
  }
  /**
   * optional bool async = 5;
   * @return The async.
   */
  @java.lang.Override
  public boolean getAsync() {
    return async_;
  }

  private byte memoizedIsInitialized = -1;
  @java.lang.Override
  public final boolean isInitialized() {
    byte isInitialized = memoizedIsInitialized;
    if (isInitialized == 1) return true;
    if (isInitialized == 0) return false;

    memoizedIsInitialized = 1;
    return true;
  }

  @java.lang.Override
  public void writeTo(com.google.protobuf.CodedOutputStream output)
                      throws java.io.IOException {
    if (((bitField0_ & 0x00000001) != 0)) {
      output.writeMessage(1, getId());
    }
    if (((bitField0_ & 0x00000002) != 0)) {
      output.writeMessage(2, getBody());
    }
    for (int i = 0; i < params_.size(); i++) {
      output.writeMessage(3, params_.get(i));
    }
    if (((bitField0_ & 0x00000004) != 0)) {
      output.writeBool(4, generator_);
    }
    if (((bitField0_ & 0x00000008) != 0)) {
      output.writeBool(5, async_);
    }
    getUnknownFields().writeTo(output);
  }

  @java.lang.Override
  public int getSerializedSize() {
    int size = memoizedSize;
    if (size != -1) return size;

    size = 0;
    if (((bitField0_ & 0x00000001) != 0)) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(1, getId());
    }
    if (((bitField0_ & 0x00000002) != 0)) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(2, getBody());
    }
    for (int i = 0; i < params_.size(); i++) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(3, params_.get(i));
    }
    if (((bitField0_ & 0x00000004) != 0)) {
      size += com.google.protobuf.CodedOutputStream
        .computeBoolSize(4, generator_);
    }
    if (((bitField0_ & 0x00000008) != 0)) {
      size += com.google.protobuf.CodedOutputStream
        .computeBoolSize(5, async_);
    }
    size += getUnknownFields().getSerializedSize();
    memoizedSize = size;
    return size;
  }

  @java.lang.Override
  public boolean equals(final java.lang.Object obj) {
    if (obj == this) {
     return true;
    }
    if (!(obj instanceof org.sonar.plugins.javascript.bridge.protobuf.FunctionDeclaration)) {
      return super.equals(obj);
    }
    org.sonar.plugins.javascript.bridge.protobuf.FunctionDeclaration other = (org.sonar.plugins.javascript.bridge.protobuf.FunctionDeclaration) obj;

    if (hasId() != other.hasId()) return false;
    if (hasId()) {
      if (!getId()
          .equals(other.getId())) return false;
    }
    if (hasBody() != other.hasBody()) return false;
    if (hasBody()) {
      if (!getBody()
          .equals(other.getBody())) return false;
    }
    if (!getParamsList()
        .equals(other.getParamsList())) return false;
    if (hasGenerator() != other.hasGenerator()) return false;
    if (hasGenerator()) {
      if (getGenerator()
          != other.getGenerator()) return false;
    }
    if (hasAsync() != other.hasAsync()) return false;
    if (hasAsync()) {
      if (getAsync()
          != other.getAsync()) return false;
    }
    if (!getUnknownFields().equals(other.getUnknownFields())) return false;
    return true;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    if (hasId()) {
      hash = (37 * hash) + ID_FIELD_NUMBER;
      hash = (53 * hash) + getId().hashCode();
    }
    if (hasBody()) {
      hash = (37 * hash) + BODY_FIELD_NUMBER;
      hash = (53 * hash) + getBody().hashCode();
    }
    if (getParamsCount() > 0) {
      hash = (37 * hash) + PARAMS_FIELD_NUMBER;
      hash = (53 * hash) + getParamsList().hashCode();
    }
    if (hasGenerator()) {
      hash = (37 * hash) + GENERATOR_FIELD_NUMBER;
      hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
          getGenerator());
    }
    if (hasAsync()) {
      hash = (37 * hash) + ASYNC_FIELD_NUMBER;
      hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
          getAsync());
    }
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static org.sonar.plugins.javascript.bridge.protobuf.FunctionDeclaration parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static org.sonar.plugins.javascript.bridge.protobuf.FunctionDeclaration parseFrom(
      java.nio.ByteBuffer data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static org.sonar.plugins.javascript.bridge.protobuf.FunctionDeclaration parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static org.sonar.plugins.javascript.bridge.protobuf.FunctionDeclaration parseFrom(
      com.google.protobuf.ByteString data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static org.sonar.plugins.javascript.bridge.protobuf.FunctionDeclaration parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static org.sonar.plugins.javascript.bridge.protobuf.FunctionDeclaration parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static org.sonar.plugins.javascript.bridge.protobuf.FunctionDeclaration parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static org.sonar.plugins.javascript.bridge.protobuf.FunctionDeclaration parseFrom(
      java.io.InputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input, extensionRegistry);
  }

  public static org.sonar.plugins.javascript.bridge.protobuf.FunctionDeclaration parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input);
  }

  public static org.sonar.plugins.javascript.bridge.protobuf.FunctionDeclaration parseDelimitedFrom(
      java.io.InputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
  }
  public static org.sonar.plugins.javascript.bridge.protobuf.FunctionDeclaration parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static org.sonar.plugins.javascript.bridge.protobuf.FunctionDeclaration parseFrom(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input, extensionRegistry);
  }

  @java.lang.Override
  public Builder newBuilderForType() { return newBuilder(); }
  public static Builder newBuilder() {
    return DEFAULT_INSTANCE.toBuilder();
  }
  public static Builder newBuilder(org.sonar.plugins.javascript.bridge.protobuf.FunctionDeclaration prototype) {
    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
  }
  @java.lang.Override
  public Builder toBuilder() {
    return this == DEFAULT_INSTANCE
        ? new Builder() : new Builder().mergeFrom(this);
  }

  @java.lang.Override
  protected Builder newBuilderForType(
      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    Builder builder = new Builder(parent);
    return builder;
  }
  /**
   * Protobuf type {@code FunctionDeclaration}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder implements
      // @@protoc_insertion_point(builder_implements:FunctionDeclaration)
      org.sonar.plugins.javascript.bridge.protobuf.FunctionDeclarationOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return org.sonar.plugins.javascript.bridge.protobuf.Estree.internal_static_FunctionDeclaration_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return org.sonar.plugins.javascript.bridge.protobuf.Estree.internal_static_FunctionDeclaration_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              org.sonar.plugins.javascript.bridge.protobuf.FunctionDeclaration.class, org.sonar.plugins.javascript.bridge.protobuf.FunctionDeclaration.Builder.class);
    }

    // Construct using org.sonar.plugins.javascript.bridge.protobuf.FunctionDeclaration.newBuilder()
    private Builder() {
      maybeForceBuilderInitialization();
    }

    private Builder(
        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      super(parent);
      maybeForceBuilderInitialization();
    }
    private void maybeForceBuilderInitialization() {
      if (com.google.protobuf.GeneratedMessageV3
              .alwaysUseFieldBuilders) {
        getIdFieldBuilder();
        getBodyFieldBuilder();
        getParamsFieldBuilder();
      }
    }
    @java.lang.Override
    public Builder clear() {
      super.clear();
      bitField0_ = 0;
      id_ = null;
      if (idBuilder_ != null) {
        idBuilder_.dispose();
        idBuilder_ = null;
      }
      body_ = null;
      if (bodyBuilder_ != null) {
        bodyBuilder_.dispose();
        bodyBuilder_ = null;
      }
      if (paramsBuilder_ == null) {
        params_ = java.util.Collections.emptyList();
      } else {
        params_ = null;
        paramsBuilder_.clear();
      }
      bitField0_ = (bitField0_ & ~0x00000004);
      generator_ = false;
      async_ = false;
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return org.sonar.plugins.javascript.bridge.protobuf.Estree.internal_static_FunctionDeclaration_descriptor;
    }

    @java.lang.Override
    public org.sonar.plugins.javascript.bridge.protobuf.FunctionDeclaration getDefaultInstanceForType() {
      return org.sonar.plugins.javascript.bridge.protobuf.FunctionDeclaration.getDefaultInstance();
    }

    @java.lang.Override
    public org.sonar.plugins.javascript.bridge.protobuf.FunctionDeclaration build() {
      org.sonar.plugins.javascript.bridge.protobuf.FunctionDeclaration result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public org.sonar.plugins.javascript.bridge.protobuf.FunctionDeclaration buildPartial() {
      org.sonar.plugins.javascript.bridge.protobuf.FunctionDeclaration result = new org.sonar.plugins.javascript.bridge.protobuf.FunctionDeclaration(this);
      buildPartialRepeatedFields(result);
      if (bitField0_ != 0) { buildPartial0(result); }
      onBuilt();
      return result;
    }

    private void buildPartialRepeatedFields(org.sonar.plugins.javascript.bridge.protobuf.FunctionDeclaration result) {
      if (paramsBuilder_ == null) {
        if (((bitField0_ & 0x00000004) != 0)) {
          params_ = java.util.Collections.unmodifiableList(params_);
          bitField0_ = (bitField0_ & ~0x00000004);
        }
        result.params_ = params_;
      } else {
        result.params_ = paramsBuilder_.build();
      }
    }

    private void buildPartial0(org.sonar.plugins.javascript.bridge.protobuf.FunctionDeclaration result) {
      int from_bitField0_ = bitField0_;
      int to_bitField0_ = 0;
      if (((from_bitField0_ & 0x00000001) != 0)) {
        result.id_ = idBuilder_ == null
            ? id_
            : idBuilder_.build();
        to_bitField0_ |= 0x00000001;
      }
      if (((from_bitField0_ & 0x00000002) != 0)) {
        result.body_ = bodyBuilder_ == null
            ? body_
            : bodyBuilder_.build();
        to_bitField0_ |= 0x00000002;
      }
      if (((from_bitField0_ & 0x00000008) != 0)) {
        result.generator_ = generator_;
        to_bitField0_ |= 0x00000004;
      }
      if (((from_bitField0_ & 0x00000010) != 0)) {
        result.async_ = async_;
        to_bitField0_ |= 0x00000008;
      }
      result.bitField0_ |= to_bitField0_;
    }

    @java.lang.Override
    public Builder clone() {
      return super.clone();
    }
    @java.lang.Override
    public Builder setField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        java.lang.Object value) {
      return super.setField(field, value);
    }
    @java.lang.Override
    public Builder clearField(
        com.google.protobuf.Descriptors.FieldDescriptor field) {
      return super.clearField(field);
    }
    @java.lang.Override
    public Builder clearOneof(
        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
      return super.clearOneof(oneof);
    }
    @java.lang.Override
    public Builder setRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        int index, java.lang.Object value) {
      return super.setRepeatedField(field, index, value);
    }
    @java.lang.Override
    public Builder addRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        java.lang.Object value) {
      return super.addRepeatedField(field, value);
    }
    @java.lang.Override
    public Builder mergeFrom(com.google.protobuf.Message other) {
      if (other instanceof org.sonar.plugins.javascript.bridge.protobuf.FunctionDeclaration) {
        return mergeFrom((org.sonar.plugins.javascript.bridge.protobuf.FunctionDeclaration)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(org.sonar.plugins.javascript.bridge.protobuf.FunctionDeclaration other) {
      if (other == org.sonar.plugins.javascript.bridge.protobuf.FunctionDeclaration.getDefaultInstance()) return this;
      if (other.hasId()) {
        mergeId(other.getId());
      }
      if (other.hasBody()) {
        mergeBody(other.getBody());
      }
      if (paramsBuilder_ == null) {
        if (!other.params_.isEmpty()) {
          if (params_.isEmpty()) {
            params_ = other.params_;
            bitField0_ = (bitField0_ & ~0x00000004);
          } else {
            ensureParamsIsMutable();
            params_.addAll(other.params_);
          }
          onChanged();
        }
      } else {
        if (!other.params_.isEmpty()) {
          if (paramsBuilder_.isEmpty()) {
            paramsBuilder_.dispose();
            paramsBuilder_ = null;
            params_ = other.params_;
            bitField0_ = (bitField0_ & ~0x00000004);
            paramsBuilder_ = 
              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
                 getParamsFieldBuilder() : null;
          } else {
            paramsBuilder_.addAllMessages(other.params_);
          }
        }
      }
      if (other.hasGenerator()) {
        setGenerator(other.getGenerator());
      }
      if (other.hasAsync()) {
        setAsync(other.getAsync());
      }
      this.mergeUnknownFields(other.getUnknownFields());
      onChanged();
      return this;
    }

    @java.lang.Override
    public final boolean isInitialized() {
      return true;
    }

    @java.lang.Override
    public Builder mergeFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      if (extensionRegistry == null) {
        throw new java.lang.NullPointerException();
      }
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            case 10: {
              input.readMessage(
                  getIdFieldBuilder().getBuilder(),
                  extensionRegistry);
              bitField0_ |= 0x00000001;
              break;
            } // case 10
            case 18: {
              input.readMessage(
                  getBodyFieldBuilder().getBuilder(),
                  extensionRegistry);
              bitField0_ |= 0x00000002;
              break;
            } // case 18
            case 26: {
              org.sonar.plugins.javascript.bridge.protobuf.Node m =
                  input.readMessage(
                      org.sonar.plugins.javascript.bridge.protobuf.Node.parser(),
                      extensionRegistry);
              if (paramsBuilder_ == null) {
                ensureParamsIsMutable();
                params_.add(m);
              } else {
                paramsBuilder_.addMessage(m);
              }
              break;
            } // case 26
            case 32: {
              generator_ = input.readBool();
              bitField0_ |= 0x00000008;
              break;
            } // case 32
            case 40: {
              async_ = input.readBool();
              bitField0_ |= 0x00000010;
              break;
            } // case 40
            default: {
              if (!super.parseUnknownField(input, extensionRegistry, tag)) {
                done = true; // was an endgroup tag
              }
              break;
            } // default:
          } // switch (tag)
        } // while (!done)
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.unwrapIOException();
      } finally {
        onChanged();
      } // finally
      return this;
    }
    private int bitField0_;

    private org.sonar.plugins.javascript.bridge.protobuf.Node id_;
    private com.google.protobuf.SingleFieldBuilderV3<
        org.sonar.plugins.javascript.bridge.protobuf.Node, org.sonar.plugins.javascript.bridge.protobuf.Node.Builder, org.sonar.plugins.javascript.bridge.protobuf.NodeOrBuilder> idBuilder_;
    /**
     * .Node id = 1;
     * @return Whether the id field is set.
     */
    public boolean hasId() {
      return ((bitField0_ & 0x00000001) != 0);
    }
    /**
     * .Node id = 1;
     * @return The id.
     */
    public org.sonar.plugins.javascript.bridge.protobuf.Node getId() {
      if (idBuilder_ == null) {
        return id_ == null ? org.sonar.plugins.javascript.bridge.protobuf.Node.getDefaultInstance() : id_;
      } else {
        return idBuilder_.getMessage();
      }
    }
    /**
     * .Node id = 1;
     */
    public Builder setId(org.sonar.plugins.javascript.bridge.protobuf.Node value) {
      if (idBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        id_ = value;
      } else {
        idBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000001;
      onChanged();
      return this;
    }
    /**
     * .Node id = 1;
     */
    public Builder setId(
        org.sonar.plugins.javascript.bridge.protobuf.Node.Builder builderForValue) {
      if (idBuilder_ == null) {
        id_ = builderForValue.build();
      } else {
        idBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000001;
      onChanged();
      return this;
    }
    /**
     * .Node id = 1;
     */
    public Builder mergeId(org.sonar.plugins.javascript.bridge.protobuf.Node value) {
      if (idBuilder_ == null) {
        if (((bitField0_ & 0x00000001) != 0) &&
          id_ != null &&
          id_ != org.sonar.plugins.javascript.bridge.protobuf.Node.getDefaultInstance()) {
          getIdBuilder().mergeFrom(value);
        } else {
          id_ = value;
        }
      } else {
        idBuilder_.mergeFrom(value);
      }
      if (id_ != null) {
        bitField0_ |= 0x00000001;
        onChanged();
      }
      return this;
    }
    /**
     * .Node id = 1;
     */
    public Builder clearId() {
      bitField0_ = (bitField0_ & ~0x00000001);
      id_ = null;
      if (idBuilder_ != null) {
        idBuilder_.dispose();
        idBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     * .Node id = 1;
     */
    public org.sonar.plugins.javascript.bridge.protobuf.Node.Builder getIdBuilder() {
      bitField0_ |= 0x00000001;
      onChanged();
      return getIdFieldBuilder().getBuilder();
    }
    /**
     * .Node id = 1;
     */
    public org.sonar.plugins.javascript.bridge.protobuf.NodeOrBuilder getIdOrBuilder() {
      if (idBuilder_ != null) {
        return idBuilder_.getMessageOrBuilder();
      } else {
        return id_ == null ?
            org.sonar.plugins.javascript.bridge.protobuf.Node.getDefaultInstance() : id_;
      }
    }
    /**
     * .Node id = 1;
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        org.sonar.plugins.javascript.bridge.protobuf.Node, org.sonar.plugins.javascript.bridge.protobuf.Node.Builder, org.sonar.plugins.javascript.bridge.protobuf.NodeOrBuilder> 
        getIdFieldBuilder() {
      if (idBuilder_ == null) {
        idBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            org.sonar.plugins.javascript.bridge.protobuf.Node, org.sonar.plugins.javascript.bridge.protobuf.Node.Builder, org.sonar.plugins.javascript.bridge.protobuf.NodeOrBuilder>(
                getId(),
                getParentForChildren(),
                isClean());
        id_ = null;
      }
      return idBuilder_;
    }

    private org.sonar.plugins.javascript.bridge.protobuf.Node body_;
    private com.google.protobuf.SingleFieldBuilderV3<
        org.sonar.plugins.javascript.bridge.protobuf.Node, org.sonar.plugins.javascript.bridge.protobuf.Node.Builder, org.sonar.plugins.javascript.bridge.protobuf.NodeOrBuilder> bodyBuilder_;
    /**
     * .Node body = 2;
     * @return Whether the body field is set.
     */
    public boolean hasBody() {
      return ((bitField0_ & 0x00000002) != 0);
    }
    /**
     * .Node body = 2;
     * @return The body.
     */
    public org.sonar.plugins.javascript.bridge.protobuf.Node getBody() {
      if (bodyBuilder_ == null) {
        return body_ == null ? org.sonar.plugins.javascript.bridge.protobuf.Node.getDefaultInstance() : body_;
      } else {
        return bodyBuilder_.getMessage();
      }
    }
    /**
     * .Node body = 2;
     */
    public Builder setBody(org.sonar.plugins.javascript.bridge.protobuf.Node value) {
      if (bodyBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        body_ = value;
      } else {
        bodyBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000002;
      onChanged();
      return this;
    }
    /**
     * .Node body = 2;
     */
    public Builder setBody(
        org.sonar.plugins.javascript.bridge.protobuf.Node.Builder builderForValue) {
      if (bodyBuilder_ == null) {
        body_ = builderForValue.build();
      } else {
        bodyBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000002;
      onChanged();
      return this;
    }
    /**
     * .Node body = 2;
     */
    public Builder mergeBody(org.sonar.plugins.javascript.bridge.protobuf.Node value) {
      if (bodyBuilder_ == null) {
        if (((bitField0_ & 0x00000002) != 0) &&
          body_ != null &&
          body_ != org.sonar.plugins.javascript.bridge.protobuf.Node.getDefaultInstance()) {
          getBodyBuilder().mergeFrom(value);
        } else {
          body_ = value;
        }
      } else {
        bodyBuilder_.mergeFrom(value);
      }
      if (body_ != null) {
        bitField0_ |= 0x00000002;
        onChanged();
      }
      return this;
    }
    /**
     * .Node body = 2;
     */
    public Builder clearBody() {
      bitField0_ = (bitField0_ & ~0x00000002);
      body_ = null;
      if (bodyBuilder_ != null) {
        bodyBuilder_.dispose();
        bodyBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     * .Node body = 2;
     */
    public org.sonar.plugins.javascript.bridge.protobuf.Node.Builder getBodyBuilder() {
      bitField0_ |= 0x00000002;
      onChanged();
      return getBodyFieldBuilder().getBuilder();
    }
    /**
     * .Node body = 2;
     */
    public org.sonar.plugins.javascript.bridge.protobuf.NodeOrBuilder getBodyOrBuilder() {
      if (bodyBuilder_ != null) {
        return bodyBuilder_.getMessageOrBuilder();
      } else {
        return body_ == null ?
            org.sonar.plugins.javascript.bridge.protobuf.Node.getDefaultInstance() : body_;
      }
    }
    /**
     * .Node body = 2;
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        org.sonar.plugins.javascript.bridge.protobuf.Node, org.sonar.plugins.javascript.bridge.protobuf.Node.Builder, org.sonar.plugins.javascript.bridge.protobuf.NodeOrBuilder> 
        getBodyFieldBuilder() {
      if (bodyBuilder_ == null) {
        bodyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            org.sonar.plugins.javascript.bridge.protobuf.Node, org.sonar.plugins.javascript.bridge.protobuf.Node.Builder, org.sonar.plugins.javascript.bridge.protobuf.NodeOrBuilder>(
                getBody(),
                getParentForChildren(),
                isClean());
        body_ = null;
      }
      return bodyBuilder_;
    }

    private java.util.List params_ =
      java.util.Collections.emptyList();
    private void ensureParamsIsMutable() {
      if (!((bitField0_ & 0x00000004) != 0)) {
        params_ = new java.util.ArrayList(params_);
        bitField0_ |= 0x00000004;
       }
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
        org.sonar.plugins.javascript.bridge.protobuf.Node, org.sonar.plugins.javascript.bridge.protobuf.Node.Builder, org.sonar.plugins.javascript.bridge.protobuf.NodeOrBuilder> paramsBuilder_;

    /**
     * repeated .Node params = 3;
     */
    public java.util.List getParamsList() {
      if (paramsBuilder_ == null) {
        return java.util.Collections.unmodifiableList(params_);
      } else {
        return paramsBuilder_.getMessageList();
      }
    }
    /**
     * repeated .Node params = 3;
     */
    public int getParamsCount() {
      if (paramsBuilder_ == null) {
        return params_.size();
      } else {
        return paramsBuilder_.getCount();
      }
    }
    /**
     * repeated .Node params = 3;
     */
    public org.sonar.plugins.javascript.bridge.protobuf.Node getParams(int index) {
      if (paramsBuilder_ == null) {
        return params_.get(index);
      } else {
        return paramsBuilder_.getMessage(index);
      }
    }
    /**
     * repeated .Node params = 3;
     */
    public Builder setParams(
        int index, org.sonar.plugins.javascript.bridge.protobuf.Node value) {
      if (paramsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureParamsIsMutable();
        params_.set(index, value);
        onChanged();
      } else {
        paramsBuilder_.setMessage(index, value);
      }
      return this;
    }
    /**
     * repeated .Node params = 3;
     */
    public Builder setParams(
        int index, org.sonar.plugins.javascript.bridge.protobuf.Node.Builder builderForValue) {
      if (paramsBuilder_ == null) {
        ensureParamsIsMutable();
        params_.set(index, builderForValue.build());
        onChanged();
      } else {
        paramsBuilder_.setMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     * repeated .Node params = 3;
     */
    public Builder addParams(org.sonar.plugins.javascript.bridge.protobuf.Node value) {
      if (paramsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureParamsIsMutable();
        params_.add(value);
        onChanged();
      } else {
        paramsBuilder_.addMessage(value);
      }
      return this;
    }
    /**
     * repeated .Node params = 3;
     */
    public Builder addParams(
        int index, org.sonar.plugins.javascript.bridge.protobuf.Node value) {
      if (paramsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureParamsIsMutable();
        params_.add(index, value);
        onChanged();
      } else {
        paramsBuilder_.addMessage(index, value);
      }
      return this;
    }
    /**
     * repeated .Node params = 3;
     */
    public Builder addParams(
        org.sonar.plugins.javascript.bridge.protobuf.Node.Builder builderForValue) {
      if (paramsBuilder_ == null) {
        ensureParamsIsMutable();
        params_.add(builderForValue.build());
        onChanged();
      } else {
        paramsBuilder_.addMessage(builderForValue.build());
      }
      return this;
    }
    /**
     * repeated .Node params = 3;
     */
    public Builder addParams(
        int index, org.sonar.plugins.javascript.bridge.protobuf.Node.Builder builderForValue) {
      if (paramsBuilder_ == null) {
        ensureParamsIsMutable();
        params_.add(index, builderForValue.build());
        onChanged();
      } else {
        paramsBuilder_.addMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     * repeated .Node params = 3;
     */
    public Builder addAllParams(
        java.lang.Iterable values) {
      if (paramsBuilder_ == null) {
        ensureParamsIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(
            values, params_);
        onChanged();
      } else {
        paramsBuilder_.addAllMessages(values);
      }
      return this;
    }
    /**
     * repeated .Node params = 3;
     */
    public Builder clearParams() {
      if (paramsBuilder_ == null) {
        params_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000004);
        onChanged();
      } else {
        paramsBuilder_.clear();
      }
      return this;
    }
    /**
     * repeated .Node params = 3;
     */
    public Builder removeParams(int index) {
      if (paramsBuilder_ == null) {
        ensureParamsIsMutable();
        params_.remove(index);
        onChanged();
      } else {
        paramsBuilder_.remove(index);
      }
      return this;
    }
    /**
     * repeated .Node params = 3;
     */
    public org.sonar.plugins.javascript.bridge.protobuf.Node.Builder getParamsBuilder(
        int index) {
      return getParamsFieldBuilder().getBuilder(index);
    }
    /**
     * repeated .Node params = 3;
     */
    public org.sonar.plugins.javascript.bridge.protobuf.NodeOrBuilder getParamsOrBuilder(
        int index) {
      if (paramsBuilder_ == null) {
        return params_.get(index);  } else {
        return paramsBuilder_.getMessageOrBuilder(index);
      }
    }
    /**
     * repeated .Node params = 3;
     */
    public java.util.List 
         getParamsOrBuilderList() {
      if (paramsBuilder_ != null) {
        return paramsBuilder_.getMessageOrBuilderList();
      } else {
        return java.util.Collections.unmodifiableList(params_);
      }
    }
    /**
     * repeated .Node params = 3;
     */
    public org.sonar.plugins.javascript.bridge.protobuf.Node.Builder addParamsBuilder() {
      return getParamsFieldBuilder().addBuilder(
          org.sonar.plugins.javascript.bridge.protobuf.Node.getDefaultInstance());
    }
    /**
     * repeated .Node params = 3;
     */
    public org.sonar.plugins.javascript.bridge.protobuf.Node.Builder addParamsBuilder(
        int index) {
      return getParamsFieldBuilder().addBuilder(
          index, org.sonar.plugins.javascript.bridge.protobuf.Node.getDefaultInstance());
    }
    /**
     * repeated .Node params = 3;
     */
    public java.util.List 
         getParamsBuilderList() {
      return getParamsFieldBuilder().getBuilderList();
    }
    private com.google.protobuf.RepeatedFieldBuilderV3<
        org.sonar.plugins.javascript.bridge.protobuf.Node, org.sonar.plugins.javascript.bridge.protobuf.Node.Builder, org.sonar.plugins.javascript.bridge.protobuf.NodeOrBuilder> 
        getParamsFieldBuilder() {
      if (paramsBuilder_ == null) {
        paramsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
            org.sonar.plugins.javascript.bridge.protobuf.Node, org.sonar.plugins.javascript.bridge.protobuf.Node.Builder, org.sonar.plugins.javascript.bridge.protobuf.NodeOrBuilder>(
                params_,
                ((bitField0_ & 0x00000004) != 0),
                getParentForChildren(),
                isClean());
        params_ = null;
      }
      return paramsBuilder_;
    }

    private boolean generator_ ;
    /**
     * optional bool generator = 4;
     * @return Whether the generator field is set.
     */
    @java.lang.Override
    public boolean hasGenerator() {
      return ((bitField0_ & 0x00000008) != 0);
    }
    /**
     * optional bool generator = 4;
     * @return The generator.
     */
    @java.lang.Override
    public boolean getGenerator() {
      return generator_;
    }
    /**
     * optional bool generator = 4;
     * @param value The generator to set.
     * @return This builder for chaining.
     */
    public Builder setGenerator(boolean value) {

      generator_ = value;
      bitField0_ |= 0x00000008;
      onChanged();
      return this;
    }
    /**
     * optional bool generator = 4;
     * @return This builder for chaining.
     */
    public Builder clearGenerator() {
      bitField0_ = (bitField0_ & ~0x00000008);
      generator_ = false;
      onChanged();
      return this;
    }

    private boolean async_ ;
    /**
     * optional bool async = 5;
     * @return Whether the async field is set.
     */
    @java.lang.Override
    public boolean hasAsync() {
      return ((bitField0_ & 0x00000010) != 0);
    }
    /**
     * optional bool async = 5;
     * @return The async.
     */
    @java.lang.Override
    public boolean getAsync() {
      return async_;
    }
    /**
     * optional bool async = 5;
     * @param value The async to set.
     * @return This builder for chaining.
     */
    public Builder setAsync(boolean value) {

      async_ = value;
      bitField0_ |= 0x00000010;
      onChanged();
      return this;
    }
    /**
     * optional bool async = 5;
     * @return This builder for chaining.
     */
    public Builder clearAsync() {
      bitField0_ = (bitField0_ & ~0x00000010);
      async_ = false;
      onChanged();
      return this;
    }
    @java.lang.Override
    public final Builder setUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.setUnknownFields(unknownFields);
    }

    @java.lang.Override
    public final Builder mergeUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.mergeUnknownFields(unknownFields);
    }


    // @@protoc_insertion_point(builder_scope:FunctionDeclaration)
  }

  // @@protoc_insertion_point(class_scope:FunctionDeclaration)
  private static final org.sonar.plugins.javascript.bridge.protobuf.FunctionDeclaration DEFAULT_INSTANCE;
  static {
    DEFAULT_INSTANCE = new org.sonar.plugins.javascript.bridge.protobuf.FunctionDeclaration();
  }

  public static org.sonar.plugins.javascript.bridge.protobuf.FunctionDeclaration getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser
      PARSER = new com.google.protobuf.AbstractParser() {
    @java.lang.Override
    public FunctionDeclaration parsePartialFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      Builder builder = newBuilder();
      try {
        builder.mergeFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(builder.buildPartial());
      } catch (com.google.protobuf.UninitializedMessageException e) {
        throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(e)
            .setUnfinishedMessage(builder.buildPartial());
      }
      return builder.buildPartial();
    }
  };

  public static com.google.protobuf.Parser parser() {
    return PARSER;
  }

  @java.lang.Override
  public com.google.protobuf.Parser getParserForType() {
    return PARSER;
  }

  @java.lang.Override
  public org.sonar.plugins.javascript.bridge.protobuf.FunctionDeclaration getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy