Class AbstractGlueDefinition

java.lang.Object
io.cucumber.java.AbstractGlueDefinition
All Implemented Interfaces:
Located
Direct Known Subclasses:
AbstractDatatableElementTransformerDefinition, JavaDefaultParameterTransformerDefinition, JavaDocStringTypeDefinition, JavaHookDefinition, JavaParameterTypeDefinition, JavaStaticHookDefinition, JavaStepDefinition

abstract class AbstractGlueDefinition extends Object implements Located
  • Field Details

    • method

      protected final Method method
    • lookup

      private final Lookup lookup
    • fullFormat

      private @Nullable String fullFormat
    • sourceReference

      private @Nullable SourceReference sourceReference
  • Constructor Details

    • AbstractGlueDefinition

      AbstractGlueDefinition(Method method, Lookup lookup)
  • Method Details

    • isDefinedAt

      public boolean isDefinedAt(StackTraceElement e)
      Description copied from interface: Located
      Return true if this matches the location. This is used to filter stack traces.
      Specified by:
      isDefinedAt in interface Located
      Parameters:
      e - The location of the step.
      Returns:
      Return true if this matches the location.
    • getLocation

      public final String getLocation()
      Description copied from interface: Located
      Location of step definition. Can either be a a method or stack trace style location.

      Examples:

      • com.example.StepDefinitions.given_an_example(io.cucumber.datatable.DataTable)
      • com.example.StepDefinitions.<init>(StepDefinitions.java:9)
      Specified by:
      getLocation in interface Located
      Returns:
      The source line of the step definition.
    • getFullLocationLocation

      private String getFullLocationLocation()
    • invokeMethod

      final @Nullable Object invokeMethod(@Nullable Object... args)
    • getSourceReference

      public Optional<SourceReference> getSourceReference()
      Specified by:
      getSourceReference in interface Located