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

com.google.javascript.jscomp.AutoValue_Es6RewriteClass_ClassProperty 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 com.google.javascript.jscomp.colors.Color;
import com.google.javascript.rhino.JSDocInfo;
import javax.annotation.processing.Generated;
import org.jspecify.nullness.Nullable;

@Generated("com.google.auto.value.processor.AutoValueProcessor")
 final class AutoValue_Es6RewriteClass_ClassProperty extends Es6RewriteClass.ClassProperty {

  private final String propertyKey;
  private final Es6RewriteClass.ClassProperty.PropertyKind kind;
  private final JSDocInfo jsDocInfo;
  private final @Nullable Color propertyType;

  private AutoValue_Es6RewriteClass_ClassProperty(
      String propertyKey,
      Es6RewriteClass.ClassProperty.PropertyKind kind,
      JSDocInfo jsDocInfo,
       @Nullable Color propertyType) {
    this.propertyKey = propertyKey;
    this.kind = kind;
    this.jsDocInfo = jsDocInfo;
    this.propertyType = propertyType;
  }

  @Override
  String propertyKey() {
    return propertyKey;
  }

  @Override
  Es6RewriteClass.ClassProperty.PropertyKind kind() {
    return kind;
  }

  @Override
  JSDocInfo jsDocInfo() {
    return jsDocInfo;
  }

  @Override
  @Nullable Color propertyType() {
    return propertyType;
  }

  @Override
  public String toString() {
    return "ClassProperty{"
         + "propertyKey=" + propertyKey + ", "
         + "kind=" + kind + ", "
         + "jsDocInfo=" + jsDocInfo + ", "
         + "propertyType=" + propertyType
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof Es6RewriteClass.ClassProperty) {
      Es6RewriteClass.ClassProperty that = (Es6RewriteClass.ClassProperty) o;
      return (this.propertyKey.equals(that.propertyKey()))
           && (this.kind.equals(that.kind()))
           && (this.jsDocInfo.equals(that.jsDocInfo()))
           && ((this.propertyType == null) ? (that.propertyType() == null) : this.propertyType.equals(that.propertyType()));
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= propertyKey.hashCode();
    h$ *= 1000003;
    h$ ^= kind.hashCode();
    h$ *= 1000003;
    h$ ^= jsDocInfo.hashCode();
    h$ *= 1000003;
    h$ ^= (propertyType == null) ? 0 : propertyType.hashCode();
    return h$;
  }

  static final class Builder extends Es6RewriteClass.ClassProperty.Builder {
    private String propertyKey;
    private Es6RewriteClass.ClassProperty.PropertyKind kind;
    private JSDocInfo jsDocInfo;
    private @Nullable Color propertyType;
    Builder() {
    }
    @Override
    Es6RewriteClass.ClassProperty.Builder propertyKey(String propertyKey) {
      if (propertyKey == null) {
        throw new NullPointerException("Null propertyKey");
      }
      this.propertyKey = propertyKey;
      return this;
    }
    @Override
    Es6RewriteClass.ClassProperty.Builder kind(Es6RewriteClass.ClassProperty.PropertyKind kind) {
      if (kind == null) {
        throw new NullPointerException("Null kind");
      }
      this.kind = kind;
      return this;
    }
    @Override
    Es6RewriteClass.ClassProperty.Builder jsDocInfo(JSDocInfo jsDocInfo) {
      if (jsDocInfo == null) {
        throw new NullPointerException("Null jsDocInfo");
      }
      this.jsDocInfo = jsDocInfo;
      return this;
    }
    @Override
    Es6RewriteClass.ClassProperty.Builder propertyType(@Nullable Color propertyType) {
      this.propertyType = propertyType;
      return this;
    }
    @Override
    Es6RewriteClass.ClassProperty build() {
      String missing = "";
      if (this.propertyKey == null) {
        missing += " propertyKey";
      }
      if (this.kind == null) {
        missing += " kind";
      }
      if (this.jsDocInfo == null) {
        missing += " jsDocInfo";
      }
      if (!missing.isEmpty()) {
        throw new IllegalStateException("Missing required properties:" + missing);
      }
      return new AutoValue_Es6RewriteClass_ClassProperty(
          this.propertyKey,
          this.kind,
          this.jsDocInfo,
          this.propertyType);
    }
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy