public abstract class AbstractSymbolTable extends java.lang.Object implements SymbolTable, GetItemByKey<java.lang.String,java.lang.Object>
Modifier and Type | Field and Description |
---|---|
protected java.util.Map<java.lang.String,Function> |
functionAlias |
protected java.util.Map<java.lang.String,Function> |
functions |
protected java.util.List<SymbolTable> |
symbolTables |
protected java.util.Map<java.lang.String,java.lang.Object> |
vars |
Constructor and Description |
---|
AbstractSymbolTable() |
AbstractSymbolTable(java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
void |
addFunction(Function function) |
void |
addFunctions(java.util.Collection<Function> functions) |
boolean |
addSymbolTable(SymbolTable symbolTable) |
SymbolTable |
clone()
Creates a copy of the object.
|
boolean |
containsSymbolTable(SymbolTable symbolTable) |
boolean |
exists(java.lang.String name) |
void |
fixSymbolTables() |
protected void |
fixSymbolTables(java.util.Set<SymbolTable> visiteds) |
Function |
function(java.lang.String name) |
java.util.Collection<Function> |
functions() |
java.lang.Object |
get(java.lang.String name) |
protected java.util.Map<java.lang.String,Function> |
getFunctionAlias() |
protected java.util.Map<java.lang.String,Function> |
getFunctions() |
java.lang.String |
getName() |
java.util.List<SymbolTable> |
getSymbolTables() |
protected java.util.Map<java.lang.String,java.lang.Object> |
getVars() |
boolean |
isSQLCompatible(java.lang.String name) |
java.util.Iterator<Function> |
iterator() |
java.util.Collection<Function> |
localfunctions() |
java.util.Collection<java.lang.String> |
localvariables() |
void |
removeFunction(java.lang.String name) |
boolean |
removeSymbolTable(SymbolTable symbolTable) |
void |
removeVar(java.lang.String name) |
void |
setVar(java.lang.String name,
java.lang.Object value) |
java.lang.String |
toString() |
java.lang.Object |
value(java.lang.String name) |
java.util.Collection<java.lang.String> |
variables() |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
cloneQuietly, cloneQuietly
protected java.util.Map<java.lang.String,java.lang.Object> vars
protected java.util.List<SymbolTable> symbolTables
protected java.util.Map<java.lang.String,Function> functions
protected java.util.Map<java.lang.String,Function> functionAlias
public AbstractSymbolTable()
public AbstractSymbolTable(java.lang.String name)
public java.lang.String getName()
getName
in interface SymbolTable
public void addFunction(Function function)
public void addFunctions(java.util.Collection<Function> functions)
public void removeFunction(java.lang.String name)
public boolean addSymbolTable(SymbolTable symbolTable)
addSymbolTable
in interface SymbolTable
public boolean containsSymbolTable(SymbolTable symbolTable)
containsSymbolTable
in interface SymbolTable
public boolean removeSymbolTable(SymbolTable symbolTable)
removeSymbolTable
in interface SymbolTable
protected java.util.Map<java.lang.String,java.lang.Object> getVars()
public void setVar(java.lang.String name, java.lang.Object value)
public void removeVar(java.lang.String name)
protected java.util.Map<java.lang.String,Function> getFunctions()
protected java.util.Map<java.lang.String,Function> getFunctionAlias()
public boolean exists(java.lang.String name)
exists
in interface SymbolTable
public java.lang.Object value(java.lang.String name)
value
in interface SymbolTable
public java.lang.Object get(java.lang.String name)
get
in interface GetItemByKey<java.lang.String,java.lang.Object>
public Function function(java.lang.String name)
function
in interface SymbolTable
public java.util.Collection<java.lang.String> variables()
variables
in interface SymbolTable
public java.util.Collection<Function> functions()
functions
in interface SymbolTable
public java.util.Collection<Function> localfunctions()
localfunctions
in interface SymbolTable
public java.util.Collection<java.lang.String> localvariables()
localvariables
in interface SymbolTable
public java.util.Iterator<Function> iterator()
iterator
in interface java.lang.Iterable<Function>
public SymbolTable clone() throws java.lang.CloneNotSupportedException
Cloneable
clone
in interface SymbolTable
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
- if the instance of the object cannot
be cloned. As this is extending Cloneable
so its sure
it implements it, so this exception may be used for problems on specific
object instances.Object#clone()}.
public boolean isSQLCompatible(java.lang.String name)
isSQLCompatible
in interface SymbolTable
public java.util.List<SymbolTable> getSymbolTables()
public java.lang.String toString()
toString
in class java.lang.Object
protected void fixSymbolTables(java.util.Set<SymbolTable> visiteds)
public void fixSymbolTables()