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

com.google.javascript.jscomp.AutoValue_CodingConvention_AssertionFunctionSpec Maven / Gradle / Ivy

Go to download

Closure Compiler is a JavaScript optimizing compiler. It parses your JavaScript, analyzes it, removes dead code and rewrites and minimizes what's left. It also checks syntax, variable references, and types, and warns about common JavaScript pitfalls. It is used in many of Google's JavaScript apps, including Gmail, Google Web Search, Google Maps, and Google Docs.

The newest version!
package com.google.javascript.jscomp;

import com.google.javascript.rhino.ClosurePrimitive;
import javax.annotation.processing.Generated;
import org.jspecify.nullness.Nullable;

@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_CodingConvention_AssertionFunctionSpec extends CodingConvention.AssertionFunctionSpec {

  private final @Nullable String functionName;

  private final @Nullable ClosurePrimitive closurePrimitive;

  private final CodingConvention.AssertionFunctionSpec.AssertionKind assertionKind;

  private final int paramIndex;

  private AutoValue_CodingConvention_AssertionFunctionSpec(
      @Nullable String functionName,
      @Nullable ClosurePrimitive closurePrimitive,
      CodingConvention.AssertionFunctionSpec.AssertionKind assertionKind,
      int paramIndex) {
    this.functionName = functionName;
    this.closurePrimitive = closurePrimitive;
    this.assertionKind = assertionKind;
    this.paramIndex = paramIndex;
  }

  @Override
  @Nullable String getFunctionName() {
    return functionName;
  }

  @Override
  @Nullable ClosurePrimitive getClosurePrimitive() {
    return closurePrimitive;
  }

  @Override
  CodingConvention.AssertionFunctionSpec.AssertionKind getAssertionKind() {
    return assertionKind;
  }

  @Override
  int getParamIndex() {
    return paramIndex;
  }

  @Override
  public String toString() {
    return "AssertionFunctionSpec{"
        + "functionName=" + functionName + ", "
        + "closurePrimitive=" + closurePrimitive + ", "
        + "assertionKind=" + assertionKind + ", "
        + "paramIndex=" + paramIndex
        + "}";
  }

  @Override
  public boolean equals(@Nullable Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof CodingConvention.AssertionFunctionSpec) {
      CodingConvention.AssertionFunctionSpec that = (CodingConvention.AssertionFunctionSpec) o;
      return (this.functionName == null ? that.getFunctionName() == null : this.functionName.equals(that.getFunctionName()))
          && (this.closurePrimitive == null ? that.getClosurePrimitive() == null : this.closurePrimitive.equals(that.getClosurePrimitive()))
          && this.assertionKind.equals(that.getAssertionKind())
          && this.paramIndex == that.getParamIndex();
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= (functionName == null) ? 0 : functionName.hashCode();
    h$ *= 1000003;
    h$ ^= (closurePrimitive == null) ? 0 : closurePrimitive.hashCode();
    h$ *= 1000003;
    h$ ^= assertionKind.hashCode();
    h$ *= 1000003;
    h$ ^= paramIndex;
    return h$;
  }

  static final class Builder extends CodingConvention.AssertionFunctionSpec.Builder {
    private @Nullable String functionName;
    private @Nullable ClosurePrimitive closurePrimitive;
    private CodingConvention.AssertionFunctionSpec.@Nullable AssertionKind assertionKind;
    private int paramIndex;
    private byte set$0;
    Builder() {
    }
    @Override
    public CodingConvention.AssertionFunctionSpec.Builder setFunctionName(String functionName) {
      this.functionName = functionName;
      return this;
    }
    @Override
    CodingConvention.AssertionFunctionSpec.Builder setClosurePrimitive(ClosurePrimitive closurePrimitive) {
      this.closurePrimitive = closurePrimitive;
      return this;
    }
    @Override
    CodingConvention.AssertionFunctionSpec.Builder setAssertionKind(CodingConvention.AssertionFunctionSpec.AssertionKind assertionKind) {
      if (assertionKind == null) {
        throw new NullPointerException("Null assertionKind");
      }
      this.assertionKind = assertionKind;
      return this;
    }
    @Override
    public CodingConvention.AssertionFunctionSpec.Builder setParamIndex(int paramIndex) {
      this.paramIndex = paramIndex;
      set$0 |= (byte) 1;
      return this;
    }
    @Override
    CodingConvention.AssertionFunctionSpec autoBuild() {
      if (set$0 != 1
          || this.assertionKind == null) {
        StringBuilder missing = new StringBuilder();
        if (this.assertionKind == null) {
          missing.append(" assertionKind");
        }
        if ((set$0 & 1) == 0) {
          missing.append(" paramIndex");
        }
        throw new IllegalStateException("Missing required properties:" + missing);
      }
      return new AutoValue_CodingConvention_AssertionFunctionSpec(
          this.functionName,
          this.closurePrimitive,
          this.assertionKind,
          this.paramIndex);
    }
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy