Interface MethodResolver

All Known Implementing Classes:
AnnotationMethodResolver

public interface MethodResolver
Strategy interface for detecting a single Method on a Class.
Author:
Mark Fisher
  • Method Summary

    Modifier and Type
    Method
    Description
    findMethod(Class<?> clazz)
    Find a single Method on the given Class that matches this resolver's criteria.
    findMethod(Object candidate)
    Find a single Method on the provided Object that matches this resolver's criteria.
  • Method Details

    • findMethod

      Method findMethod(Object candidate) throws IllegalArgumentException
      Find a single Method on the provided Object that matches this resolver's criteria.
      Parameters:
      candidate - the candidate Object whose Class should be searched for a Method
      Returns:
      a single Method or null if no Method matching this resolver's criteria can be found.
      Throws:
      IllegalArgumentException - if more than one Method defined on the given candidate's Class matches this resolver's criteria
    • findMethod

      Method findMethod(Class<?> clazz)
      Find a single Method on the given Class that matches this resolver's criteria.
      Parameters:
      clazz - the Class instance on which to search for a Method
      Returns:
      a single Method or null if no Method matching this resolver's criteria can be found.
      Throws:
      IllegalArgumentException - if more than one Method defined on the given Class matches this resolver's criteria