Package io.micronaut.expressions.context
Class DefaultExpressionCompilationContext
java.lang.Object
io.micronaut.expressions.context.DefaultExpressionCompilationContext
- All Implemented Interfaces:
ExpressionCompilationContext
,ExtensibleExpressionCompilationContext
@Internal
public class DefaultExpressionCompilationContext
extends Object
implements ExtensibleExpressionCompilationContext
Default implementation of
ExtensibleExpressionCompilationContext
. 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 interfaceExtensibleExpressionCompilationContext
- Parameters:
classElement
- The type that represents this.- Returns:
- extended context
-
extendWith
Description copied from interface:ExtensibleExpressionCompilationContext
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 interfaceExtensibleExpressionCompilationContext
- Parameters:
methodElement
- extending method- Returns:
- extended context
-
extendWith
Description copied from interface:ExtensibleExpressionCompilationContext
Extends compilation context with class element. Compilation context can include multiple class elements at the same time.- Specified by:
extendWith
in interfaceExtensibleExpressionCompilationContext
- Parameters:
classElement
- extending class- Returns:
- extended context
-
findThis
- Specified by:
findThis
in interfaceExpressionCompilationContext
- Returns:
- Find the type that represents this.
-
findMethods
Description copied from interface:ExpressionCompilationContext
Search methods in compilation context by name.- Specified by:
findMethods
in interfaceExpressionCompilationContext
- Parameters:
name
- searched method name- Returns:
- list of methods with provided name
-
findProperties
Description copied from interface:ExpressionCompilationContext
Search bean properties in compilation context by name.- Specified by:
findProperties
in interfaceExpressionCompilationContext
- Parameters:
name
- searched property name- Returns:
- list of properties with provided name
-
findParameters
Description copied from interface:ExpressionCompilationContext
Search method parameters in compilation context by name.- Specified by:
findParameters
in interfaceExpressionCompilationContext
- Parameters:
name
- searched parameter name- Returns:
- list of parameters with provided name
-