Package io.cucumber.java8
Class Java8StepDefinition
java.lang.Object
io.cucumber.java8.AbstractGlueDefinition
io.cucumber.java8.Java8StepDefinition
- All Implemented Interfaces:
Located,StepDefinition
-
Field Summary
FieldsFields inherited from class io.cucumber.java8.AbstractGlueDefinition
location -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateJava8StepDefinition(String expression, Class<T> bodyClass, T body) -
Method Summary
Modifier and TypeMethodDescription(package private) static <T extends StepDefinitionBody>
Java8StepDefinitionvoidInvokes the step definition.private static List<ParameterInfo> fromTypes(String expression, StackTraceElement location, Type[] genericParameterTypes) Return the pattern associated with this instance.Return parameter information.Methods inherited from class io.cucumber.java8.AbstractGlueDefinition
disposeClosure, getLocation, getParameterCount, getSourceReference, invokeMethod, isDefinedAt, requireSourceReference, resolveRawArguments, updateClosureMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.cucumber.core.backend.Located
getLocation, getSourceReference, isDefinedAt
-
Field Details
-
parameterInfos
-
expression
-
-
Constructor Details
-
Java8StepDefinition
-
-
Method Details
-
fromTypes
private static List<ParameterInfo> fromTypes(String expression, StackTraceElement location, Type[] genericParameterTypes) -
create
static <T extends StepDefinitionBody> Java8StepDefinition create(String expression, Class<T> bodyClass, T body) -
execute
Description copied from interface:StepDefinitionInvokes the step definition. The method should raise a Throwable if the invocation fails, which will cause the step to fail.- Specified by:
executein interfaceStepDefinition- Parameters:
args- The arguments for the step
-
parameterInfos
Description copied from interface:StepDefinitionReturn parameter information.- Specified by:
parameterInfosin interfaceStepDefinition- Returns:
- parameter information, may not return null
-
getPattern
Description copied from interface:StepDefinitionReturn the pattern associated with this instance. Used for error reporting only.- Specified by:
getPatternin interfaceStepDefinition- Returns:
- the pattern associated with this instance.
-