Class Export
- java.lang.Object
-
- com.google.javascript.jscomp.modules.Export
-
public abstract class Export extends java.lang.ObjectAnexported name in a module.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringDEFAULT_EXPORT_NAMEThelocalName()of anonymous ES module default exports, e.g.static java.lang.StringNAMESPACETheexportName()of goog.module default exports, e.g.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract java.lang.StringclosureNamespace()abstract java.lang.StringexportName()Returns the name of this export or null if this is anexport * from.abstract NodeexportNode()Node that this export originates from.abstract java.lang.StringimportName()Returns the name imported from another module.abstract java.lang.StringlocalName()Returns the local name of this export or null if none.abstract ModuleMetadataMap.ModuleMetadatamoduleMetadata()The module that contains this export.abstract ModuleLoader.ModulePathmodulePath()Returns the path of the containing moduleabstract java.lang.StringmoduleRequest()Returns the module identifier of an export from or null if this is not anexport {} fromorexport * from.abstract booleanmutated()Whether or not this export is potentially mutated after module execution (i.e.abstract NodenameNode()Node that this export originates from.
-
-
-
Field Detail
-
DEFAULT_EXPORT_NAME
public static final java.lang.String DEFAULT_EXPORT_NAME
ThelocalName()of anonymous ES module default exports, e.g.export default 0.- See Also:
- Constant Field Values
-
NAMESPACE
public static final java.lang.String NAMESPACE
TheexportName()of goog.module default exports, e.g.exports = class {};, and the 'namespace' of an ES module consisting of all exported names.- See Also:
- Constant Field Values
-
-
Method Detail
-
exportName
@Nullable public abstract java.lang.String exportName()
Returns the name of this export or null if this is anexport * from.
-
moduleRequest
@Nullable public abstract java.lang.String moduleRequest()
Returns the module identifier of an export from or null if this is not anexport {} fromorexport * from.
-
importName
@Nullable public abstract java.lang.String importName()
Returns the name imported from another module. * if import all or null if not anexport {} from.
-
localName
@Nullable public abstract java.lang.String localName()
Returns the local name of this export or null if none. *default* if default.
-
modulePath
@Nullable public abstract ModuleLoader.ModulePath modulePath()
Returns the path of the containing module
-
exportNode
@Nullable public abstract Node exportNode()
Node that this export originates from. Used for its source location.Null only if from non-ES module or from a missing ES module.
-
nameNode
@Nullable public abstract Node nameNode()
Node that this export originates from. Used for its source location.Null only if from non-ES6 module or an export syntax that has no associated name, e.g.
export * from.
-
moduleMetadata
public abstract ModuleMetadataMap.ModuleMetadata moduleMetadata()
The module that contains this export.
-
closureNamespace
@Nullable public abstract java.lang.String closureNamespace()
-
mutated
public abstract boolean mutated()
Whether or not this export is potentially mutated after module execution (i.e. in a function scope).
-
-