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

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



package com.google.javascript.jscomp;

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

@Generated("com.google.auto.value.processor.AutoValueProcessor")
 final class AutoValue_JSError extends JSError {

  private final DiagnosticType type;
  private final String description;
  private final @Nullable String sourceName;
  private final int lineno;
  private final int charno;
  private final @Nullable Node node;
  private final CheckLevel defaultLevel;

  AutoValue_JSError(
      DiagnosticType type,
      String description,
       @Nullable String sourceName,
      int lineno,
      int charno,
       @Nullable Node node,
      CheckLevel defaultLevel) {
    if (type == null) {
      throw new NullPointerException("Null type");
    }
    this.type = type;
    if (description == null) {
      throw new NullPointerException("Null description");
    }
    this.description = description;
    this.sourceName = sourceName;
    this.lineno = lineno;
    this.charno = charno;
    this.node = node;
    if (defaultLevel == null) {
      throw new NullPointerException("Null defaultLevel");
    }
    this.defaultLevel = defaultLevel;
  }

  @Override
  public DiagnosticType getType() {
    return type;
  }

  @Override
  public String getDescription() {
    return description;
  }

  @Override
  public @Nullable String getSourceName() {
    return sourceName;
  }

  @Override
  public int getLineno() {
    return lineno;
  }

  @Override
  public int getCharno() {
    return charno;
  }

  @Override
  public @Nullable Node getNode() {
    return node;
  }

  @Override
  public CheckLevel getDefaultLevel() {
    return defaultLevel;
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof JSError) {
      JSError that = (JSError) o;
      return (this.type.equals(that.getType()))
           && (this.description.equals(that.getDescription()))
           && ((this.sourceName == null) ? (that.getSourceName() == null) : this.sourceName.equals(that.getSourceName()))
           && (this.lineno == that.getLineno())
           && (this.charno == that.getCharno())
           && ((this.node == null) ? (that.getNode() == null) : this.node.equals(that.getNode()))
           && (this.defaultLevel.equals(that.getDefaultLevel()));
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= type.hashCode();
    h$ *= 1000003;
    h$ ^= description.hashCode();
    h$ *= 1000003;
    h$ ^= (sourceName == null) ? 0 : sourceName.hashCode();
    h$ *= 1000003;
    h$ ^= lineno;
    h$ *= 1000003;
    h$ ^= charno;
    h$ *= 1000003;
    h$ ^= (node == null) ? 0 : node.hashCode();
    h$ *= 1000003;
    h$ ^= defaultLevel.hashCode();
    return h$;
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy