public class DefaultExpressionEvaluatorManager extends java.lang.Object implements ExpressionEvaluatorManager
Modifier and Type | Class and Description |
---|---|
static class |
DefaultExpressionEvaluatorManager.AppendExWriter |
DYNAMICTEXT_ENDTAG, DYNAMICTEXT_STARTTAG
Constructor and Description |
---|
DefaultExpressionEvaluatorManager() |
public SymbolTable getSymbolTable(java.lang.String name)
getSymbolTable
in interface ExpressionEvaluatorManager
public java.util.Collection<SymbolTableFactory> getSymbolTableFactories()
getSymbolTableFactories
in interface ExpressionEvaluatorManager
public final void registerSymbolTable(SymbolTableFactory factory)
registerSymbolTable
in interface ExpressionEvaluatorManager
public SymbolTable getInmutableSymbolTable()
getInmutableSymbolTable
in interface ExpressionEvaluatorManager
public java.lang.Object evaluate(java.lang.String source)
evaluate
in interface ExpressionEvaluatorManager
public java.lang.Object evaluate(SymbolTable symbolTable, java.lang.String source)
evaluate
in interface ExpressionEvaluatorManager
public java.lang.Object evaluate(SymbolTable symbolTable, Code code)
evaluate
in interface ExpressionEvaluatorManager
public java.lang.String evaluateDynamicText(java.lang.String source)
evaluateDynamicText
in interface ExpressionEvaluatorManager
public boolean isDynamicText(java.lang.String source)
isDynamicText
in interface ExpressionEvaluatorManager
public static java.lang.String dynamicTextToScript(java.lang.String s, java.lang.String contentsName)
public java.lang.String evaluateDynamicText(SymbolTable symbolTable, java.lang.String source)
evaluateDynamicText
in interface ExpressionEvaluatorManager
public java.lang.String evaluateDynamicText(SymbolTable symbolTable, java.lang.String source, java.io.Writer output)
evaluateDynamicText
in interface ExpressionEvaluatorManager
public java.lang.String evaluateDynamicText(SymbolTable symbolTable, java.lang.String source, java.io.Writer output, ResourcesStorage resources)
evaluateDynamicText
in interface ExpressionEvaluatorManager
public java.lang.String evaluateDynamicText_old(SymbolTable symbolTable, java.lang.String source)
public Code compile(java.lang.String source)
compile
in interface ExpressionEvaluatorManager
public Code compile(LexicalAnalyzer lex, java.lang.String source)
compile
in interface ExpressionEvaluatorManager
public Code optimize(SymbolTable symbolTable, Code code)
optimize
in interface ExpressionEvaluatorManager
public MutableSymbolTable createSymbolTable()
createSymbolTable
in interface ExpressionEvaluatorManager
public MutableSymbolTable createEmptySymbolTable()
createEmptySymbolTable
in interface ExpressionEvaluatorManager
public void populateSymbolTable(SymbolTable aSymbolTable)
populateSymbolTable
in interface ExpressionEvaluatorManager
public LexicalAnalyzer createLexicalAnalyzer()
createLexicalAnalyzer
in interface ExpressionEvaluatorManager
public CodeBuilder createCodeBuilder()
createCodeBuilder
in interface ExpressionEvaluatorManager
public Compiler createCompiler()
createCompiler
in interface ExpressionEvaluatorManager
public Interpreter createInterpreter()
createInterpreter
in interface ExpressionEvaluatorManager
public java.lang.Double getAccuracy()
getAccuracy
in interface ExpressionEvaluatorManager
public void setAccuracy(java.lang.Double accuracy)
setAccuracy
in interface ExpressionEvaluatorManager
public Expression createExpression()
createExpression
in interface ExpressionEvaluatorManager
public ExpressionBuilder createExpressionBuilder()
createExpressionBuilder
in interface ExpressionEvaluatorManager
public Optimizer createOptimizer()
createOptimizer
in interface ExpressionEvaluatorManager
public void registerGrammar(GrammarFactory factory)
registerGrammar
in interface ExpressionEvaluatorManager
public java.util.Collection<GrammarFactory> getGrammarFactories()
getGrammarFactories
in interface ExpressionEvaluatorManager
public void populateGrammars(Compiler compiler)
public Grammar createGrammar(java.lang.String name)
createGrammar
in interface ExpressionEvaluatorManager
public Bookmarks<Expression> getBookmarks()
getBookmarks
in interface ExpressionEvaluatorManager
public History<Expression> getHistory()
getHistory
in interface ExpressionEvaluatorManager
public Script createScript(java.lang.String name, java.lang.String code, java.lang.String languaje)
createScript
in interface ScriptManager
public Script locateScript(java.lang.String name)
locateScript
in interface ScriptManager
public Script loadScript(java.net.URI location)
loadScript
in interface ScriptManager
public Script loadScript(ResourcesStorage storage, java.lang.String name)
loadScript
in interface ScriptManager
public ResourcesStorage getScriptsResourcesStorage()
getScriptsResourcesStorage
in interface ExpressionEvaluatorManager
public void setScriptsResourcesStorage(ResourcesStorage scriptsResourcesStorage)
setScriptsResourcesStorage
in interface ExpressionEvaluatorManager
public void addReprMethod(ReprMethod method)
addReprMethod
in interface ExpressionEvaluatorManager
public ReprMethod getReprMethod(java.lang.Object value)
getReprMethod
in interface ExpressionEvaluatorManager
public void registerClassLoader(java.lang.ClassLoader loader)
registerClassLoader
in interface ExpressionEvaluatorManager
public java.util.List<java.lang.ClassLoader> getClassLoaders()
getClassLoaders
in interface ExpressionEvaluatorManager
public Formatter<ExpressionBuilder.Value> getExpressionBuilderFormatter()
getExpressionBuilderFormatter
in interface ExpressionEvaluatorManager
public void registerExpressionBuilderFormatter(Formatter<ExpressionBuilder.Value> formatter)
registerExpressionBuilderFormatter
in interface ExpressionEvaluatorManager
public ExpressionEvaluator createExpressionEvaluator(Expression expression)
createExpressionEvaluator
in interface ExpressionEvaluatorManager
public ExpressionEvaluator createEvaluator(java.lang.String expression)
createEvaluator
in interface ExpressionEvaluatorManager
createEvaluator
in interface ScriptManager
public boolean hasHostExpressions(Code statement)
hasHostExpressions
in interface ExpressionEvaluatorManager
public boolean hasHostExpressions(ExpressionBuilder.Value statement)
hasHostExpressions
in interface ExpressionEvaluatorManager
public Code resolveHostExpressions(Code statement, Interpreter interpreter)
resolveHostExpressions
in interface ExpressionEvaluatorManager
public ExpressionBuilder.Value resolveHostExpressions(ExpressionBuilder.Value statement, SymbolTable symbolTable)
resolveHostExpressions
in interface ExpressionEvaluatorManager
public Code resolveHostExpressions(Code statement, SymbolTable symbolTable)
resolveHostExpressions
in interface ExpressionEvaluatorManager
public Expression resolveHostExpressions(Expression expression, SymbolTable symbolTable)
resolveHostExpressions
in interface ExpressionEvaluatorManager
public boolean hasHostExpressions(java.lang.String statement)
hasHostExpressions
in interface ExpressionEvaluatorManager
public ExpressionBuilder.Value getHostExpressionValue(ExpressionBuilder.Function hostExpression, ExpressionBuilder expbuilder)
getHostExpressionValue
in interface ExpressionEvaluatorManager
public ExpressionBuilder.Value getHostExpressionValue(ExpressionBuilder.Function hostExpression, ExpressionBuilder expbuilder, SymbolTable symbolTable)
getHostExpressionValue
in interface ExpressionEvaluatorManager
public void initConvertersToCode()
public void registerCodeConverter(ConverterToCode converter)
registerCodeConverter
in interface ExpressionEvaluatorManager
public ConverterToCode getConverterToCode(java.lang.Object ob)
getConverterToCode
in interface ExpressionEvaluatorManager
public ExpressionBuilder.Value convertToValue(java.lang.Object obj)
convertToValue
in interface ExpressionEvaluatorManager
public Code convertToCode(java.lang.Object obj)
convertToCode
in interface ExpressionEvaluatorManager
public Code convertToCode(CodeBuilder builder, java.lang.Object obj, java.util.Map<java.lang.String,java.lang.Object> props)
convertToCode
in interface ExpressionEvaluatorManager
public ConverterToCode getConverterToCodeByName(java.lang.String name)
getConverterToCodeByName
in interface ExpressionEvaluatorManager
public void registerUserOperator(UserOperator userOperator)
registerUserOperator
in interface ExpressionEvaluatorManager
public java.lang.Iterable<UserOperator> getUserDefinedOperators(java.lang.String precedence)
getUserDefinedOperators
in interface ExpressionEvaluatorManager