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

com.google.template.soy.jssrc.internal.AutoValue_TranslationContext Maven / Gradle / Ivy

There is a newer version: 2024-02-26
Show newest version

package com.google.template.soy.jssrc.internal;

import com.google.template.soy.base.internal.UniqueNameGenerator;
import com.google.template.soy.jssrc.dsl.CodeChunk;
import javax.annotation.Generated;

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

  private final SoyToJsVariableMappings soyToJsVariableMappings;
  private final CodeChunk.Generator codeGenerator;
  private final UniqueNameGenerator nameGenerator;

  AutoValue_TranslationContext(
      SoyToJsVariableMappings soyToJsVariableMappings,
      CodeChunk.Generator codeGenerator,
      UniqueNameGenerator nameGenerator) {
    if (soyToJsVariableMappings == null) {
      throw new NullPointerException("Null soyToJsVariableMappings");
    }
    this.soyToJsVariableMappings = soyToJsVariableMappings;
    if (codeGenerator == null) {
      throw new NullPointerException("Null codeGenerator");
    }
    this.codeGenerator = codeGenerator;
    if (nameGenerator == null) {
      throw new NullPointerException("Null nameGenerator");
    }
    this.nameGenerator = nameGenerator;
  }

  @Override
  public SoyToJsVariableMappings soyToJsVariableMappings() {
    return soyToJsVariableMappings;
  }

  @Override
  public CodeChunk.Generator codeGenerator() {
    return codeGenerator;
  }

  @Override
  UniqueNameGenerator nameGenerator() {
    return nameGenerator;
  }

  @Override
  public String toString() {
    return "TranslationContext{"
        + "soyToJsVariableMappings=" + soyToJsVariableMappings + ", "
        + "codeGenerator=" + codeGenerator + ", "
        + "nameGenerator=" + nameGenerator
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof TranslationContext) {
      TranslationContext that = (TranslationContext) o;
      return (this.soyToJsVariableMappings.equals(that.soyToJsVariableMappings()))
           && (this.codeGenerator.equals(that.codeGenerator()))
           && (this.nameGenerator.equals(that.nameGenerator()));
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h = 1;
    h *= 1000003;
    h ^= this.soyToJsVariableMappings.hashCode();
    h *= 1000003;
    h ^= this.codeGenerator.hashCode();
    h *= 1000003;
    h ^= this.nameGenerator.hashCode();
    return h;
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy