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

com.google.javascript.jscomp.modules.AutoValue_ModuleMetadataMap_ModuleMetadata 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. This binary checks for style issues such as incorrect or missing JSDoc usage, and missing goog.require() statements. It does not do more advanced checks such as typechecking.

There is a newer version: v20200830
Show newest version

package com.google.javascript.jscomp.modules;

import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMultiset;
import com.google.javascript.jscomp.deps.ModuleLoader;
import com.google.javascript.rhino.Node;
import javax.annotation.Generated;
import javax.annotation.Nullable;

@Generated("com.google.auto.value.processor.AutoValueProcessor")
 final class AutoValue_ModuleMetadataMap_ModuleMetadata extends ModuleMetadataMap.ModuleMetadata {

  private final ModuleMetadataMap.ModuleType moduleType;
  private final Node rootNode;
  private final boolean usesClosure;
  private final boolean isTestOnly;
  private final ImmutableMultiset googNamespaces;
  private final ImmutableMultiset requiredGoogNamespaces;
  private final ImmutableMultiset requiredTypes;
  private final ImmutableMultiset es6ImportSpecifiers;
  private final ImmutableList nestedModules;
  private final ModuleLoader.ModulePath path;

  private AutoValue_ModuleMetadataMap_ModuleMetadata(
      ModuleMetadataMap.ModuleType moduleType,
      @Nullable Node rootNode,
      boolean usesClosure,
      boolean isTestOnly,
      ImmutableMultiset googNamespaces,
      ImmutableMultiset requiredGoogNamespaces,
      ImmutableMultiset requiredTypes,
      ImmutableMultiset es6ImportSpecifiers,
      ImmutableList nestedModules,
      @Nullable ModuleLoader.ModulePath path) {
    this.moduleType = moduleType;
    this.rootNode = rootNode;
    this.usesClosure = usesClosure;
    this.isTestOnly = isTestOnly;
    this.googNamespaces = googNamespaces;
    this.requiredGoogNamespaces = requiredGoogNamespaces;
    this.requiredTypes = requiredTypes;
    this.es6ImportSpecifiers = es6ImportSpecifiers;
    this.nestedModules = nestedModules;
    this.path = path;
  }

  @Override
  public ModuleMetadataMap.ModuleType moduleType() {
    return moduleType;
  }

  @Nullable
  @Override
  public Node rootNode() {
    return rootNode;
  }

  @Override
  public boolean usesClosure() {
    return usesClosure;
  }

  @Override
  public boolean isTestOnly() {
    return isTestOnly;
  }

  @Override
  public ImmutableMultiset googNamespaces() {
    return googNamespaces;
  }

  @Override
  public ImmutableMultiset requiredGoogNamespaces() {
    return requiredGoogNamespaces;
  }

  @Override
  public ImmutableMultiset requiredTypes() {
    return requiredTypes;
  }

  @Override
  public ImmutableMultiset es6ImportSpecifiers() {
    return es6ImportSpecifiers;
  }

  @Override
  public ImmutableList nestedModules() {
    return nestedModules;
  }

  @Nullable
  @Override
  public ModuleLoader.ModulePath path() {
    return path;
  }

  @Override
  public String toString() {
    return "ModuleMetadata{"
        + "moduleType=" + moduleType + ", "
        + "rootNode=" + rootNode + ", "
        + "usesClosure=" + usesClosure + ", "
        + "isTestOnly=" + isTestOnly + ", "
        + "googNamespaces=" + googNamespaces + ", "
        + "requiredGoogNamespaces=" + requiredGoogNamespaces + ", "
        + "requiredTypes=" + requiredTypes + ", "
        + "es6ImportSpecifiers=" + es6ImportSpecifiers + ", "
        + "nestedModules=" + nestedModules + ", "
        + "path=" + path
        + "}";
  }

  static final class Builder extends ModuleMetadataMap.ModuleMetadata.Builder {
    private ModuleMetadataMap.ModuleType moduleType;
    private Node rootNode;
    private Boolean usesClosure;
    private Boolean isTestOnly;
    private ImmutableMultiset.Builder googNamespacesBuilder$;
    private ImmutableMultiset googNamespaces;
    private ImmutableMultiset.Builder requiredGoogNamespacesBuilder$;
    private ImmutableMultiset requiredGoogNamespaces;
    private ImmutableMultiset.Builder requiredTypesBuilder$;
    private ImmutableMultiset requiredTypes;
    private ImmutableMultiset.Builder es6ImportSpecifiersBuilder$;
    private ImmutableMultiset es6ImportSpecifiers;
    private ImmutableList.Builder nestedModulesBuilder$;
    private ImmutableList nestedModules;
    private ModuleLoader.ModulePath path;
    Builder() {
    }
    @Override
    public ModuleMetadataMap.ModuleMetadata.Builder moduleType(ModuleMetadataMap.ModuleType moduleType) {
      if (moduleType == null) {
        throw new NullPointerException("Null moduleType");
      }
      this.moduleType = moduleType;
      return this;
    }
    @Override
    public ModuleMetadataMap.ModuleType moduleType() {
      if (moduleType == null) {
        throw new IllegalStateException("Property \"moduleType\" has not been set");
      }
      return moduleType;
    }
    @Override
    public ModuleMetadataMap.ModuleMetadata.Builder rootNode(@Nullable Node rootNode) {
      this.rootNode = rootNode;
      return this;
    }
    @Override
    public ModuleMetadataMap.ModuleMetadata.Builder usesClosure(boolean usesClosure) {
      this.usesClosure = usesClosure;
      return this;
    }
    @Override
    public ModuleMetadataMap.ModuleMetadata.Builder isTestOnly(boolean isTestOnly) {
      this.isTestOnly = isTestOnly;
      return this;
    }
    @Override
    public ImmutableMultiset.Builder googNamespacesBuilder() {
      if (googNamespacesBuilder$ == null) {
        googNamespacesBuilder$ = ImmutableMultiset.builder();
      }
      return googNamespacesBuilder$;
    }
    @Override
    public ImmutableMultiset.Builder requiredGoogNamespacesBuilder() {
      if (requiredGoogNamespacesBuilder$ == null) {
        requiredGoogNamespacesBuilder$ = ImmutableMultiset.builder();
      }
      return requiredGoogNamespacesBuilder$;
    }
    @Override
    public ImmutableMultiset.Builder requiredTypesBuilder() {
      if (requiredTypesBuilder$ == null) {
        requiredTypesBuilder$ = ImmutableMultiset.builder();
      }
      return requiredTypesBuilder$;
    }
    @Override
    public ImmutableMultiset.Builder es6ImportSpecifiersBuilder() {
      if (es6ImportSpecifiersBuilder$ == null) {
        es6ImportSpecifiersBuilder$ = ImmutableMultiset.builder();
      }
      return es6ImportSpecifiersBuilder$;
    }
    @Override
    public ImmutableList.Builder nestedModulesBuilder() {
      if (nestedModulesBuilder$ == null) {
        nestedModulesBuilder$ = ImmutableList.builder();
      }
      return nestedModulesBuilder$;
    }
    @Override
    public ModuleMetadataMap.ModuleMetadata.Builder path(@Nullable ModuleLoader.ModulePath path) {
      this.path = path;
      return this;
    }
    @Override
    public ModuleMetadataMap.ModuleMetadata build() {
      if (googNamespacesBuilder$ != null) {
        this.googNamespaces = googNamespacesBuilder$.build();
      } else if (this.googNamespaces == null) {
        this.googNamespaces = ImmutableMultiset.of();
      }
      if (requiredGoogNamespacesBuilder$ != null) {
        this.requiredGoogNamespaces = requiredGoogNamespacesBuilder$.build();
      } else if (this.requiredGoogNamespaces == null) {
        this.requiredGoogNamespaces = ImmutableMultiset.of();
      }
      if (requiredTypesBuilder$ != null) {
        this.requiredTypes = requiredTypesBuilder$.build();
      } else if (this.requiredTypes == null) {
        this.requiredTypes = ImmutableMultiset.of();
      }
      if (es6ImportSpecifiersBuilder$ != null) {
        this.es6ImportSpecifiers = es6ImportSpecifiersBuilder$.build();
      } else if (this.es6ImportSpecifiers == null) {
        this.es6ImportSpecifiers = ImmutableMultiset.of();
      }
      if (nestedModulesBuilder$ != null) {
        this.nestedModules = nestedModulesBuilder$.build();
      } else if (this.nestedModules == null) {
        this.nestedModules = ImmutableList.of();
      }
      String missing = "";
      if (this.moduleType == null) {
        missing += " moduleType";
      }
      if (this.usesClosure == null) {
        missing += " usesClosure";
      }
      if (this.isTestOnly == null) {
        missing += " isTestOnly";
      }
      if (!missing.isEmpty()) {
        throw new IllegalStateException("Missing required properties:" + missing);
      }
      return new AutoValue_ModuleMetadataMap_ModuleMetadata(
          this.moduleType,
          this.rootNode,
          this.usesClosure,
          this.isTestOnly,
          this.googNamespaces,
          this.requiredGoogNamespaces,
          this.requiredTypes,
          this.es6ImportSpecifiers,
          this.nestedModules,
          this.path);
    }
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy