public class SimpleEvaluationContext extends Object implements EvaluationContext
PROPERTY_CONFIGURATION, PROPERTY_CONNECTION, PROPERTY_EXPRESSION_LANGUAGE| Constructor and Description |
|---|
SimpleEvaluationContext() |
SimpleEvaluationContext(EvaluationContext globalEvaluationContext) |
| Modifier and Type | Method and Description |
|---|---|
void |
declare(ResolverDeclaration resolverDeclaration)
Allows defining a resolver declaration in this context.
|
void |
define(String variable,
Object value)
Allows defining a variable in this context.
|
void |
defineProperty(String property,
Object value)
Allows defining a property in this context.
|
Optional<EvaluationContext> |
getGlobalEvaluationContext()
Get the global evaluation context for this context.
|
Map<String,Object> |
getVariables()
Gets all the variables defined in this context.
|
Object |
resolve(String expression)
Evaluates an expression in this context and get it's result.
|
ResolverDeclaration |
resolveDeclaration(String declarationName)
Gets a resolver declaration from this evaluation context.
|
Object |
resolveProperty(String property)
Get a the value of a property declared in this context by name.
|
public SimpleEvaluationContext()
public SimpleEvaluationContext(EvaluationContext globalEvaluationContext)
public Map<String,Object> getVariables()
EvaluationContextgetVariables in interface EvaluationContextpublic Optional<EvaluationContext> getGlobalEvaluationContext()
EvaluationContextgetGlobalEvaluationContext in interface EvaluationContextpublic Object resolve(String expression)
EvaluationContextresolve in interface EvaluationContextexpression - The expression to evaluate.public Object resolveProperty(String property)
EvaluationContextresolveProperty in interface EvaluationContextproperty - The name of the property in this context.public void defineProperty(String property, Object value)
EvaluationContextdefineProperty in interface EvaluationContextproperty - The name of the property to define.value - The value of the property.public void define(String variable, Object value)
EvaluationContextdefine in interface EvaluationContextvariable - The name of the variable to define.value - The value of the variable.public ResolverDeclaration resolveDeclaration(String declarationName)
EvaluationContextresolveDeclaration in interface EvaluationContextdeclarationName - The declared name of the resolver.public void declare(ResolverDeclaration resolverDeclaration)
EvaluationContextdeclare in interface EvaluationContextresolverDeclaration - The resolver declaration to define in this context.Copyright © 2021. All rights reserved.