Package io.micronaut.expressions.context
Interface ExtensibleExpressionEvaluationContext
- All Superinterfaces:
ExpressionEvaluationContext
- All Known Implementing Classes:
DefaultExpressionEvaluationContext
@Internal
public interface ExtensibleExpressionEvaluationContext
extends ExpressionEvaluationContext
Expression compilation context that can be extended with extra elements.
- Since:
- 4.0.0
- Author:
- Sergey Gavrilov
-
Method Summary
Modifier and TypeMethodDescriptionextendWith
(@NonNull ClassElement classElement) Extends compilation context with class element.extendWith
(@NonNull MethodElement methodElement) Extends compilation context with method element.withThis
(@NonNull ClassElement classElement) Methods inherited from interface io.micronaut.expressions.context.ExpressionEvaluationContext
findMethods, findParameters, findProperties, findThis
-
Method Details
-
withThis
- Parameters:
classElement
- The type that represents this.- Returns:
- extended context
-
extendWith
@NonNull @NonNull ExtensibleExpressionEvaluationContext extendWith(@NonNull @NonNull MethodElement methodElement) 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.- Parameters:
methodElement
- extending method- Returns:
- extended context
-
extendWith
@NonNull @NonNull ExtensibleExpressionEvaluationContext extendWith(@NonNull @NonNull ClassElement classElement) Extends compilation context with class element. Compilation context can include multiple class elements at the same time.- Parameters:
classElement
- extending class- Returns:
- extended context
-