Interface MethodCandidate

All Superinterfaces:
io.micronaut.core.order.Ordered

public interface MethodCandidate extends io.micronaut.core.order.Ordered
Implementation of dynamic finders.
Since:
1.0
Author:
graeme rocher
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    The default position.

    Fields inherited from interface io.micronaut.core.order.Ordered

    HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
  • Method Summary

    Modifier and Type
    Method
    Description
    @Nullable MethodMatchInfo
    buildMatchInfo(@NonNull MethodMatchContext matchContext)
    Builds the method info.
    default int
     
    boolean
    isMethodMatch(@NonNull io.micronaut.inject.ast.MethodElement methodElement, @NonNull MatchContext matchContext)
    Whether the given method name matches this finder.
  • Field Details

    • DEFAULT_POSITION

      static final int DEFAULT_POSITION
      The default position.
      See Also:
  • Method Details

    • isMethodMatch

      boolean isMethodMatch(@NonNull @NonNull io.micronaut.inject.ast.MethodElement methodElement, @NonNull @NonNull MatchContext matchContext)
      Whether the given method name matches this finder.
      Parameters:
      methodElement - The method element. Never null.
      matchContext - The match context. Never null.
      Returns:
      true if it does
    • getOrder

      default int getOrder()
      Specified by:
      getOrder in interface io.micronaut.core.order.Ordered
    • buildMatchInfo

      @Nullable @Nullable MethodMatchInfo buildMatchInfo(@NonNull @NonNull MethodMatchContext matchContext)
      Builds the method info. The method isMethodMatch(MethodElement, MatchContext) should be invoked and checked prior to calling this method.
      Parameters:
      matchContext - The match context
      Returns:
      The method info or null if it cannot be built. If the method info cannot be built an error will be reported to the passed MethodMatchContext