org.jbehave.core.steps
Class CandidateStep

java.lang.Object
  extended by org.jbehave.core.steps.CandidateStep

public class CandidateStep
extends java.lang.Object

A CandidateStep is associated to a Java method annotated with Given, When, Then in a CandidatesSteps instance class. The CandidateStep is responsible for matching the textual step against the pattern contained in the method annotation via the StepMatcher and for the creation of the matched executable step via the StepCreator.


Nested Class Summary
static class CandidateStep.StartingWordNotFound
           
 
Constructor Summary
CandidateStep(java.lang.String patternAsString, int priority, StepType stepType, java.lang.reflect.Method method, java.lang.Object stepsInstance, java.util.Map<StepType,java.lang.String> startingWordsByType, StepPatternParser stepPatternParser, ParameterConverters parameterConverters)
           
 
Method Summary
 Step createMatchedStep(java.lang.String stepAsString, java.util.Map<java.lang.String,java.lang.String> tableRow)
           
 void doDryRun(boolean dryRun)
           
 java.lang.reflect.Method getMethod()
           
 java.lang.String getPatternAsString()
           
 java.lang.Integer getPriority()
           
 java.lang.String getStartingWord()
           
 java.lang.Object getStepsInstance()
           
 StepType getStepType()
           
 boolean ignore(java.lang.String stepAsString)
           
 boolean isAndStep(java.lang.String stepAsString)
           
 boolean matches(java.lang.String stepAsString)
           
 boolean matches(java.lang.String step, java.lang.String previousNonAndStep)
           
 java.lang.String toString()
           
 void useParanamer(com.thoughtworks.paranamer.Paranamer paranamer)
           
 void useStepMonitor(StepMonitor stepMonitor)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CandidateStep

public CandidateStep(java.lang.String patternAsString,
                     int priority,
                     StepType stepType,
                     java.lang.reflect.Method method,
                     java.lang.Object stepsInstance,
                     java.util.Map<StepType,java.lang.String> startingWordsByType,
                     StepPatternParser stepPatternParser,
                     ParameterConverters parameterConverters)
Method Detail

getMethod

public java.lang.reflect.Method getMethod()

getPriority

public java.lang.Integer getPriority()

getPatternAsString

public java.lang.String getPatternAsString()

getStepsInstance

public java.lang.Object getStepsInstance()

getStepType

public StepType getStepType()

getStartingWord

public java.lang.String getStartingWord()

useStepMonitor

public void useStepMonitor(StepMonitor stepMonitor)

doDryRun

public void doDryRun(boolean dryRun)

useParanamer

public void useParanamer(com.thoughtworks.paranamer.Paranamer paranamer)

ignore

public boolean ignore(java.lang.String stepAsString)

matches

public boolean matches(java.lang.String stepAsString)

matches

public boolean matches(java.lang.String step,
                       java.lang.String previousNonAndStep)

isAndStep

public boolean isAndStep(java.lang.String stepAsString)

createMatchedStep

public Step createMatchedStep(java.lang.String stepAsString,
                              java.util.Map<java.lang.String,java.lang.String> tableRow)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2003-2010. All Rights Reserved.