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

com.google.javascript.rhino.jstype.AutoValue_JSTypeRegistry_ModuleSlot 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.rhino.jstype;

import com.google.javascript.rhino.Node;
import javax.annotation.Generated;
import javax.annotation.Nullable;

@Generated("com.google.auto.value.processor.AutoValueProcessor")
 final class AutoValue_JSTypeRegistry_ModuleSlot extends JSTypeRegistry.ModuleSlot {

  private final boolean isLegacyModule;
  private final Node definitionNode;
  private final JSType type;

  AutoValue_JSTypeRegistry_ModuleSlot(
      boolean isLegacyModule,
      @Nullable Node definitionNode,
      @Nullable JSType type) {
    this.isLegacyModule = isLegacyModule;
    this.definitionNode = definitionNode;
    this.type = type;
  }

  @Override
  boolean isLegacyModule() {
    return isLegacyModule;
  }

  @Nullable
  @Override
  Node definitionNode() {
    return definitionNode;
  }

  @Nullable
  @Override
  JSType type() {
    return type;
  }

  @Override
  public String toString() {
    return "ModuleSlot{"
        + "isLegacyModule=" + isLegacyModule + ", "
        + "definitionNode=" + definitionNode + ", "
        + "type=" + type
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof JSTypeRegistry.ModuleSlot) {
      JSTypeRegistry.ModuleSlot that = (JSTypeRegistry.ModuleSlot) o;
      return (this.isLegacyModule == that.isLegacyModule())
           && ((this.definitionNode == null) ? (that.definitionNode() == null) : this.definitionNode.equals(that.definitionNode()))
           && ((this.type == null) ? (that.type() == null) : this.type.equals(that.type()));
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h = 1;
    h *= 1000003;
    h ^= this.isLegacyModule ? 1231 : 1237;
    h *= 1000003;
    h ^= (definitionNode == null) ? 0 : this.definitionNode.hashCode();
    h *= 1000003;
    h ^= (type == null) ? 0 : this.type.hashCode();
    return h;
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy