Package io.micronaut.expressions.context
Interface ExtensibleExpressionCompilationContext
- All Superinterfaces:
ExpressionCompilationContext
- All Known Implementing Classes:
DefaultExpressionCompilationContext
@Internal
public interface ExtensibleExpressionCompilationContext
extends ExpressionCompilationContext
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.ExpressionCompilationContext
findMethods, findParameters, findProperties, findThis
-
Method Details
-
withThis
- Parameters:
classElement
- The type that represents this.- Returns:
- extended context
-
extendWith
@NonNull @NonNull ExtensibleExpressionCompilationContext 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 ExtensibleExpressionCompilationContext 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
-