Class ModuleMetadataMap.ModuleMetadata
- Enclosing class:
ModuleMetadataMap
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
abstract com.google.common.collect.ImmutableMultiset
<String> Closure namespaces this file dynamically require, i.e., arguments to goog.requireDynamic() calls.final boolean
abstract com.google.common.collect.ImmutableMultiset
<String> Raw text of all ES6 import specifiers (includes "export from" as well).abstract com.google.common.collect.ImmutableMultiset
<String> Closure namespaces that this file is associated with.final int
hashCode()
boolean
boolean
boolean
boolean
boolean
boolean
boolean
isModule()
Whether this is a module (with it's own local scope).boolean
boolean
abstract boolean
Whether goog.setTestOnly was called.abstract com.google.common.collect.ImmutableMultiset
<String> Closure namespaces this file "maybe" require, i.e., arguments to goog.maybeRequireFrameworkInternalOnlyDoNotCallOrElse() calls.abstract ModuleMetadataMap.ModuleType
abstract com.google.common.collect.ImmutableList
<ModuleMetadataMap.ModuleMetadata> abstract @Nullable ModuleLoader.ModulePath
path()
abstract com.google.common.collect.ImmutableMultiset
<String> Arguments to goog.readToggleInternalDoNotCallDirectly() calls.abstract @Nullable Node
rootNode()
AST node that represents the root of this module.abstract com.google.common.collect.ImmutableMultiset
<String> Closure namespaces this file strongly requires, i.e., arguments to goog.require calls.abstract boolean
Whether this file uses Closure Library at all.abstract com.google.common.collect.ImmutableMultiset
<String> Closure namespaces this file weakly requires, i.e., arguments to goog.requireType calls.
-
Constructor Details
-
ModuleMetadata
public ModuleMetadata()
-
-
Method Details
-
moduleType
-
isEs6Module
public boolean isEs6Module() -
isGoogModule
public boolean isGoogModule() -
isNonLegacyGoogModule
public boolean isNonLegacyGoogModule() -
isLegacyGoogModule
public boolean isLegacyGoogModule() -
isGoogProvide
public boolean isGoogProvide() -
hasLegacyGoogNamespaces
public boolean hasLegacyGoogNamespaces() -
isCommonJs
public boolean isCommonJs() -
isNonProvideScript
public boolean isNonProvideScript() -
isModule
public boolean isModule()Whether this is a module (with it's own local scope). -
rootNode
AST node that represents the root of this module.May be null if this is a synthetic piece of metadata - e.g. in a test, or something used as a fallback.
-
usesClosure
public abstract boolean usesClosure()Whether this file uses Closure Library at all. Note that a file could use Closure Library even without calling goog.provide/module/require - there are some primitives in base.js that can be used without being required like goog.isArray.If this is true this indicates the base.js is needed and is not part of this script - it is an EXTERNAL dependencym otherwise false. If this is also false if Closure Library is part of this script - e.g. a bundle with base.js. So something could be a "goog.provide'd file", but not use Closure if the bundle already contains Closure.
-
isTestOnly
public abstract boolean isTestOnly()Whether goog.setTestOnly was called. -
googNamespaces
Closure namespaces that this file is associated with. Created by goog.provide, goog.module, and goog.declareModuleId.This is a multiset as it does not warn on duplicate namespaces, but will still encapsulate that information with this multiset.
-
stronglyRequiredGoogNamespaces
public abstract com.google.common.collect.ImmutableMultiset<String> stronglyRequiredGoogNamespaces()Closure namespaces this file strongly requires, i.e., arguments to goog.require calls.This is a multiset as it does not warn on duplicate namespaces, but will still encapsulate that information with this multiset.
-
dynamicallyRequiredGoogNamespaces
public abstract com.google.common.collect.ImmutableMultiset<String> dynamicallyRequiredGoogNamespaces()Closure namespaces this file dynamically require, i.e., arguments to goog.requireDynamic() calls.This is a multiset as it does not warn on duplicate namespaces, but will still encapsulate that information with this multiset.
-
maybeRequiredGoogNamespaces
Closure namespaces this file "maybe" require, i.e., arguments to goog.maybeRequireFrameworkInternalOnlyDoNotCallOrElse() calls.This is a multiset as it does not warn on duplicate namespaces, but will still encapsulate that information with this multiset.
-
weaklyRequiredGoogNamespaces
Closure namespaces this file weakly requires, i.e., arguments to goog.requireType calls.This is a multiset as it does not warn on duplicate namespaces, but will still encapsulate that information with this multiset.
-
es6ImportSpecifiers
Raw text of all ES6 import specifiers (includes "export from" as well). -
nestedModules
public abstract com.google.common.collect.ImmutableList<ModuleMetadataMap.ModuleMetadata> nestedModules() -
readToggles
Arguments to goog.readToggleInternalDoNotCallDirectly() calls.This is a multiset as it does not warn on duplicate toggles, but will still encapsulate that information with this multiset.
-
path
-
builder
-
equals
-
hashCode
public final int hashCode()
-