Package io.micronaut.context.expressions
Class DefaultExpressionEvaluationContext
java.lang.Object
io.micronaut.context.expressions.DefaultExpressionEvaluationContext
- All Implemented Interfaces:
ConfigurableExpressionEvaluationContext,io.micronaut.core.expressions.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
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultExpressionEvaluationContext(@Nullable Object thisObject, @Nullable Object[] args, @Nullable BeanContext beanContext, @Nullable BeanDefinition<?> owningBean) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()getArgument(int index) <T> TgetProperty(String name) getThis()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.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.micronaut.context.expressions.ConfigurableExpressionEvaluationContext
withArguments
-
Constructor Details
-
DefaultExpressionEvaluationContext
public DefaultExpressionEvaluationContext() -
DefaultExpressionEvaluationContext
public DefaultExpressionEvaluationContext(@Nullable @Nullable Object thisObject, @Nullable @Nullable Object[] args, @Nullable @Nullable BeanContext beanContext, @Nullable @Nullable BeanDefinition<?> owningBean)
-
-
Method Details
-
withArguments
Description copied from interface:ConfigurableExpressionEvaluationContextSet arguments passed to invoked method.- Specified by:
withArgumentsin interfaceConfigurableExpressionEvaluationContext- 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
Description copied from interface:ConfigurableExpressionEvaluationContextSet bean owning evaluated expression.- Specified by:
withOwningBeanin interfaceConfigurableExpressionEvaluationContext- Parameters:
beanDefinition- owning bean definition- Returns:
- evaluation context aware of owning bean.
-
withBeanContext
Description copied from interface:ConfigurableExpressionEvaluationContextSet context in which expression is evaluated.- Specified by:
withBeanContextin interfaceConfigurableExpressionEvaluationContext- Parameters:
beanContext- bean context- Returns:
- evaluation context aware of bean context.
-
getThis
- Specified by:
getThisin interfaceio.micronaut.core.expressions.ExpressionEvaluationContext
-
getArgument
- Specified by:
getArgumentin interfaceio.micronaut.core.expressions.ExpressionEvaluationContext
-
getProperty
- Specified by:
getPropertyin interfaceio.micronaut.core.expressions.ExpressionEvaluationContext
-
getBean
- Specified by:
getBeanin interfaceio.micronaut.core.expressions.ExpressionEvaluationContext
-
close
- Specified by:
closein interfaceAutoCloseable- Throws:
Exception
-