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.

There is a newer version: v20240317
Show newest version


package com.google.javascript.jscomp;

import java.util.function.Function;
import javax.annotation.processing.Generated;

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

  private final String name;
  private final Function condition;
  private final boolean runInFixedPointLoop;
  private final Function internalFactory;

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

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

  @Override
  public Function getCondition() {
    return condition;
  }

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

  @Override
  Function getInternalFactory() {
    return internalFactory;
  }

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

  @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.condition.equals(that.getCondition()))
           && (this.runInFixedPointLoop == that.isRunInFixedPointLoop())
           && (this.internalFactory.equals(that.getInternalFactory()));
    }
    return false;
  }

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

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

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

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy