private boolean isHandlerMethod ( final Method method ) { boolean isHandler = false ; if ( hasStartSagaAnnotation ( method ) || hasHandlerAnnotation ( method ) ) { if ( method . getReturnType ( ) . equals ( Void . TYPE ) ) { Class < ? > [ ] parameterTypes = method . getParameterTypes ( ) ; if ( parameterTypes . length == 1 ) { isHandler = true ; } else { LOG . warn ( "Method {}.{} marked for saga does not have the expected single parameter." , method . getDeclaringClass ( ) , method . getName ( ) ) ; } } else { LOG . warn ( "Method {}.{} marked for saga event handling but does return a value." , method . getDeclaringClass ( ) , method . getName ( ) ) ; } } return isHandler ; }
Checks whether method has expected annotation arguments as well as signature .