Package io.micronaut.context.expressions
Interface ConfigurableExpressionEvaluationContext
- All Superinterfaces:
AutoCloseable
,ExpressionEvaluationContext
- All Known Implementing Classes:
DefaultExpressionEvaluationContext
@Internal
public sealed interface ConfigurableExpressionEvaluationContext
extends ExpressionEvaluationContext
permits DefaultExpressionEvaluationContext
Expression evaluation context that can be configured before evaluation.
- Since:
- 4.0.0
- Author:
- Sergey Gavrilov
-
Method Summary
Modifier and TypeMethodDescriptionwithArguments
(@Nullable Object[] args) Set arguments passed to invoked method.withArguments
(@Nullable Object thisObject, @Nullable Object[] args) Set arguments passed to invoked method.withBeanContext
(@Nullable BeanContext beanContext) Set context in which expression is evaluated.withOwningBean
(@Nullable BeanDefinition<?> beanDefinition) Set bean owning evaluated expression.Methods inherited from interface java.lang.AutoCloseable
close
Methods inherited from interface io.micronaut.core.expressions.ExpressionEvaluationContext
getArgument, getBean, getProperty, getThis
-
Method Details
-
withArguments
@NonNull default @NonNull ConfigurableExpressionEvaluationContext withArguments(@Nullable @Nullable Object[] args) Set arguments passed to invoked method.- Parameters:
args
- method arguments- Returns:
- evaluation context which arguments can be used in evaluation.
-
withArguments
@NonNull @NonNull ConfigurableExpressionEvaluationContext withArguments(@Nullable @Nullable Object thisObject, @Nullable @Nullable Object[] args) Set arguments passed to invoked method.- Parameters:
thisObject
- In the case of non-static methods the object that represents this objectargs
- method arguments- Returns:
- evaluation context which arguments can be used in evaluation.
-
withOwningBean
@NonNull @NonNull ConfigurableExpressionEvaluationContext withOwningBean(@Nullable @Nullable BeanDefinition<?> beanDefinition) Set bean owning evaluated expression.- Parameters:
beanDefinition
- owning bean definition- Returns:
- evaluation context aware of owning bean.
-
withBeanContext
@NonNull @NonNull ConfigurableExpressionEvaluationContext withBeanContext(@Nullable @Nullable BeanContext beanContext) Set context in which expression is evaluated.- Parameters:
beanContext
- bean context- Returns:
- evaluation context aware of bean context.
-