public class InterpreterImpl extends java.lang.Object implements Interpreter
| Constructor and Description |
|---|
InterpreterImpl(com.mongodb.DB db,
ObjectMapper objectMapper)
Creates it.
|
| Modifier and Type | Method and Description |
|---|---|
org.antlr.runtime.tree.CommonTree |
compile(java.io.InputStream ips)
Compiles the given code return the AST.
|
java.util.List<InterpreterResult> |
interpret(org.antlr.runtime.tree.Tree tree)
Interprets the given AST and returns an
InterpreterResult
for each command that was executed. |
java.util.List<InterpreterResult> |
interpret(org.antlr.runtime.tree.Tree tree,
java.util.Map<java.lang.String,java.lang.Object> parameters)
Interprets the given AST and returns an
InterpreterResult
for each command that was executed. |
java.util.List<InterpreterResult> |
interpret(org.antlr.runtime.tree.Tree tree,
java.lang.Object... parameters)
Interprets the given AST and returns an
InterpreterResult
for each command that was executed. |
void |
registerDocumentFunction(MqlCriterionFunction function)
Registers a document function.
|
void |
registerFieldFunction(MqlCriterionFunction function)
Registers a field function.
|
void |
registerVariableFunction(MqlVariableFunction function)
Registers a variable function.
|
public InterpreterImpl(com.mongodb.DB db,
ObjectMapper objectMapper)
db - objectMapper - public void registerFieldFunction(MqlCriterionFunction function)
function - public void registerDocumentFunction(MqlCriterionFunction function)
function - public void registerVariableFunction(MqlVariableFunction function)
function - public org.antlr.runtime.tree.CommonTree compile(java.io.InputStream ips)
throws java.io.IOException,
org.antlr.runtime.RecognitionException
compile in interface Interpreterips - java.io.IOExceptionorg.antlr.runtime.RecognitionExceptionpublic java.util.List<InterpreterResult> interpret(org.antlr.runtime.tree.Tree tree)
InterpreterResult
for each command that was executed.interpret in interface Interpreterpublic java.util.List<InterpreterResult> interpret(org.antlr.runtime.tree.Tree tree, java.lang.Object... parameters)
InterpreterResult
for each command that was executed.interpret in interface Interpreterpublic java.util.List<InterpreterResult> interpret(org.antlr.runtime.tree.Tree tree, java.util.Map<java.lang.String,java.lang.Object> parameters)
InterpreterResult
for each command that was executed.interpret in interface InterpreterCopyright © 2013. All Rights Reserved.