com.google.template.soy.jssrc.internal.AutoValue_TranslationContext Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of soy Show documentation
Show all versions of soy Show documentation
Closure Templates are a client-side and server-side templating system.
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;
}
}