Revision 44338 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/DefaultInterpreter.java
DefaultInterpreter.java | ||
---|---|---|
22 | 22 |
import org.gvsig.expressionevaluator.impl.function.operator.BinaryOperator; |
23 | 23 |
import org.gvsig.expressionevaluator.impl.function.operator.UnaryOperator; |
24 | 24 |
import org.gvsig.expressionevaluator.impl.function.programming.ReturnFunction.ReturnException; |
25 |
import org.gvsig.expressionevaluator.spi.AbstractSymbolTable; |
|
25 | 26 |
|
26 | 27 |
public class DefaultInterpreter implements Interpreter { |
27 | 28 |
|
... | ... | |
104 | 105 |
return other; |
105 | 106 |
} |
106 | 107 |
|
108 |
@Override |
|
109 |
public Object call(String function, Object... args) throws Exception { |
|
110 |
Function fn = this.symbolTable.function(function); |
|
111 |
Object value = fn.call(this, args); |
|
112 |
return value; |
|
113 |
} |
|
114 |
|
|
115 |
@Override |
|
116 |
public boolean hasFunction(String function) { |
|
117 |
Function fn = this.symbolTable.function(function); |
|
118 |
if( fn == null ) { |
|
119 |
return false; |
|
120 |
} |
|
121 |
if( fn instanceof AbstractSymbolTable.ScriptFunction ) { |
|
122 |
return false; |
|
123 |
} |
|
124 |
return true; |
|
125 |
} |
|
126 |
|
|
107 | 127 |
public int getMaxRecursionLimit() { |
108 | 128 |
return this.maxRecursionLimit; |
109 | 129 |
} |
Also available in: Unified diff