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.

The newest version!
package com.google.javascript.jscomp;

import java.util.function.Function;
import javax.annotation.processing.Generated;
import org.jspecify.nullness.Nullable;

@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(@Nullable 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 @Nullable String name;
    private @Nullable Function condition;
    private boolean runInFixedPointLoop;
    private @Nullable Function internalFactory;
    private byte set$0;
    Builder() {
    }
    private Builder(PassFactory source) {
      this.name = source.getName();
      this.condition = source.getCondition();
      this.runInFixedPointLoop = source.isRunInFixedPointLoop();
      this.internalFactory = source.getInternalFactory();
      set$0 = (byte) 1;
    }
    @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;
      set$0 |= (byte) 1;
      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() {
      if (set$0 != 1
          || this.name == null
          || this.condition == null
          || this.internalFactory == null) {
        StringBuilder missing = new StringBuilder();
        if (this.name == null) {
          missing.append(" name");
        }
        if (this.condition == null) {
          missing.append(" condition");
        }
        if ((set$0 & 1) == 0) {
          missing.append(" runInFixedPointLoop");
        }
        if (this.internalFactory == null) {
          missing.append(" internalFactory");
        }
        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