public static Method getMethod ( Class < ? > target , MethodFilter methodFilter ) { Set < Method > methods = getMethods ( target , methodFilter ) ; if ( ! methods . isEmpty ( ) ) { return methods . iterator ( ) . next ( ) ; } return null ; }
Returns the method declared by the target class and any of its super classes which matches the supplied methodFilter if method is found null is returned . If more than one method is found the first in the resulting set iterator is returned .