Revision 43987 trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/DefaultSymbolTable.java
DefaultSymbolTable.java | ||
---|---|---|
9 | 9 |
import org.gvsig.expressionevaluator.ExpressionEvaluatorManager; |
10 | 10 |
import org.gvsig.expressionevaluator.Function; |
11 | 11 |
import org.gvsig.expressionevaluator.MutableSymbolTable; |
12 |
import org.gvsig.expressionevaluator.SymbolTable; |
|
13 | 12 |
import org.gvsig.tools.script.Script; |
14 | 13 |
|
15 | 14 |
/** |
... | ... | |
30 | 29 |
this.init(); |
31 | 30 |
} |
32 | 31 |
|
33 |
protected final void init() { |
|
34 |
ExpressionEvaluatorManager manager = ExpressionEvaluatorLocator.getManager(); |
|
35 |
for (SymbolTable symbolTable : manager.getSymbolTables()) { |
|
36 |
this.addSymbolTable(symbolTable); |
|
37 |
} |
|
32 |
private void init() { |
|
33 |
DefaultExpressionEvaluatorManager manager = (DefaultExpressionEvaluatorManager) ExpressionEvaluatorLocator.getManager(); |
|
34 |
manager.populateSymbolTable(this); |
|
38 | 35 |
} |
39 | 36 |
|
40 | 37 |
@Override |
... | ... | |
47 | 44 |
|
48 | 45 |
@Override |
49 | 46 |
public void addFunction(Function function) { |
50 |
if( function==null ) { |
|
51 |
throw new IllegalArgumentException("function can't be null"); |
|
52 |
} |
|
53 |
this.functions.put(function.name().toUpperCase(), function); |
|
47 |
super.addFunction(function); |
|
54 | 48 |
} |
55 | 49 |
|
56 | 50 |
@Override |
... | ... | |
99 | 93 |
public MutableSymbolTable clone() throws CloneNotSupportedException { |
100 | 94 |
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. |
101 | 95 |
} |
102 |
|
|
103 | 96 |
} |
Also available in: Unified diff