static class GlobalNamespace.Ref extends java.lang.Object implements StaticTypedRef<TypeI>
Modifier and Type | Class and Description |
---|---|
(package private) static class |
GlobalNamespace.Ref.Type |
Modifier and Type | Field and Description |
---|---|
(package private) JSModule |
module |
(package private) GlobalNamespace.Name |
name |
(package private) Node |
node |
(package private) int |
preOrderIndex |
(package private) Scope |
scope |
(package private) StaticSourceFile |
source |
private GlobalNamespace.Ref |
twin
Certain types of references are actually double-refs.
|
(package private) GlobalNamespace.Ref.Type |
type |
Modifier | Constructor and Description |
---|---|
private |
Ref(GlobalNamespace.Ref.Type type,
int index) |
private |
Ref(GlobalNamespace.Ref original,
GlobalNamespace.Ref.Type type,
int index) |
(package private) |
Ref(JSModule module,
Scope scope,
Node node,
GlobalNamespace.Name name,
GlobalNamespace.Ref.Type type,
int index)
Creates a reference at the current node.
|
Modifier and Type | Method and Description |
---|---|
(package private) GlobalNamespace.Ref |
cloneAndReclassify(GlobalNamespace.Ref.Type type)
Create a new ref that is the same as this one, but of
a different class.
|
(package private) static GlobalNamespace.Ref |
createRefForTesting(GlobalNamespace.Ref.Type type) |
(package private) JSModule |
getModule() |
Node |
getNode()
The node where the reference lives.
|
StaticSourceFile |
getSourceFile()
The source file where the reference lives.
|
StaticTypedSlot<TypeI> |
getSymbol()
The variable that this reference points to.
|
(package private) GlobalNamespace.Ref |
getTwin() |
(package private) boolean |
isSet() |
(package private) static void |
markTwins(GlobalNamespace.Ref a,
GlobalNamespace.Ref b) |
java.lang.String |
toString() |
Node node
final JSModule module
final StaticSourceFile source
final GlobalNamespace.Name name
final GlobalNamespace.Ref.Type type
final Scope scope
final int preOrderIndex
private GlobalNamespace.Ref twin
Ref(JSModule module, Scope scope, Node node, GlobalNamespace.Name name, GlobalNamespace.Ref.Type type, int index)
private Ref(GlobalNamespace.Ref original, GlobalNamespace.Ref.Type type, int index)
private Ref(GlobalNamespace.Ref.Type type, int index)
public Node getNode()
StaticRef
public StaticSourceFile getSourceFile()
StaticRef
getSourceFile
in interface StaticRef
public StaticTypedSlot<TypeI> getSymbol()
StaticTypedRef
getSymbol
in interface StaticTypedRef<TypeI>
getSymbol
in interface StaticRef
JSModule getModule()
GlobalNamespace.Ref getTwin()
boolean isSet()
static void markTwins(GlobalNamespace.Ref a, GlobalNamespace.Ref b)
GlobalNamespace.Ref cloneAndReclassify(GlobalNamespace.Ref.Type type)
static GlobalNamespace.Ref createRefForTesting(GlobalNamespace.Ref.Type type)
public java.lang.String toString()
toString
in class java.lang.Object