Package io.micronaut.expressions.context
Class DefaultExpressionEvaluationContext
java.lang.Object
io.micronaut.expressions.context.DefaultExpressionEvaluationContext
- All Implemented Interfaces:
ExpressionEvaluationContext
,ExtensibleExpressionEvaluationContext
@Internal
public class DefaultExpressionEvaluationContext
extends Object
implements ExtensibleExpressionEvaluationContext
Default implementation of
ExtensibleExpressionEvaluationContext
. Extending
this context will always return new instance instead of modifying the existing one.- Since:
- 4.0.0
- Author:
- Sergey Gavrilov
-
Method Summary
Modifier and TypeMethodDescriptionextendWith
(ClassElement classElement) Extends compilation context with class element.extendWith
(MethodElement methodElement) Extends compilation context with method element.findMethods
(String name) Search methods in compilation context by name.findParameters
(String name) Search method parameters in compilation context by name.findProperties
(String name) Search bean properties in compilation context by name.findThis()
withThis
(ClassElement classElement)
-
Method Details
-
withThis
- Specified by:
withThis
in interfaceExtensibleExpressionEvaluationContext
- Parameters:
classElement
- The type that represents this.- Returns:
- extended context
-
extendWith
Description copied from interface:ExtensibleExpressionEvaluationContext
Extends compilation context with method element. Compilation context can only include one method at the same time, so this method will return the context which will replace previous context method element if it was set.- Specified by:
extendWith
in interfaceExtensibleExpressionEvaluationContext
- Parameters:
methodElement
- extending method- Returns:
- extended context
-
extendWith
Description copied from interface:ExtensibleExpressionEvaluationContext
Extends compilation context with class element. Compilation context can include multiple class elements at the same time.- Specified by:
extendWith
in interfaceExtensibleExpressionEvaluationContext
- Parameters:
classElement
- extending class- Returns:
- extended context
-
findThis
- Specified by:
findThis
in interfaceExpressionEvaluationContext
- Returns:
- Find the type that represents this.
-
findMethods
Description copied from interface:ExpressionEvaluationContext
Search methods in compilation context by name.- Specified by:
findMethods
in interfaceExpressionEvaluationContext
- Parameters:
name
- searched method name- Returns:
- list of methods with provided name
-
findProperties
Description copied from interface:ExpressionEvaluationContext
Search bean properties in compilation context by name.- Specified by:
findProperties
in interfaceExpressionEvaluationContext
- Parameters:
name
- searched property name- Returns:
- list of properties with provided name
-
findParameters
Description copied from interface:ExpressionEvaluationContext
Search method parameters in compilation context by name.- Specified by:
findParameters
in interfaceExpressionEvaluationContext
- Parameters:
name
- searched parameter name- Returns:
- list of parameters with provided name
-