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

com.google.javascript.jscomp.AutoValue_TypeMismatch 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.

There is a newer version: v20240317
Show newest version


package com.google.javascript.jscomp;

import com.google.javascript.rhino.Node;
import com.google.javascript.rhino.jstype.JSType;
import javax.annotation.processing.Generated;

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

  private final JSType found;
  private final JSType required;
  private final Node location;

  AutoValue_TypeMismatch(
      JSType found,
      JSType required,
      Node location) {
    if (found == null) {
      throw new NullPointerException("Null found");
    }
    this.found = found;
    if (required == null) {
      throw new NullPointerException("Null required");
    }
    this.required = required;
    if (location == null) {
      throw new NullPointerException("Null location");
    }
    this.location = location;
  }

  @Override
  public JSType getFound() {
    return found;
  }

  @Override
  public JSType getRequired() {
    return required;
  }

  @Override
  public Node getLocation() {
    return location;
  }

  @Override
  public String toString() {
    return "TypeMismatch{"
         + "found=" + found + ", "
         + "required=" + required + ", "
         + "location=" + location
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof TypeMismatch) {
      TypeMismatch that = (TypeMismatch) o;
      return (this.found.equals(that.getFound()))
           && (this.required.equals(that.getRequired()))
           && (this.location.equals(that.getLocation()));
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= found.hashCode();
    h$ *= 1000003;
    h$ ^= required.hashCode();
    h$ *= 1000003;
    h$ ^= location.hashCode();
    return h$;
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy