Class AbstractMethodCall

java.lang.Object
io.micronaut.expressions.parser.ast.ExpressionNode
io.micronaut.expressions.parser.ast.access.AbstractMethodCall
Direct Known Subclasses:
ContextMethodCall, ElementMethodCall

@Internal public abstract sealed class AbstractMethodCall extends ExpressionNode permits ContextMethodCall, ElementMethodCall
Abstract expression AST node for method calls.
Since:
4.0.0
Author:
Sergey Gavrilov
  • Field Details

    • name

      protected final String name
    • arguments

      protected final List<ExpressionNode> arguments
    • usedMethod

      protected io.micronaut.expressions.parser.ast.access.CandidateMethod usedMethod
  • Constructor Details

  • Method Details

    • doResolveType

      protected io.micronaut.sourcegen.model.TypeDef doResolveType(@NonNull @NonNull ExpressionVisitorContext ctx)
      Description copied from class: ExpressionNode
      Resolves expression AST node type.
      Overrides:
      doResolveType in class ExpressionNode
      Parameters:
      ctx - expression compilation context
      Returns:
      resolved type
    • doResolveClassElement

      protected ClassElement doResolveClassElement(ExpressionVisitorContext ctx)
      Description copied from class: ExpressionNode
      Resolves the class element for this node.
      Overrides:
      doResolveClassElement in class ExpressionNode
      Parameters:
      ctx - The expression compilation context
      Returns:
      The resolved type
    • prepareVarargsArguments

      protected List<ExpressionNode> prepareVarargsArguments()
      This method wraps original method arguments into array for methods using varargs.
      Returns:
      list of arguments, including varargs arguments wrapped in array
    • resolveArgumentTypes

      protected List<io.micronaut.sourcegen.model.TypeDef> resolveArgumentTypes(ExpressionVisitorContext ctx)
      Resolve types of method invocation arguments.
      Parameters:
      ctx - expression evaluation context
      Returns:
      types of method arguments
    • compileArguments

      protected List<io.micronaut.sourcegen.model.ExpressionDef> compileArguments(ExpressionCompilationContext ctx)
      Compiles method arguments.
      Parameters:
      ctx - expression evaluation context
      Returns:
      expressions
    • stringifyArguments

      protected String stringifyArguments(ExpressionVisitorContext ctx)
      Prepares arguments string for logging purposes.
      Parameters:
      ctx - expression compilation context
      Returns:
      arguments string