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:
withThisin interfaceExtensibleExpressionCompilationContext- Parameters:
classElement- The type that represents this.- Returns:
- extended context
-
extendWith
Description copied from interface:ExtensibleExpressionCompilationContextExtends 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:
extendWithin interfaceExtensibleExpressionCompilationContext- Parameters:
methodElement- extending method- Returns:
- extended context
-
extendWith
Description copied from interface:ExtensibleExpressionCompilationContextExtends compilation context with class element. Compilation context can include multiple class elements at the same time.- Specified by:
extendWithin interfaceExtensibleExpressionCompilationContext- Parameters:
classElement- extending class- Returns:
- extended context
-
findThis
- Specified by:
findThisin interfaceExpressionCompilationContext- Returns:
- Find the type that represents this.
-
findMethods
Description copied from interface:ExpressionCompilationContextSearch methods in compilation context by name.- Specified by:
findMethodsin interfaceExpressionCompilationContext- Parameters:
name- searched method name- Returns:
- list of methods with provided name
-
findProperties
Description copied from interface:ExpressionCompilationContextSearch bean properties in compilation context by name.- Specified by:
findPropertiesin interfaceExpressionCompilationContext- Parameters:
name- searched property name- Returns:
- list of properties with provided name
-
findParameters
Description copied from interface:ExpressionCompilationContextSearch method parameters in compilation context by name.- Specified by:
findParametersin interfaceExpressionCompilationContext- Parameters:
name- searched parameter name- Returns:
- list of parameters with provided name
-