Package io.micronaut.context.expressions
Class DefaultExpressionEvaluationContext
java.lang.Object
io.micronaut.context.expressions.DefaultExpressionEvaluationContext
- All Implemented Interfaces:
- ConfigurableExpressionEvaluationContext,- ExpressionEvaluationContext,- AutoCloseable
@Internal
public final class DefaultExpressionEvaluationContext
extends Object
implements ConfigurableExpressionEvaluationContext
Default implementation of 
ConfigurableExpressionEvaluationContext.
 For this implementation, the methods mutating evaluation context return new instance of
 expression evaluation context.- Since:
- 4.0.0
- Author:
- Sergey Gavrilov
- 
Constructor SummaryConstructorsConstructorDescriptionDefaultExpressionEvaluationContext(@Nullable Object thisObject, @Nullable Object[] args, @Nullable BeanContext beanContext, @Nullable BeanDefinition<?> owningBean) 
- 
Method SummaryModifier and TypeMethodDescriptionvoidclose()getArgument(int index) Provides method argument by index.<T> TProvides bean by type.getProperty(String name) Provides property by name.getThis()Expressions that are evaluated in non-static contexts can reference "this".withArguments(Object thisObject, Object[] args) Set arguments passed to invoked method.withBeanContext(BeanContext beanContext) Set context in which expression is evaluated.withOwningBean(BeanDefinition<?> beanDefinition) Set bean owning evaluated expression.Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.micronaut.context.expressions.ConfigurableExpressionEvaluationContextwithArguments
- 
Constructor Details- 
DefaultExpressionEvaluationContextpublic DefaultExpressionEvaluationContext()
- 
DefaultExpressionEvaluationContext
 
- 
- 
Method Details- 
withArgumentsDescription copied from interface:ConfigurableExpressionEvaluationContextSet arguments passed to invoked method.- Specified by:
- withArgumentsin interface- ConfigurableExpressionEvaluationContext
- Parameters:
- thisObject- In the case of non-static methods the object that represents this object
- args- method arguments
- Returns:
- evaluation context which arguments can be used in evaluation.
 
- 
withOwningBeanDescription copied from interface:ConfigurableExpressionEvaluationContextSet bean owning evaluated expression.- Specified by:
- withOwningBeanin interface- ConfigurableExpressionEvaluationContext
- Parameters:
- beanDefinition- owning bean definition
- Returns:
- evaluation context aware of owning bean.
 
- 
withBeanContextDescription copied from interface:ConfigurableExpressionEvaluationContextSet context in which expression is evaluated.- Specified by:
- withBeanContextin interface- ConfigurableExpressionEvaluationContext
- Parameters:
- beanContext- bean context
- Returns:
- evaluation context aware of bean context.
 
- 
getThisDescription copied from interface:ExpressionEvaluationContextExpressions that are evaluated in non-static contexts can reference "this".The object returned here is a reference to this. - Specified by:
- getThisin interface- ExpressionEvaluationContext
- Returns:
- The object that represents this.
 
- 
getArgumentDescription copied from interface:ExpressionEvaluationContextProvides method argument by index.- Specified by:
- getArgumentin interface- ExpressionEvaluationContext
- Parameters:
- index- argument index
- Returns:
- argument value
 
- 
getPropertyDescription copied from interface:ExpressionEvaluationContextProvides property by name.- Specified by:
- getPropertyin interface- ExpressionEvaluationContext
- Parameters:
- name- property name
- Returns:
- property value or null
 
- 
getBeanDescription copied from interface:ExpressionEvaluationContextProvides bean by type.- Specified by:
- getBeanin interface- ExpressionEvaluationContext
- Type Parameters:
- T- type of required bean
- Parameters:
- type- required bean class object
- Returns:
- bean instance
 
- 
close- Specified by:
- closein interface- AutoCloseable
- Throws:
- Exception
 
 
-