public void scan(JavaBackend javaBackend, Method method, Class<?> glueCodeClass) {
        Annotation[] methodAnnotations = method.getAnnotations();
        for (Annotation annotation : methodAnnotations) {
            if (isHookAnnotation(annotation)) {
                validateMethod(method, glueCodeClass);
                javaBackend.addHook(annotation, method);
            } else if (isStepdefAnnotation(annotation)) {
                validateMethod(method, glueCodeClass);
                javaBackend.addStepDefinition(annotation, method);
            }
        }
    }
public void scan ( JavaBackend javaBackend , Method method , Class < ? > glueCodeClass ) { Annotation [ ] methodAnnotations = method . getAnnotations ( ) ; for ( Annotation annotation : methodAnnotations ) { if ( isHookAnnotation ( annotation ) ) { validateMethod ( method , glueCodeClass ) ; javaBackend . addHook ( annotation , method ) ; } else if ( isStepdefAnnotation ( annotation ) ) { validateMethod ( method , glueCodeClass ) ; javaBackend . addStepDefinition ( annotation , method ) ; } } }
Registers step definitions and hooks.

@param javaBackend   the backend where stepdefs and hooks will be registered.
@param method        a candidate for being a stepdef or hook.
@param glueCodeClass the class where the method is declared.