Constructor and Description |
---|
FEELImpl() |
FEELImpl(ClassLoader cl) |
FEELImpl(ClassLoader cl,
List<FEELProfile> profiles) |
FEELImpl(List<FEELProfile> profiles) |
Modifier and Type | Method and Description |
---|---|
void |
addListener(org.kie.dmn.api.feel.runtime.events.FEELEventListener listener)
Registers a new event listener into this FEEL instance.
|
CompiledExpression |
compile(String expression,
CompilerContext ctx)
Compiles the string expression using the given
compiler context.
|
ProcessedUnaryTest |
compileUnaryTests(String expressions,
CompilerContext ctx)
Compiles the string expression using the given
compiler context.
|
Object |
evaluate(CompiledExpression expr,
EvaluationContext ctx)
Evaluates the given compiled FEEL expression using the
given EvaluationContext, and returns the result
|
Object |
evaluate(CompiledExpression expr,
Map<String,Object> inputVariables)
Evaluates the given compiled FEEL expression using the
given input variables, and returns the result
|
Object |
evaluate(String expression)
Evaluates the given FEEL expression and returns
the result
|
Object |
evaluate(String expression,
EvaluationContext ctx)
Evaluates the given FEEL expression using the
given EvaluationContext, and returns the result
|
Object |
evaluate(String expression,
Map<String,Object> inputVariables)
Evaluates the given FEEL expression using the
given input variables, and returns the result
|
List<UnaryTest> |
evaluateUnaryTests(String expression)
Evaluates the given expression as a list of of unary tests.
|
List<UnaryTest> |
evaluateUnaryTests(String expression,
Map<String,Type> variableTypes)
Evaluates the given expression as a list of of unary tests.
|
org.drools.javaparser.ast.CompilationUnit |
generateExpressionSource(String expression,
CompilerContext ctx) |
Collection<FEELFunction> |
getCustomFunctions() |
FEELEventListenersManager |
getEventsManager(Collection<org.kie.dmn.api.feel.runtime.events.FEELEventListener> contextListeners) |
Set<org.kie.dmn.api.feel.runtime.events.FEELEventListener> |
getListeners()
Retrieves the set of registered event listeners
|
CompilerContext |
newCompilerContext()
Factory method to create a new compiler context
|
CompilerContext |
newCompilerContext(Collection<org.kie.dmn.api.feel.runtime.events.FEELEventListener> contextListeners) |
EvaluationContextImpl |
newEvaluationContext(ClassLoader cl,
Collection<org.kie.dmn.api.feel.runtime.events.FEELEventListener> listeners,
Map<String,Object> inputVariables)
Creates a new EvaluationContext with the supplied classloader, and the supplied parameters listeners and inputVariables
|
EvaluationContextImpl |
newEvaluationContext(Collection<org.kie.dmn.api.feel.runtime.events.FEELEventListener> listeners,
Map<String,Object> inputVariables)
Creates a new EvaluationContext using this FEEL instance classloader, and the supplied parameters listeners and inputVariables
|
void |
removeListener(org.kie.dmn.api.feel.runtime.events.FEELEventListener listener)
Removes a listener from the list of event listeners.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
newInstance, newInstance, newInstance, newInstance
public FEELImpl()
public FEELImpl(ClassLoader cl)
public FEELImpl(List<FEELProfile> profiles)
public FEELImpl(ClassLoader cl, List<FEELProfile> profiles)
public CompilerContext newCompilerContext()
FEEL
newCompilerContext
in interface FEEL
public CompilerContext newCompilerContext(Collection<org.kie.dmn.api.feel.runtime.events.FEELEventListener> contextListeners)
public Collection<FEELFunction> getCustomFunctions()
public CompiledExpression compile(String expression, CompilerContext ctx)
FEEL
public org.drools.javaparser.ast.CompilationUnit generateExpressionSource(String expression, CompilerContext ctx)
public ProcessedUnaryTest compileUnaryTests(String expressions, CompilerContext ctx)
FEEL
compileUnaryTests
in interface FEEL
expressions
- a FEEL expression for unary testsctx
- a compiler contextpublic Object evaluate(String expression)
FEEL
public Object evaluate(String expression, EvaluationContext ctx)
FEEL
public Object evaluate(String expression, Map<String,Object> inputVariables)
FEEL
evaluate
in interface FEEL
expression
- a FEEL expressioninputVariables
- a map of input Variables. The keys
on the map are the variable names,
that need to follow the naming rules
for the FEEL language. The values on
the map are the corresponding values
for the variables. It is completely
fine to use a previously returned FEEL
context as inputVariables.public Object evaluate(CompiledExpression expr, Map<String,Object> inputVariables)
FEEL
evaluate
in interface FEEL
expr
- a FEEL expressioninputVariables
- a map of input Variables. The keys
on the map are the variable names,
that need to follow the naming rules
for the FEEL language. The values on
the map are the corresponding values
for the variables. It is completely
fine to use a previously returned FEEL
context as inputVariables.public Object evaluate(CompiledExpression expr, EvaluationContext ctx)
FEEL
public EvaluationContextImpl newEvaluationContext(Collection<org.kie.dmn.api.feel.runtime.events.FEELEventListener> listeners, Map<String,Object> inputVariables)
public EvaluationContextImpl newEvaluationContext(ClassLoader cl, Collection<org.kie.dmn.api.feel.runtime.events.FEELEventListener> listeners, Map<String,Object> inputVariables)
public List<UnaryTest> evaluateUnaryTests(String expression)
FEEL
evaluateUnaryTests
in interface FEEL
expression
- a unary test list expressionpublic List<UnaryTest> evaluateUnaryTests(String expression, Map<String,Type> variableTypes)
FEEL
evaluateUnaryTests
in interface FEEL
expression
- a unary test list expressionvariableTypes
- map of variable names and corresponding types,
necessary to compile the unary testspublic void addListener(org.kie.dmn.api.feel.runtime.events.FEELEventListener listener)
FEEL
addListener
in interface FEEL
listener
- the listener to registerpublic void removeListener(org.kie.dmn.api.feel.runtime.events.FEELEventListener listener)
FEEL
removeListener
in interface FEEL
listener
- the listener to removepublic Set<org.kie.dmn.api.feel.runtime.events.FEELEventListener> getListeners()
FEEL
getListeners
in interface FEEL
public FEELEventListenersManager getEventsManager(Collection<org.kie.dmn.api.feel.runtime.events.FEELEventListener> contextListeners)
Copyright © 2001–2019 JBoss by Red Hat. All rights reserved.