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

com.google.javascript.jscomp.AutoValue_PassFactory 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. This binary checks for style issues such as incorrect or missing JSDoc usage, and missing goog.require() statements. It does not do more advanced checks such as typechecking.

There is a newer version: v20200830
Show newest version

package com.google.javascript.jscomp;

import com.google.javascript.jscomp.parsing.parser.FeatureSet;
import java.util.function.Function;
import javax.annotation.Generated;

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

  private final String name;
  private final boolean runInFixedPointLoop;
  private final FeatureSet featureSet;
  private final Function internalFactory;
  private final boolean hotSwapable;

  private AutoValue_PassFactory(
      String name,
      boolean runInFixedPointLoop,
      FeatureSet featureSet,
      Function internalFactory,
      boolean hotSwapable) {
    this.name = name;
    this.runInFixedPointLoop = runInFixedPointLoop;
    this.featureSet = featureSet;
    this.internalFactory = internalFactory;
    this.hotSwapable = hotSwapable;
  }

  @Override
  public String getName() {
    return name;
  }

  @Override
  public boolean isRunInFixedPointLoop() {
    return runInFixedPointLoop;
  }

  @Override
  public FeatureSet getFeatureSet() {
    return featureSet;
  }

  @Override
  Function getInternalFactory() {
    return internalFactory;
  }

  @Override
  boolean isHotSwapable() {
    return hotSwapable;
  }

  @Override
  public String toString() {
    return "PassFactory{"
        + "name=" + name + ", "
        + "runInFixedPointLoop=" + runInFixedPointLoop + ", "
        + "featureSet=" + featureSet + ", "
        + "internalFactory=" + internalFactory + ", "
        + "hotSwapable=" + hotSwapable
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof PassFactory) {
      PassFactory that = (PassFactory) o;
      return (this.name.equals(that.getName()))
           && (this.runInFixedPointLoop == that.isRunInFixedPointLoop())
           && (this.featureSet.equals(that.getFeatureSet()))
           && (this.internalFactory.equals(that.getInternalFactory()))
           && (this.hotSwapable == that.isHotSwapable());
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h = 1;
    h *= 1000003;
    h ^= this.name.hashCode();
    h *= 1000003;
    h ^= this.runInFixedPointLoop ? 1231 : 1237;
    h *= 1000003;
    h ^= this.featureSet.hashCode();
    h *= 1000003;
    h ^= this.internalFactory.hashCode();
    h *= 1000003;
    h ^= this.hotSwapable ? 1231 : 1237;
    return h;
  }

  @Override
  public PassFactory.Builder toBuilder() {
    return new Builder(this);
  }

  static final class Builder extends PassFactory.Builder {
    private String name;
    private Boolean runInFixedPointLoop;
    private FeatureSet featureSet;
    private Function internalFactory;
    private Boolean hotSwapable;
    Builder() {
    }
    private Builder(PassFactory source) {
      this.name = source.getName();
      this.runInFixedPointLoop = source.isRunInFixedPointLoop();
      this.featureSet = source.getFeatureSet();
      this.internalFactory = source.getInternalFactory();
      this.hotSwapable = source.isHotSwapable();
    }
    @Override
    public PassFactory.Builder setName(String name) {
      if (name == null) {
        throw new NullPointerException("Null name");
      }
      this.name = name;
      return this;
    }
    @Override
    public PassFactory.Builder setRunInFixedPointLoop(boolean runInFixedPointLoop) {
      this.runInFixedPointLoop = runInFixedPointLoop;
      return this;
    }
    @Override
    public PassFactory.Builder setFeatureSet(FeatureSet featureSet) {
      if (featureSet == null) {
        throw new NullPointerException("Null featureSet");
      }
      this.featureSet = featureSet;
      return this;
    }
    @Override
    public PassFactory.Builder setInternalFactory(Function internalFactory) {
      if (internalFactory == null) {
        throw new NullPointerException("Null internalFactory");
      }
      this.internalFactory = internalFactory;
      return this;
    }
    @Override
    PassFactory.Builder setHotSwapable(boolean hotSwapable) {
      this.hotSwapable = hotSwapable;
      return this;
    }
    @Override
    PassFactory autoBuild() {
      String missing = "";
      if (this.name == null) {
        missing += " name";
      }
      if (this.runInFixedPointLoop == null) {
        missing += " runInFixedPointLoop";
      }
      if (this.featureSet == null) {
        missing += " featureSet";
      }
      if (this.internalFactory == null) {
        missing += " internalFactory";
      }
      if (this.hotSwapable == null) {
        missing += " hotSwapable";
      }
      if (!missing.isEmpty()) {
        throw new IllegalStateException("Missing required properties:" + missing);
      }
      return new AutoValue_PassFactory(
          this.name,
          this.runInFixedPointLoop,
          this.featureSet,
          this.internalFactory,
          this.hotSwapable);
    }
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy