svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.library / org.gvsig.expressionevaluator / org.gvsig.expressionevaluator.lib / org.gvsig.expressionevaluator.lib.api / src / main / java / org / gvsig / expressionevaluator / ExpressionEvaluatorManager.java @ 47175
History | View | Annotate | Download (4.24 KB)
1 |
|
---|---|
2 |
package org.gvsig.expressionevaluator; |
3 |
|
4 |
import java.io.Writer; |
5 |
import java.util.Collection; |
6 |
import java.util.List; |
7 |
import java.util.Map; |
8 |
import org.gvsig.tools.bookmarksandhistory.Bookmarks; |
9 |
import org.gvsig.tools.bookmarksandhistory.History; |
10 |
import org.gvsig.tools.resourcesstorage.ResourcesStorage; |
11 |
import org.gvsig.tools.script.ScriptManager; |
12 |
|
13 |
|
14 |
public interface ExpressionEvaluatorManager extends ScriptManager { |
15 |
|
16 |
public static final String DYNAMICTEXT_STARTTAG = "<%"; |
17 |
public static final String DYNAMICTEXT_ENDTAG = "%>"; |
18 |
|
19 |
public Object evaluate(String source); |
20 |
|
21 |
public Object evaluate(SymbolTable symbolTable, String source); |
22 |
|
23 |
public Object evaluate(SymbolTable symbolTable, Code code); |
24 |
|
25 |
public String evaluateDynamicText(String source); |
26 |
|
27 |
public String evaluateDynamicText(SymbolTable symbolTable, String source); |
28 |
|
29 |
public String evaluateDynamicText(SymbolTable symbolTable, String source, Writer output); |
30 |
|
31 |
public String evaluateDynamicText(SymbolTable symbolTable, String source, Writer output, ResourcesStorage resources); |
32 |
|
33 |
public boolean isDynamicText(String source); |
34 |
|
35 |
public Code compile(String source); |
36 |
|
37 |
public Code compile(LexicalAnalyzer lex, String source); |
38 |
|
39 |
public Code optimize(SymbolTable symbolTable, Code code);
|
40 |
|
41 |
public MutableSymbolTable createSymbolTable();
|
42 |
|
43 |
public SymbolTable getInmutableSymbolTable();
|
44 |
|
45 |
public SymbolTable getSymbolTable(String name); |
46 |
|
47 |
public Collection<SymbolTableFactory> getSymbolTableFactories(); |
48 |
|
49 |
public void registerSymbolTable(SymbolTableFactory symbolTableFactory); |
50 |
|
51 |
public LexicalAnalyzer createLexicalAnalyzer();
|
52 |
|
53 |
public CodeBuilder createCodeBuilder();
|
54 |
|
55 |
public Compiler createCompiler(); |
56 |
|
57 |
public Interpreter createInterpreter();
|
58 |
|
59 |
public Optimizer createOptimizer();
|
60 |
|
61 |
public Double getAccuracy(); |
62 |
|
63 |
public void setAccuracy(Double accuracy); |
64 |
|
65 |
public Expression createExpression(); |
66 |
|
67 |
public ExpressionBuilder createExpressionBuilder();
|
68 |
|
69 |
public void registerExpressionBuilderFormatter(Formatter<ExpressionBuilder.Value> formatter); |
70 |
|
71 |
public Formatter<ExpressionBuilder.Value> getExpressionBuilderFormatter(); |
72 |
|
73 |
public void registerGrammar(GrammarFactory factory) ; |
74 |
|
75 |
public Collection<GrammarFactory> getGrammarFactories(); |
76 |
|
77 |
public Grammar createGrammar(String name); |
78 |
|
79 |
public Bookmarks<Expression> getBookmarks(); |
80 |
|
81 |
public History<Expression> getHistory(); |
82 |
|
83 |
public ResourcesStorage getScriptsResourcesStorage();
|
84 |
|
85 |
public void setScriptsResourcesStorage(ResourcesStorage scriptsResourcesStorage); |
86 |
|
87 |
public void addReprMethod(ReprMethod method); |
88 |
|
89 |
public ReprMethod getReprMethod(Object value); |
90 |
|
91 |
public void registerClassLoader(ClassLoader loader); |
92 |
|
93 |
public List<ClassLoader> getClassLoaders(); |
94 |
|
95 |
public void populateSymbolTable(SymbolTable aSymbolTable); |
96 |
|
97 |
public ExpressionEvaluator createExpressionEvaluator(Expression expression); |
98 |
|
99 |
@Override
|
100 |
public ExpressionEvaluator createEvaluator(String expression); |
101 |
|
102 |
public boolean hasHostExpressions(Code statement); |
103 |
|
104 |
public boolean hasHostExpressions(ExpressionBuilder.Value statement); |
105 |
|
106 |
public boolean hasHostExpressions(String statement); |
107 |
|
108 |
public Code resolveHostExpressions(Code statement, Interpreter interpreter);
|
109 |
|
110 |
public Code resolveHostExpressions(Code statement, SymbolTable symbolTable);
|
111 |
|
112 |
public ExpressionBuilder.Value resolveHostExpressions(ExpressionBuilder.Value statement, SymbolTable symbolTable);
|
113 |
|
114 |
public Expression resolveHostExpressions(Expression expression, SymbolTable symbolTable); |
115 |
|
116 |
public ExpressionBuilder.Value getHostExpressionValue(ExpressionBuilder.Function hostExpression, ExpressionBuilder expbuilder);
|
117 |
|
118 |
public ExpressionBuilder.Value getHostExpressionValue(ExpressionBuilder.Function hostExpression, ExpressionBuilder expbuilder, SymbolTable symbolTable);
|
119 |
|
120 |
public void registerCodeConverter(ConverterToCode converter); |
121 |
|
122 |
public ConverterToCode getConverterToCode(Object ob); |
123 |
|
124 |
public ConverterToCode getConverterToCodeByName(String name); |
125 |
|
126 |
public Code convertToCode(CodeBuilder builder, Object ob, Map<String,Object> props); |
127 |
} |