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

com.google.javascript.jscomp.colors.AutoValue_SingletonColorFields 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.colors;

import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
import javax.annotation.Generated;
import javax.annotation.Nullable;

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

  private final String id;
  private final DebugInfo debugInfo;
  private final Color prototype;
  private final Color instanceColor;
  private final ImmutableList disambiguationSupertypes;
  private final boolean invalidating;
  private final boolean propertiesKeepOriginalName;
  private final boolean constructor;
  private final ImmutableSet ownProperties;
  private final NativeColorId nativeColorId;
  private final boolean closureAssert;

  private AutoValue_SingletonColorFields(
      String id,
      DebugInfo debugInfo,
      @Nullable Color prototype,
      @Nullable Color instanceColor,
      ImmutableList disambiguationSupertypes,
      boolean invalidating,
      boolean propertiesKeepOriginalName,
      boolean constructor,
      ImmutableSet ownProperties,
      @Nullable NativeColorId nativeColorId,
      boolean closureAssert) {
    this.id = id;
    this.debugInfo = debugInfo;
    this.prototype = prototype;
    this.instanceColor = instanceColor;
    this.disambiguationSupertypes = disambiguationSupertypes;
    this.invalidating = invalidating;
    this.propertiesKeepOriginalName = propertiesKeepOriginalName;
    this.constructor = constructor;
    this.ownProperties = ownProperties;
    this.nativeColorId = nativeColorId;
    this.closureAssert = closureAssert;
  }

  @Override
  String getId() {
    return id;
  }

  @Override
  DebugInfo getDebugInfo() {
    return debugInfo;
  }

  @Nullable
  @Override
  Color getPrototype() {
    return prototype;
  }

  @Nullable
  @Override
  Color getInstanceColor() {
    return instanceColor;
  }

  @Override
  ImmutableList getDisambiguationSupertypes() {
    return disambiguationSupertypes;
  }

  @Override
  boolean isInvalidating() {
    return invalidating;
  }

  @Override
  boolean getPropertiesKeepOriginalName() {
    return propertiesKeepOriginalName;
  }

  @Override
  boolean isConstructor() {
    return constructor;
  }

  @Override
  ImmutableSet getOwnProperties() {
    return ownProperties;
  }

  @Nullable
  @Override
  NativeColorId getNativeColorId() {
    return nativeColorId;
  }

  @Override
  boolean isClosureAssert() {
    return closureAssert;
  }

  @Override
  public String toString() {
    return "SingletonColorFields{"
         + "id=" + id + ", "
         + "debugInfo=" + debugInfo + ", "
         + "prototype=" + prototype + ", "
         + "instanceColor=" + instanceColor + ", "
         + "disambiguationSupertypes=" + disambiguationSupertypes + ", "
         + "invalidating=" + invalidating + ", "
         + "propertiesKeepOriginalName=" + propertiesKeepOriginalName + ", "
         + "constructor=" + constructor + ", "
         + "ownProperties=" + ownProperties + ", "
         + "nativeColorId=" + nativeColorId + ", "
         + "closureAssert=" + closureAssert
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof SingletonColorFields) {
      SingletonColorFields that = (SingletonColorFields) o;
      return (this.id.equals(that.getId()))
           && (this.debugInfo.equals(that.getDebugInfo()))
           && ((this.prototype == null) ? (that.getPrototype() == null) : this.prototype.equals(that.getPrototype()))
           && ((this.instanceColor == null) ? (that.getInstanceColor() == null) : this.instanceColor.equals(that.getInstanceColor()))
           && (this.disambiguationSupertypes.equals(that.getDisambiguationSupertypes()))
           && (this.invalidating == that.isInvalidating())
           && (this.propertiesKeepOriginalName == that.getPropertiesKeepOriginalName())
           && (this.constructor == that.isConstructor())
           && (this.ownProperties.equals(that.getOwnProperties()))
           && ((this.nativeColorId == null) ? (that.getNativeColorId() == null) : this.nativeColorId.equals(that.getNativeColorId()))
           && (this.closureAssert == that.isClosureAssert());
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= id.hashCode();
    h$ *= 1000003;
    h$ ^= debugInfo.hashCode();
    h$ *= 1000003;
    h$ ^= (prototype == null) ? 0 : prototype.hashCode();
    h$ *= 1000003;
    h$ ^= (instanceColor == null) ? 0 : instanceColor.hashCode();
    h$ *= 1000003;
    h$ ^= disambiguationSupertypes.hashCode();
    h$ *= 1000003;
    h$ ^= invalidating ? 1231 : 1237;
    h$ *= 1000003;
    h$ ^= propertiesKeepOriginalName ? 1231 : 1237;
    h$ *= 1000003;
    h$ ^= constructor ? 1231 : 1237;
    h$ *= 1000003;
    h$ ^= ownProperties.hashCode();
    h$ *= 1000003;
    h$ ^= (nativeColorId == null) ? 0 : nativeColorId.hashCode();
    h$ *= 1000003;
    h$ ^= closureAssert ? 1231 : 1237;
    return h$;
  }

  static final class Builder extends SingletonColorFields.Builder {
    private String id;
    private DebugInfo debugInfo;
    private Color prototype;
    private Color instanceColor;
    private ImmutableList disambiguationSupertypes;
    private Boolean invalidating;
    private Boolean propertiesKeepOriginalName;
    private Boolean constructor;
    private ImmutableSet ownProperties;
    private NativeColorId nativeColorId;
    private Boolean closureAssert;
    Builder() {
    }
    @Override
    public SingletonColorFields.Builder setId(String id) {
      if (id == null) {
        throw new NullPointerException("Null id");
      }
      this.id = id;
      return this;
    }
    @Override
    public SingletonColorFields.Builder setDebugInfo(DebugInfo debugInfo) {
      if (debugInfo == null) {
        throw new NullPointerException("Null debugInfo");
      }
      this.debugInfo = debugInfo;
      return this;
    }
    @Override
    public SingletonColorFields.Builder setPrototype(@Nullable Color prototype) {
      this.prototype = prototype;
      return this;
    }
    @Override
    public SingletonColorFields.Builder setInstanceColor(@Nullable Color instanceColor) {
      this.instanceColor = instanceColor;
      return this;
    }
    @Override
    public SingletonColorFields.Builder setDisambiguationSupertypes(ImmutableList disambiguationSupertypes) {
      if (disambiguationSupertypes == null) {
        throw new NullPointerException("Null disambiguationSupertypes");
      }
      this.disambiguationSupertypes = disambiguationSupertypes;
      return this;
    }
    @Override
    public SingletonColorFields.Builder setInvalidating(boolean invalidating) {
      this.invalidating = invalidating;
      return this;
    }
    @Override
    public SingletonColorFields.Builder setPropertiesKeepOriginalName(boolean propertiesKeepOriginalName) {
      this.propertiesKeepOriginalName = propertiesKeepOriginalName;
      return this;
    }
    @Override
    public SingletonColorFields.Builder setConstructor(boolean constructor) {
      this.constructor = constructor;
      return this;
    }
    @Override
    public SingletonColorFields.Builder setOwnProperties(ImmutableSet ownProperties) {
      if (ownProperties == null) {
        throw new NullPointerException("Null ownProperties");
      }
      this.ownProperties = ownProperties;
      return this;
    }
    @Override
    public SingletonColorFields.Builder setNativeColorId(@Nullable NativeColorId nativeColorId) {
      this.nativeColorId = nativeColorId;
      return this;
    }
    @Override
    public SingletonColorFields.Builder setClosureAssert(boolean closureAssert) {
      this.closureAssert = closureAssert;
      return this;
    }
    @Override
    public SingletonColorFields build() {
      String missing = "";
      if (this.id == null) {
        missing += " id";
      }
      if (this.debugInfo == null) {
        missing += " debugInfo";
      }
      if (this.disambiguationSupertypes == null) {
        missing += " disambiguationSupertypes";
      }
      if (this.invalidating == null) {
        missing += " invalidating";
      }
      if (this.propertiesKeepOriginalName == null) {
        missing += " propertiesKeepOriginalName";
      }
      if (this.constructor == null) {
        missing += " constructor";
      }
      if (this.ownProperties == null) {
        missing += " ownProperties";
      }
      if (this.closureAssert == null) {
        missing += " closureAssert";
      }
      if (!missing.isEmpty()) {
        throw new IllegalStateException("Missing required properties:" + missing);
      }
      return new AutoValue_SingletonColorFields(
          this.id,
          this.debugInfo,
          this.prototype,
          this.instanceColor,
          this.disambiguationSupertypes,
          this.invalidating,
          this.propertiesKeepOriginalName,
          this.constructor,
          this.ownProperties,
          this.nativeColorId,
          this.closureAssert);
    }
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy