public abstract class Binding
extends java.lang.Object
See Module.namespace()
and Module.boundNames()
for how Bindings are used.
Modifier and Type | Method and Description |
---|---|
java.lang.String |
boundName()
The name of the variable this export is bound to, assuming it is not a binding of a module
namespace.
|
abstract java.lang.String |
closureNamespace() |
abstract boolean |
isModuleNamespace()
True if this represents a module namespace, e.g.
|
boolean |
isMutated()
Returns whether or not this export is potentially mutated after module execution (i.e.
|
abstract ModuleMetadataMap.ModuleMetadata |
metadata()
Metadata of the module this is bound to.
|
abstract Export |
originatingExport()
Returns the original export if this binding was created by an export.
|
abstract Node |
sourceNode()
The AST node to use for source location when rewriting.
|
public abstract ModuleMetadataMap.ModuleMetadata metadata()
If this was made from an import *
then it is the module that this imported.
Otherwise it is the module this binding was created in (e.g. the module of the originating
export).
public abstract Node sourceNode()
This is generally a NAME node inside an import or export statement that represents where the
name was bound. However as export * from
has no NAME nodes the source node in that
instance should be the entire export node.
@Nullable public abstract Export originatingExport()
For transitive exports this will still be the *original* export, not the transitive link.
public abstract boolean isModuleNamespace()
import *
@Nullable public abstract java.lang.String closureNamespace()
public final java.lang.String boundName()
public final boolean isMutated()
Copyright © 2009-2019 Google. All Rights Reserved.