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 @Nullable [] args, @Nullable BeanContext beanContext, @Nullable BeanDefinition<?> owningBean) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()@Nullable ObjectgetArgument(int index) <T> T@Nullable StringgetProperty(String name) getThis()withArguments(@Nullable Object thisObject, @Nullable Object @Nullable [] 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 class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ConfigurableExpressionEvaluationContext
withArguments
-
Constructor Details
-
DefaultExpressionEvaluationContext
public DefaultExpressionEvaluationContext() -
DefaultExpressionEvaluationContext
public DefaultExpressionEvaluationContext(@Nullable Object thisObject, @Nullable Object @Nullable [] args, @Nullable BeanContext beanContext, @Nullable BeanDefinition<?> owningBean)
-
-
Method Details
-
withArguments
public ConfigurableExpressionEvaluationContext withArguments(@Nullable Object thisObject, @Nullable Object @Nullable [] args) 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
public ConfigurableExpressionEvaluationContext withOwningBean(@Nullable BeanDefinition<?> beanDefinition) 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
-
getBean
- Specified by:
getBeanin interfaceio.micronaut.core.expressions.ExpressionEvaluationContext
-
close
- Specified by:
closein interfaceAutoCloseable- Throws:
Exception
-