public final class ReferenceTable extends java.lang.Object
Constructor and Description |
---|
ReferenceTable() |
Modifier and Type | Method and Description |
---|---|
ReferenceTable |
add(LocalReference reference) |
ReferenceTable |
flatDeepCopy(boolean turnIntoConstants) |
ReferenceTable |
fork() |
LocalReference |
get(java.lang.String name) |
boolean |
hasReferenceFor(java.lang.String name) |
boolean |
isEmpty() |
java.util.Collection<LocalReference> |
ownedReferences() |
java.util.Set<java.lang.String> |
ownedSymbols() |
ReferenceTable |
parent() |
java.util.Collection<LocalReference> |
references()
Return the set of the references known to this table.
|
void |
relink(ReferenceTable parent) |
void |
relink(ReferenceTable parent,
boolean prune)
Redefines the parent table for this table.
|
void |
relinkTopLevel(ReferenceTable topLevel) |
void |
remove(java.lang.String name) |
int |
size() |
java.util.Set<java.lang.String> |
symbols() |
java.lang.String |
toString() |
void |
updateFrom(GoloStatement<?> statement) |
public ReferenceTable()
public ReferenceTable parent()
public boolean isEmpty()
public ReferenceTable add(LocalReference reference)
public int size()
public boolean hasReferenceFor(java.lang.String name)
public void updateFrom(GoloStatement<?> statement)
public LocalReference get(java.lang.String name)
public java.util.Set<java.lang.String> ownedSymbols()
public java.util.Collection<LocalReference> ownedReferences()
public void relink(ReferenceTable parent, boolean prune)
If prune
is true
, the owned references already presents in the parent are removed.
parent
- the new parent tableprune
- remove duplicated owned referencespublic void relink(ReferenceTable parent)
public void relinkTopLevel(ReferenceTable topLevel)
public java.util.Set<java.lang.String> symbols()
public java.util.Collection<LocalReference> references()
Contains the own references as well as the ones from the parent table.
public ReferenceTable fork()
public ReferenceTable flatDeepCopy(boolean turnIntoConstants)
public void remove(java.lang.String name)
public java.lang.String toString()
toString
in class java.lang.Object