com.google.javascript.jscomp.modules.AutoValue_ModuleMetadataMap_ModuleMetadata Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of closure-compiler-unshaded Show documentation
Show all versions of closure-compiler-unshaded Show documentation
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.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.processing.Generated;
import org.jspecify.nullness.Nullable;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_ModuleMetadataMap_ModuleMetadata extends ModuleMetadataMap.ModuleMetadata {
private final ModuleMetadataMap.ModuleType moduleType;
private final @Nullable Node rootNode;
private final boolean usesClosure;
private final boolean isTestOnly;
private final ImmutableMultiset googNamespaces;
private final ImmutableMultiset stronglyRequiredGoogNamespaces;
private final ImmutableMultiset dynamicallyRequiredGoogNamespaces;
private final ImmutableMultiset maybeRequiredGoogNamespaces;
private final ImmutableMultiset weaklyRequiredGoogNamespaces;
private final ImmutableMultiset es6ImportSpecifiers;
private final ImmutableList nestedModules;
private final ImmutableMultiset readToggles;
private final ModuleLoader.@Nullable ModulePath path;
private AutoValue_ModuleMetadataMap_ModuleMetadata(
ModuleMetadataMap.ModuleType moduleType,
@Nullable Node rootNode,
boolean usesClosure,
boolean isTestOnly,
ImmutableMultiset googNamespaces,
ImmutableMultiset stronglyRequiredGoogNamespaces,
ImmutableMultiset dynamicallyRequiredGoogNamespaces,
ImmutableMultiset maybeRequiredGoogNamespaces,
ImmutableMultiset weaklyRequiredGoogNamespaces,
ImmutableMultiset es6ImportSpecifiers,
ImmutableList nestedModules,
ImmutableMultiset readToggles,
ModuleLoader.@Nullable ModulePath path) {
this.moduleType = moduleType;
this.rootNode = rootNode;
this.usesClosure = usesClosure;
this.isTestOnly = isTestOnly;
this.googNamespaces = googNamespaces;
this.stronglyRequiredGoogNamespaces = stronglyRequiredGoogNamespaces;
this.dynamicallyRequiredGoogNamespaces = dynamicallyRequiredGoogNamespaces;
this.maybeRequiredGoogNamespaces = maybeRequiredGoogNamespaces;
this.weaklyRequiredGoogNamespaces = weaklyRequiredGoogNamespaces;
this.es6ImportSpecifiers = es6ImportSpecifiers;
this.nestedModules = nestedModules;
this.readToggles = readToggles;
this.path = path;
}
@Override
public ModuleMetadataMap.ModuleType moduleType() {
return moduleType;
}
@Override
public @Nullable 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 stronglyRequiredGoogNamespaces() {
return stronglyRequiredGoogNamespaces;
}
@Override
public ImmutableMultiset dynamicallyRequiredGoogNamespaces() {
return dynamicallyRequiredGoogNamespaces;
}
@Override
public ImmutableMultiset maybeRequiredGoogNamespaces() {
return maybeRequiredGoogNamespaces;
}
@Override
public ImmutableMultiset weaklyRequiredGoogNamespaces() {
return weaklyRequiredGoogNamespaces;
}
@Override
public ImmutableMultiset es6ImportSpecifiers() {
return es6ImportSpecifiers;
}
@Override
public ImmutableList nestedModules() {
return nestedModules;
}
@Override
public ImmutableMultiset readToggles() {
return readToggles;
}
@Override
public ModuleLoader.@Nullable ModulePath path() {
return path;
}
@Override
public String toString() {
return "ModuleMetadata{"
+ "moduleType=" + moduleType + ", "
+ "rootNode=" + rootNode + ", "
+ "usesClosure=" + usesClosure + ", "
+ "isTestOnly=" + isTestOnly + ", "
+ "googNamespaces=" + googNamespaces + ", "
+ "stronglyRequiredGoogNamespaces=" + stronglyRequiredGoogNamespaces + ", "
+ "dynamicallyRequiredGoogNamespaces=" + dynamicallyRequiredGoogNamespaces + ", "
+ "maybeRequiredGoogNamespaces=" + maybeRequiredGoogNamespaces + ", "
+ "weaklyRequiredGoogNamespaces=" + weaklyRequiredGoogNamespaces + ", "
+ "es6ImportSpecifiers=" + es6ImportSpecifiers + ", "
+ "nestedModules=" + nestedModules + ", "
+ "readToggles=" + readToggles + ", "
+ "path=" + path
+ "}";
}
static final class Builder extends ModuleMetadataMap.ModuleMetadata.Builder {
private ModuleMetadataMap.@Nullable ModuleType moduleType;
private @Nullable Node rootNode;
private boolean usesClosure;
private boolean isTestOnly;
private ImmutableMultiset.@Nullable Builder googNamespacesBuilder$;
private @Nullable ImmutableMultiset googNamespaces;
private ImmutableMultiset.@Nullable Builder stronglyRequiredGoogNamespacesBuilder$;
private @Nullable ImmutableMultiset stronglyRequiredGoogNamespaces;
private ImmutableMultiset.@Nullable Builder dynamicallyRequiredGoogNamespacesBuilder$;
private @Nullable ImmutableMultiset dynamicallyRequiredGoogNamespaces;
private ImmutableMultiset.@Nullable Builder maybeRequiredGoogNamespacesBuilder$;
private @Nullable ImmutableMultiset maybeRequiredGoogNamespaces;
private ImmutableMultiset.@Nullable Builder weaklyRequiredGoogNamespacesBuilder$;
private @Nullable ImmutableMultiset weaklyRequiredGoogNamespaces;
private ImmutableMultiset.@Nullable Builder es6ImportSpecifiersBuilder$;
private @Nullable ImmutableMultiset es6ImportSpecifiers;
private ImmutableList.@Nullable Builder nestedModulesBuilder$;
private @Nullable ImmutableList nestedModules;
private ImmutableMultiset.@Nullable Builder readTogglesBuilder$;
private @Nullable ImmutableMultiset readToggles;
private ModuleLoader.@Nullable ModulePath path;
private byte set$0;
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 (this.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;
set$0 |= (byte) 1;
return this;
}
@Override
public ModuleMetadataMap.ModuleMetadata.Builder isTestOnly(boolean isTestOnly) {
this.isTestOnly = isTestOnly;
set$0 |= (byte) 2;
return this;
}
@Override
public ImmutableMultiset.Builder googNamespacesBuilder() {
if (googNamespacesBuilder$ == null) {
googNamespacesBuilder$ = ImmutableMultiset.builder();
}
return googNamespacesBuilder$;
}
@Override
public ImmutableMultiset.Builder stronglyRequiredGoogNamespacesBuilder() {
if (stronglyRequiredGoogNamespacesBuilder$ == null) {
stronglyRequiredGoogNamespacesBuilder$ = ImmutableMultiset.builder();
}
return stronglyRequiredGoogNamespacesBuilder$;
}
@Override
public ImmutableMultiset.Builder dynamicallyRequiredGoogNamespacesBuilder() {
if (dynamicallyRequiredGoogNamespacesBuilder$ == null) {
dynamicallyRequiredGoogNamespacesBuilder$ = ImmutableMultiset.builder();
}
return dynamicallyRequiredGoogNamespacesBuilder$;
}
@Override
public ImmutableMultiset.Builder maybeRequiredGoogNamespacesBuilder() {
if (maybeRequiredGoogNamespacesBuilder$ == null) {
maybeRequiredGoogNamespacesBuilder$ = ImmutableMultiset.builder();
}
return maybeRequiredGoogNamespacesBuilder$;
}
@Override
public ImmutableMultiset.Builder weaklyRequiredGoogNamespacesBuilder() {
if (weaklyRequiredGoogNamespacesBuilder$ == null) {
weaklyRequiredGoogNamespacesBuilder$ = ImmutableMultiset.builder();
}
return weaklyRequiredGoogNamespacesBuilder$;
}
@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 ImmutableMultiset.Builder readTogglesBuilder() {
if (readTogglesBuilder$ == null) {
readTogglesBuilder$ = ImmutableMultiset.builder();
}
return readTogglesBuilder$;
}
@Override
public ModuleMetadataMap.ModuleMetadata.Builder path(ModuleLoader.@Nullable 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 (stronglyRequiredGoogNamespacesBuilder$ != null) {
this.stronglyRequiredGoogNamespaces = stronglyRequiredGoogNamespacesBuilder$.build();
} else if (this.stronglyRequiredGoogNamespaces == null) {
this.stronglyRequiredGoogNamespaces = ImmutableMultiset.of();
}
if (dynamicallyRequiredGoogNamespacesBuilder$ != null) {
this.dynamicallyRequiredGoogNamespaces = dynamicallyRequiredGoogNamespacesBuilder$.build();
} else if (this.dynamicallyRequiredGoogNamespaces == null) {
this.dynamicallyRequiredGoogNamespaces = ImmutableMultiset.of();
}
if (maybeRequiredGoogNamespacesBuilder$ != null) {
this.maybeRequiredGoogNamespaces = maybeRequiredGoogNamespacesBuilder$.build();
} else if (this.maybeRequiredGoogNamespaces == null) {
this.maybeRequiredGoogNamespaces = ImmutableMultiset.of();
}
if (weaklyRequiredGoogNamespacesBuilder$ != null) {
this.weaklyRequiredGoogNamespaces = weaklyRequiredGoogNamespacesBuilder$.build();
} else if (this.weaklyRequiredGoogNamespaces == null) {
this.weaklyRequiredGoogNamespaces = 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();
}
if (readTogglesBuilder$ != null) {
this.readToggles = readTogglesBuilder$.build();
} else if (this.readToggles == null) {
this.readToggles = ImmutableMultiset.of();
}
if (set$0 != 3
|| this.moduleType == null) {
StringBuilder missing = new StringBuilder();
if (this.moduleType == null) {
missing.append(" moduleType");
}
if ((set$0 & 1) == 0) {
missing.append(" usesClosure");
}
if ((set$0 & 2) == 0) {
missing.append(" isTestOnly");
}
throw new IllegalStateException("Missing required properties:" + missing);
}
return new AutoValue_ModuleMetadataMap_ModuleMetadata(
this.moduleType,
this.rootNode,
this.usesClosure,
this.isTestOnly,
this.googNamespaces,
this.stronglyRequiredGoogNamespaces,
this.dynamicallyRequiredGoogNamespaces,
this.maybeRequiredGoogNamespaces,
this.weaklyRequiredGoogNamespaces,
this.es6ImportSpecifiers,
this.nestedModules,
this.readToggles,
this.path);
}
}
}